com.sun.electric.technology.technologies
Class Artwork

java.lang.Object
  extended by com.sun.electric.technology.Technology
      extended by com.sun.electric.technology.technologies.Artwork
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Technology>

public class Artwork
extends Technology

This is the general purpose sketching technology.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.electric.technology.Technology
Technology.ArcLayer, Technology.CarbonNanotube, Technology.MultiCutData, Technology.NodeLayer, Technology.SizeCorrector, Technology.State, Technology.TechPoint
 
Field Summary
 PrimitiveNode arrowNode
          Defines a Arrow node.
static Variable.Key ART_COLOR
          key of Variable holding color information
static Variable.Key ART_DEGREES
          Key of Variable holding starting and ending angles.
static Variable.Key ART_MESSAGE
          key of Variable holding message text.
static Variable.Key ART_PATTERN
          key of Variable holding color information
 PrimitiveNode boxNode
          Defines a Box node.
 PrimitiveNode circleNode
          Defines a Circle node.
 PrimitiveNode closedPolygonNode
          Defines a Closed-Polygon node.
 PrimitiveNode crossedBoxNode
          Defines a Crossed-Box node.
 ArcProto dashedArc
          Defines a Dashed arc.
 Layer defaultLayer
          the layer
 ArcProto dottedArc
          Defines a Dotted arc.
 PrimitiveNode filledBoxNode
          Defines a Filled-Box node.
 PrimitiveNode filledCircleNode
          Defines a Filled-Circle node.
 PrimitiveNode filledPolygonNode
          Defines a Filled-Polygon node.
 PrimitiveNode filledTriangleNode
          Defines a Filled-Triangle node.
 PrimitiveNode openedDashedPolygonNode
          Defines a Opened-Dashed-Polygon node.
 PrimitiveNode openedDottedPolygonNode
          Defines a Opened-Dotted-Polygon node.
 PrimitiveNode openedPolygonNode
          Defines a Opened-Polygon node.
 PrimitiveNode openedThickerPolygonNode
          Defines a Opened-Thicker-Polygon node.
 PrimitiveNode pinNode
          Defines a Pin node.
 ArcProto solidArc
          Defines a Solid arc.
 PrimitiveNode splineNode
          Defines a Spline node.
 PrimitiveNode thickCircleNode
          Defines a Thick-Circle node.
 ArcProto thickerArc
          Defines a Thick arc.
 PrimitiveNode triangleNode
          Defines a Triangle node.
 
Fields inherited from class com.sun.electric.technology.Technology
ALWAYS_SKIP_WIPED_PINS, cachedRules, DISK_VERSION_1, DISK_VERSION_2, EMPTY_LIST, factoryMenuPalette, factoryRules, foundries, IMMUTABLE_TECHS, LAYERS_BY_HEIGHT, LAYERS_BY_HEIGHT_LIFT_CONTACTS, N_TYPE, NULL_ARRAY, oldArcNames, oldNodeNames, P_TYPE, paramFoundry, paramNumMetalLayers, SPECIALMENUCELL, SPECIALMENUEXPORT, SPECIALMENUHIGH, SPECIALMENUMISC, SPECIALMENUPORT, SPECIALMENUPURE, SPECIALMENUSEPARATOR, SPECIALMENUSPICE, SPECIALMENUTEXT, TECH_NODE, techFactory, TRANS_CONTACT, xmlTech
 
Constructor Summary
Artwork(Generic generic, TechFactory techFactory)
           
 
Method Summary
static java.awt.geom.Point2D[] fillEllipse(java.awt.geom.Point2D center, double sX, double sY, double startoffset, double endangle)
          Method to return an array of Point2D that describe an ellipse.
 java.awt.geom.Point2D[] fillSpline(double cX, double cY, java.awt.geom.Point2D[] tracePoints)
          Method to convert the given spline control points into a spline curve.
protected  void genShapeOfNode(AbstractShapeBuilder b, ImmutableNodeInst n, PrimitiveNode pn, Technology.NodeLayer[] primLayers)
          Puts into shape builder s the polygons that describe node "n", given a set of NodeLayer objects to use.
protected  void getShapeOfArc(AbstractShapeBuilder b, ImmutableArcInst a)
          Fill the polygons that describe arc "a".
protected  Poly[] getShapeOfNode(CellBackup.Memoization m, ImmutableNodeInst n, boolean electrical, boolean reasonable, Technology.NodeLayer[] primLayers)
          Method to return a list of Polys that describe a given NodeInst.
 Poly getShapeOfPort(NodeInst ni, PrimitivePort pp, java.awt.geom.Point2D selectPt)
          Returns a polygon that describes a particular port on a NodeInst.
static boolean isArtworkArc(ArcProto p)
          Method to determ if ArcProto is an Artwork primitive arc
 boolean isEasyShape(ImmutableArcInst a, boolean explain)
          Tells if arc can be drawn by simplified algorithm Arcs with user-specified color or pattern are not easy
 EGraphics makeGraphics(ElectricObject eObj)
          Method to create an EGraphics for an ElectricObject with color and pattern Variables.
 void setDefaultOutline(NodeInst ni)
          Method to set default outline information on a NodeInst.
static Artwork tech()
          the Artwork Technology object.
 
Methods inherited from class com.sun.electric.technology.Technology
addArcProto, addLayer, addNodeProto, cleanUnusedNodesInLibrary, compareTo, computeShapeOfNode, convertOldArcName, convertOldNodeName, convertOldPortName, convertOldVariable, copyState, dump, dumpExtraProjectSettings, findArcProto, findFoundry, findLayer, findLayerFromFunction, findNodeProto, findTechnology, findTechnology, getArcProto, getArcs, getArcsCollection, getCachedRules, getCMOS90Technology, getColorMap, getCurrent, getCurrentState, getDiffAlpha, getDiffAlphaSetting, getFactoryDesignRules, getFactoryMenuPalette, getFactoryResolution, getFactoryTransparentLayerColors, getFoundries, getGateCapacitance, getGateCapacitanceSetting, getGateIncludedSetting, getGateLengthSubtraction, getGateLengthSubtractionSetting, getGDSLayers, getGroundNetIncludedSetting, getId, getLayer, getLayer, getLayerFromOverride, getLayers, getLayersSortedByHeight, getLayersSortedByName, getMaxSeriesResistance, getMaxSeriesResistanceSetting, getMetalContactCluster, getMinCapacitance, getMinCapacitanceSetting, getMinResistance, getMinResistanceSetting, getMocmosTechnology, getMultiCutData, getNodeInstBaseRectangle, getNodes, getNodesCollection, getNodesSortedByName, getNumArcs, getNumLayers, getNumMetals, getNumMetalsSetting, getNumNodes, getNumTransparentLayers, getOldArcNames, getOldNodeNames, getParamValuesByXmlPath, getPrefFoundry, getPrefFoundrySetting, getPrimitiveFunction, getPrimitiveNode, getProjectSettings, getProjectSettingsRoot, getResistorSize, getRuleDifferences, getRuleNodeIndex, getScale, getScaleSetting, getScaleVariableName, getSelectedFoundry, getSetting, getSetting, getShapeOfArc, getShapeOfArc, getShapeOfArc, getShapeOfNode, getShapeOfNode, getShapeOfPort, getSizeCorrector, getSpacingDistances, getSpiceHeaderLevel1, getSpiceHeaderLevel2, getSpiceHeaderLevel3, getTechDesc, getTechName, getTechnologies, getTechShortName, getTransistorActiveLength, getTransistorAltGatePort, getTransistorBasePort, getTransistorBiasPort, getTransistorCollectorPort, getTransistorDrainPort, getTransistorEmitterPort, getTransistorGatePort, getTransistorSize, getTransistorSourcePort, getTransparentLayerColors, getTSMC180Technology, getWireRatio, getWireRatioSetting, getXmlTech, initAllTechnologies, isEasyShape, isGateIncluded, isGroundNetIncluded, isLayout, isMultiCutCase, isMultiCutInTechnology, isNoDirectionalArcs, isNoNegatedArcs, isNonElectrical, isNonStandard, isNoPrimitiveNodes, isScaleRelevant, isSchematics, isStaticTechnology, isUniversalConnectivityPort, isValidVTPolyRule, isXmlTechAvailable, loadFactoryMenuPalette, makeBooleanSetting, makeDoubleSetting, makeFactoryDesignRules, makeInitialEnvironment, makeIntSetting, makeStringSetting, makeXml, newArcProto, newFoundry, parseComponentMenuXML, printlnBits, printlnSetting, sameLayer, setArcCorrection, setCachedRules, setColorMapFromLayers, setFactoryLESettings, setFactoryParasitics, setFactoryResolution, setFactoryScale, setFactoryTransparentLayers, setNoDirectionalArcs, setNoNegatedArcs, setNonElectrical, setNonStandard, setNoPrimitiveNodes, setNotUsed, setPrimitiveFunction, setPrimitiveNodeSize, setRuleVariables, setSpiceHeaderLevel1, setSpiceHeaderLevel2, setSpiceHeaderLevel3, setStaticTechnology, setTechDesc, setTechName, setTechShortName, setup, toString, whatTechnology, whatTechnology, withState, writeReplace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ART_DEGREES

public static final Variable.Key ART_DEGREES
Key of Variable holding starting and ending angles. As a special case, NodeInst.checkPossibleVariableEffects() updates the node when this variable changes.


ART_MESSAGE

public static final Variable.Key ART_MESSAGE
key of Variable holding message text.


ART_COLOR

public static final Variable.Key ART_COLOR
key of Variable holding color information


ART_PATTERN

public static final Variable.Key ART_PATTERN
key of Variable holding color information


pinNode

public final PrimitiveNode pinNode
Defines a Pin node.


boxNode

public final PrimitiveNode boxNode
Defines a Box node.


crossedBoxNode

public final PrimitiveNode crossedBoxNode
Defines a Crossed-Box node.


filledBoxNode

public final PrimitiveNode filledBoxNode
Defines a Filled-Box node.


circleNode

public final PrimitiveNode circleNode
Defines a Circle node.


filledCircleNode

public final PrimitiveNode filledCircleNode
Defines a Filled-Circle node.


splineNode

public final PrimitiveNode splineNode
Defines a Spline node.


triangleNode

public final PrimitiveNode triangleNode
Defines a Triangle node.


filledTriangleNode

public final PrimitiveNode filledTriangleNode
Defines a Filled-Triangle node.


arrowNode

public final PrimitiveNode arrowNode
Defines a Arrow node.


openedPolygonNode

public final PrimitiveNode openedPolygonNode
Defines a Opened-Polygon node.


openedDottedPolygonNode

public final PrimitiveNode openedDottedPolygonNode
Defines a Opened-Dotted-Polygon node.


openedDashedPolygonNode

public final PrimitiveNode openedDashedPolygonNode
Defines a Opened-Dashed-Polygon node.


openedThickerPolygonNode

public final PrimitiveNode openedThickerPolygonNode
Defines a Opened-Thicker-Polygon node.


closedPolygonNode

public final PrimitiveNode closedPolygonNode
Defines a Closed-Polygon node.


filledPolygonNode

public final PrimitiveNode filledPolygonNode
Defines a Filled-Polygon node.


thickCircleNode

public final PrimitiveNode thickCircleNode
Defines a Thick-Circle node.


solidArc

public final ArcProto solidArc
Defines a Solid arc.


dottedArc

public final ArcProto dottedArc
Defines a Dotted arc.


dashedArc

public final ArcProto dashedArc
Defines a Dashed arc.


thickerArc

public final ArcProto thickerArc
Defines a Thick arc.


defaultLayer

public final Layer defaultLayer
the layer

Constructor Detail

Artwork

public Artwork(Generic generic,
               TechFactory techFactory)
Method Detail

tech

public static Artwork tech()
the Artwork Technology object.


getShapeOfNode

protected Poly[] getShapeOfNode(CellBackup.Memoization m,
                                ImmutableNodeInst n,
                                boolean electrical,
                                boolean reasonable,
                                Technology.NodeLayer[] primLayers)
Method to return a list of Polys that describe a given NodeInst. This method overrides the general one in the Technology object because of the unusual primitives in this Technology.

Overrides:
getShapeOfNode in class Technology
Parameters:
m - information about including cell which is necessary for computing
n - the ImmutableNodeInst that is being described.
electrical - true to get the "electrical" layers. This makes no sense for Artwork primitives.
reasonable - true to get only a minimal set of contact cuts in large contacts. This makes no sense for Artwork primitives.
primLayers - an array of NodeLayer objects to convert to Poly objects.
Returns:
an array of Poly objects.

genShapeOfNode

protected void genShapeOfNode(AbstractShapeBuilder b,
                              ImmutableNodeInst n,
                              PrimitiveNode pn,
                              Technology.NodeLayer[] primLayers)
Puts into shape builder s the polygons that describe node "n", given a set of NodeLayer objects to use. This method is overridden by specific Technologys.

Overrides:
genShapeOfNode in class Technology
Parameters:
b - shape builder where to put polygons
n - the ImmutableNodeInst that is being described.
pn - proto of the ImmutableNodeInst in this Technology
primLayers - an array of NodeLayer objects to convert to Poly objects. The prototype of this NodeInst must be a PrimitiveNode and not a Cell.

getShapeOfPort

public Poly getShapeOfPort(NodeInst ni,
                           PrimitivePort pp,
                           java.awt.geom.Point2D selectPt)
Returns a polygon that describes a particular port on a NodeInst.

Overrides:
getShapeOfPort in class Technology
Parameters:
ni - the NodeInst that has the port of interest. The prototype of this NodeInst must be a PrimitiveNode and not a Cell.
pp - the PrimitivePort on that NodeInst that is being described.
selectPt - if not null, it requests a new location on the port, away from existing arcs, and close to this point. This is useful for "area" ports such as the left side of AND and OR gates.
Returns:
a Poly object that describes this PrimitivePort graphically.

getShapeOfArc

protected void getShapeOfArc(AbstractShapeBuilder b,
                             ImmutableArcInst a)
Fill the polygons that describe arc "a".

Overrides:
getShapeOfArc in class Technology
Parameters:
b - AbstractShapeBuilder to fill polygons.
a - the ImmutableArcInst that is being described.

isEasyShape

public boolean isEasyShape(ImmutableArcInst a,
                           boolean explain)
Tells if arc can be drawn by simplified algorithm Arcs with user-specified color or pattern are not easy

Overrides:
isEasyShape in class Technology
Parameters:
a - arc to test
explain - if true then print explanation why arc is not easy
Returns:
true if arc can be drawn by simplified algorithm

fillEllipse

public static java.awt.geom.Point2D[] fillEllipse(java.awt.geom.Point2D center,
                                                  double sX,
                                                  double sY,
                                                  double startoffset,
                                                  double endangle)
Method to return an array of Point2D that describe an ellipse.

Parameters:
center - the center coordinate of the ellipse.
sX - the X size of the ellipse.
sY - the Y size of the ellipse.
startoffset - the starting angle of the ellipse, in radians.
endangle - the ending angle of the ellipse, in radians. If both startoffset and endangle are zero, draw the full ellipse.
Returns:
an array of points that describes the ellipse.

setDefaultOutline

public void setDefaultOutline(NodeInst ni)
Method to set default outline information on a NodeInst. Very few primitives have default outline information (usually just in the Artwork Technology). This method overrides the one in Technology.

Overrides:
setDefaultOutline in class Technology
Parameters:
ni - the NodeInst to load with default outline information.

fillSpline

public java.awt.geom.Point2D[] fillSpline(double cX,
                                          double cY,
                                          java.awt.geom.Point2D[] tracePoints)
Method to convert the given spline control points into a spline curve.

Parameters:
cX - the center X coordinate of the spline.
cY - the center Y coordinate of the spline.
tracePoints - the array of control point values, alternating X/Y/X/Y.
Returns:
an array of points that describes the spline.

makeGraphics

public EGraphics makeGraphics(ElectricObject eObj)
Method to create an EGraphics for an ElectricObject with color and pattern Variables.

Parameters:
eObj - the ElectricObject with graphics specifications.
Returns:
a new EGraphics that has the color and pattern.

isArtworkArc

public static boolean isArtworkArc(ArcProto p)
Method to determ if ArcProto is an Artwork primitive arc

Parameters:
p - ArcProto reference
Returns:
true if primitive belongs to the Artwork technology