com.sun.electric.technology
Class Technology.TechPoint

java.lang.Object
  extended by com.sun.electric.technology.Technology.TechPoint
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
Technology

public static class Technology.TechPoint
extends java.lang.Object
implements java.io.Serializable

Defines a point in space that is relative to a NodeInst's bounds. The TechPoint has two coordinates: X and Y. Each of these coordinates is represented by an Edge class (EdgeH for X and EdgeV for Y). The Edge classes have two numbers: a multiplier and an adder. The desired coordinate takes the NodeInst's center, adds in the product of the Edge multiplier and the NodeInst's size, and then adds in the Edge adder.

Arrays of TechPoint objects can be used to describe the bounds of a particular layer in a NodeInst. Typically, four TechPoint objects can describe a rectangle. Circles only need two (center and edge). The Poly.Style class defines the possible types of geometry.

See Also:
EdgeH, EdgeV, Serialized Form

Constructor Summary
Technology.TechPoint(EdgeH x, EdgeV y)
          Constructs a TechPoint with the specified description.
 
Method Summary
 Technology.TechPoint duplicate()
          Method to make a copy of this TechPoint, with all newly allocated parts.
 EdgeH getX()
          Returns the EdgeH that converts a NodeInst into an X coordinate on that NodeInst.
 EdgeV getY()
          Returns the EdgeV that converts a NodeInst into a Y coordinate on that NodeInst.
static Technology.TechPoint[] makeCenterBox()
          Method to make a 2-long TechPoint array that describes a point at the center of the node.
static Technology.TechPoint[] makeFullBox()
          Method to make a 2-long TechPoint array that describes a box that fills the node.
static Technology.TechPoint[] makeIndented(double amount)
          Method to make a 2-long TechPoint array that describes indentation by a specified amount.
static Technology.TechPoint[] makeIndented(double amountX, double amountY)
          Method similat to makeIndented(double amount) where the X and Y specified amounts are different
static Technology.TechPoint[] makeIndentedFromCenter(double amountX, double amountY)
          Method to make a 2-long TechPoint array that describes indentation from the center by a specified amount.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Technology.TechPoint

public Technology.TechPoint(EdgeH x,
                            EdgeV y)
Constructs a TechPoint with the specified description.

Parameters:
x - the EdgeH that converts a NodeInst into an X coordinate on that NodeInst.
y - the EdgeV that converts a NodeInst into a Y coordinate on that NodeInst.
Method Detail

duplicate

public Technology.TechPoint duplicate()
Method to make a copy of this TechPoint, with all newly allocated parts.

Returns:
a new TechPoint with the values in this one.

makeCenterBox

public static Technology.TechPoint[] makeCenterBox()
Method to make a 2-long TechPoint array that describes a point at the center of the node.

Returns:
a new TechPoint array that describes a point at the center of the node.

makeFullBox

public static Technology.TechPoint[] makeFullBox()
Method to make a 2-long TechPoint array that describes a box that fills the node.

Returns:
a new TechPoint array that describes a box that fills the node.

makeIndented

public static Technology.TechPoint[] makeIndented(double amount)
Method to make a 2-long TechPoint array that describes indentation by a specified amount.

Parameters:
amount - the amount to indent the box.
Returns:
a new TechPoint array that describes this indented box.

makeIndented

public static Technology.TechPoint[] makeIndented(double amountX,
                                                  double amountY)
Method similat to makeIndented(double amount) where the X and Y specified amounts are different

Parameters:
amountX - the amount to indent the box along X.
amountY - the amount to indent the box along Y.
Returns:
a new TechPoint array that describes this indented box.

makeIndentedFromCenter

public static Technology.TechPoint[] makeIndentedFromCenter(double amountX,
                                                            double amountY)
Method to make a 2-long TechPoint array that describes indentation from the center by a specified amount.

Parameters:
amountX - the amount to indent from the center the box along X.
amountY - the amount to indent from the center the box along Y.
Returns:
a new TechPoint array that describes this indented box.

getX

public EdgeH getX()
Returns the EdgeH that converts a NodeInst into an X coordinate on that NodeInst.

Returns:
the EdgeH that converts a NodeInst into an X coordinate on that NodeInst.

getY

public EdgeV getY()
Returns the EdgeV that converts a NodeInst into a Y coordinate on that NodeInst.

Returns:
the EdgeV that converts a NodeInst into a Y coordinate on that NodeInst.