com.sun.electric.database.geometry
Class Poly.Builder

java.lang.Object
  extended by com.sun.electric.technology.AbstractShapeBuilder
      extended by com.sun.electric.database.geometry.Poly.Builder
Enclosing class:
Poly

public static class Poly.Builder
extends AbstractShapeBuilder

This class builds shapes of nodes and arcs in lambda units as Poly arrays.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.electric.technology.AbstractShapeBuilder
AbstractShapeBuilder.Shrinkage
 
Field Summary
 
Fields inherited from class com.sun.electric.technology.AbstractShapeBuilder
doubleCoords, electrical, intCoords, onlyTheseLayers, pointCount, reasonable
 
Method Summary
 void addDoublePoly(int numPoints, Poly.Type style, Layer layer)
           
 void addIntBox(int[] coords, Layer layer)
           
 void addIntLine(int[] coords, Poly.Type style, Layer layer)
           
 java.util.Iterator<Poly> getShape(ArcInst ai)
          Returns the polygons that describe arc "ai".
 java.util.Iterator<Poly> getShape(NodeInst ni)
          Returns the polygons that describe node "ni".
 Poly[] getShapeArray(ArcInst ai)
          Returns the polygons that describe arc "ai".
 Poly makePoly(ImmutableArcInst a, long gridWidth, Poly.Type style)
          Method to create a Poly object that describes an ImmutableArcInst.
 
Methods inherited from class com.sun.electric.technology.AbstractShapeBuilder
computeExtension, curvedArcGridOutline, genShapeEasy, genShapeOfArc, getMemoization, getOnlyTheseLayers, getShrinkage, getTechPool, makeGridPoly, pushBox, pushPoint, pushPoint, pushPoint, pushPoly, setElectrical, setOnlyTheseLayers, setReasonable, setup, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getShape

public java.util.Iterator<Poly> getShape(NodeInst ni)
Returns the polygons that describe node "ni".

Parameters:
ni - the NodeInst that is being described. The prototype of this NodeInst must be a PrimitiveNode and not a Cell.
Returns:
an iterator on Poly objects that describes this NodeInst graphically.

getShape

public java.util.Iterator<Poly> getShape(ArcInst ai)
Returns the polygons that describe arc "ai".

Parameters:
ai - the ArcInst that is being described.
Returns:
an iterator on Poly objects that describes this ArcInst graphically.

getShapeArray

public Poly[] getShapeArray(ArcInst ai)
Returns the polygons that describe arc "ai".

Parameters:
ai - the ArcInst that is being described.
Returns:
an array of Poly objects that describes this ArcInst graphically.

makePoly

public Poly makePoly(ImmutableArcInst a,
                     long gridWidth,
                     Poly.Type style)
Method to create a Poly object that describes an ImmutableArcInst. The ImmutableArcInst is described by its width and style.

Parameters:
a - an ImmutableArcInst
gridWidth - the width of the Poly in grid units.
style - the style of the ArcInst.
Returns:
a Poly that describes the ArcInst.

addDoublePoly

public void addDoublePoly(int numPoints,
                          Poly.Type style,
                          Layer layer)
Specified by:
addDoublePoly in class AbstractShapeBuilder

addIntLine

public void addIntLine(int[] coords,
                       Poly.Type style,
                       Layer layer)
Specified by:
addIntLine in class AbstractShapeBuilder

addIntBox

public void addIntBox(int[] coords,
                      Layer layer)
Specified by:
addIntBox in class AbstractShapeBuilder