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, intCoords, pointCount
 
Method Summary
 void addDoublePoly(int numPoints, Poly.Type style, Layer layer, EGraphics graphicsOverride, PrimitivePort pp)
           
 void addDoubleTextPoly(int numPoints, Poly.Type style, Layer layer, PrimitivePort pp, java.lang.String message, TextDescriptor descriptor)
           
 void addIntBox(int[] coords, Layer layer)
           
 void addIntPoly(int numPoints, Poly.Type style, Layer layer, EGraphics graphicsOverride, PrimitivePort pp)
           
 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, Layer.Function.Set onlyTheseLayers)
          Returns the polygons that describe arc "ai".
 Poly[] getShapeArray(NodeInst ni, boolean electrical, boolean reasonable, Layer.Function.Set onlyTheseLayers)
          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, genShapeOfNode, genShapeOfNode, getCellBackup, getMemoization, getShrinkage, getTechPool, isElectrical, isReasonable, makeGridPoly, pushIntBox, pushIntLine, pushPoint, pushPoint, pushPoint, pushPoly, pushTextPoly, setup, setup, skipLayer
 
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.

getShapeArray

public Poly[] getShapeArray(NodeInst ni,
                            boolean electrical,
                            boolean reasonable,
                            Layer.Function.Set onlyTheseLayers)
Returns the polygons that describe arc "ai".

Parameters:
ni - the NodeInst that is being described.
Returns:
an array of Poly objects that describes this ArcInst 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,
                            Layer.Function.Set onlyTheseLayers)
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,
                          EGraphics graphicsOverride,
                          PrimitivePort pp)
Specified by:
addDoublePoly in class AbstractShapeBuilder

addDoubleTextPoly

public void addDoubleTextPoly(int numPoints,
                              Poly.Type style,
                              Layer layer,
                              PrimitivePort pp,
                              java.lang.String message,
                              TextDescriptor descriptor)
Overrides:
addDoubleTextPoly in class AbstractShapeBuilder

addIntPoly

public void addIntPoly(int numPoints,
                       Poly.Type style,
                       Layer layer,
                       EGraphics graphicsOverride,
                       PrimitivePort pp)
Specified by:
addIntPoly in class AbstractShapeBuilder

addIntBox

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