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.Distance, Technology.DistanceContext, Technology.DistanceRule, Technology.MultiCutData, Technology.NodeLayer, Technology.SizeCorrector, Technology.TechPoint, Technology.TechSetting
 
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
cachedRules, DISK_VERSION_1, DISK_VERSION_2, EMPTY_CONTEXT, EMPTY_LIST, factoryNodeGroups, foundries, LAYERS_BY_HEIGHT, LAYERS_BY_HEIGHT_LIFT_CONTACTS, LAYERS_BY_ZVALUE, N_TYPE, nodeGroups, NULL_ARRAY, oldArcNames, oldNodeNames, P_TYPE, SPECIALMENUCELL, SPECIALMENUEXPORT, SPECIALMENUHIGH, SPECIALMENUMISC, SPECIALMENUPORT, SPECIALMENUPURE, SPECIALMENUSPICE, SPECIALMENUTEXT, sysArtwork, sysFPGA, sysGeneric, sysSchematics, TECH_TMPVAR, TRANS_CONTACT, xmlTech
 
Constructor Summary
Artwork(Generic generic)
           
 
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.
 java.lang.Object[][] getDefaultNodesGrouped()
          Method to construct a default group of elements for the palette.
 java.lang.Object[][] getNodesGrouped(Cell curCell)
          Method to compute the component menu entries automatically.
protected  void getShapeOfArc(AbstractShapeBuilder b, ImmutableArcInst a)
          Fill the polygons that describe arc "a".
protected  Poly[] getShapeOfNode(NodeInst ni, boolean electrical, boolean reasonable, Technology.NodeLayer[] primLayers, Layer layerOverride)
          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
static boolean isFilledArrowHeads()
          Method to tell whether arrow heads are filled-in.
static 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 void setFilledArrowHeads(boolean f)
          Method to set whether arrow heads are filled-in.
static Artwork tech()
          the Artwork Technology object.
 
Methods inherited from class com.sun.electric.technology.Technology
addArcProto, addLayer, addNodeProto, cacheTransparentLayerColors, cleanUnusedNodesInLibrary, compareTo, computeShapeOfNode, convertOldArcName, convertOldNodeName, convertOldPortName, convertOldVariable, dump, dumpExtraProjectSettings, filterNodeGroups, findArcProto, findFoundry, findLayer, findLayerFromFunction, findNodeProto, findTechnology, findTechnology, getArcProto, getArcs, getArcsCollection, getCachedRules, getCMOS90Technology, getColorMap, getColorMap, getCurrent, getDiffAlpha, getDiffAlphaSetting, getFactoryColorMap, getFactoryDesignRules, getFoundries, getGateCapacitance, getGateCapacitanceSetting, getGateIncludedSetting, getGateLengthSubtraction, getGateLengthSubtractionSetting, getGDSLayers, getGroundNetIncludedSetting, getId, getIndex, getLayer, getLayerFromOverride, getLayers, getLayersSortedByHeight, getLayersSortedByZValue, getMaxSeriesResistance, getMaxSeriesResistanceSetting, getMinCapacitance, getMinCapacitanceSetting, getMinResistance, getMinResistanceSetting, getMocmosTechnology, getMultiCutData, getNodeInstBaseRectangle, getNodes, getNodesCollection, getNodesGroupedXML, getNodesSortedByName, getNumArcs, getNumLayers, getNumMetals, getNumMetalsSetting, getNumNodes, getNumTransparentLayers, getOldArcNames, getOldNodeNames, getPrefComponentMenu, getPrefFoundry, getPrefFoundrySetting, getPrimitiveFunction, getPrimitiveNode, getProjectSettings, getResistorSize, getResolution, getRuleAliases, getRuleDifferences, getRuleNodeIndex, getRuleSuffix, getSavedLayerOrder, getScale, getScaleSetting, getScaleVariableName, getSelectedFoundry, getShapeOfArc, getShapeOfArc, getShapeOfArc, getShapeOfNode, getShapeOfNode, getShapeOfPort, getSizeCorrector, getSoftTechnologies, getSpacingDistances, getSpiceHeaderLevel1, getSpiceHeaderLevel2, getSpiceHeaderLevel3, getTechDesc, getTechName, getTechnologies, getTechnologyPreferences, getTechShortName, getTransistorActiveLength, getTransistorAltGatePort, getTransistorBasePort, getTransistorBiasPort, getTransistorCollectorPort, getTransistorDrainPort, getTransistorEmitterPort, getTransistorGatePort, getTransistorSize, getTransistorSourcePort, getTSMC180Technology, getWireRatio, getWireRatioSetting, getXmlTech, initAllTechnologies, isGateIncluded, isGroundNetIncluded, isLayout, isMultiCutCase, isMultiCutInTechnology, isNoDirectionalArcs, isNoNegatedArcs, isNonElectrical, isNonStandard, isNoPrimitiveNodes, isScaleRelevant, isSchematics, isStaticTechnology, isUniversalConnectivityPort, isValidVTPolyRule, make3d, makeNodeInst, makeNodeInst, makeRuleSets, makeXml, makeXml807, newArcProto, newFoundry, printlnBits, printlnSetting, resizeArcs, resizeXml, sameLayer, setArcCorrection, setCachedRules, setColorMap, setColorMapFromLayers, setCurrent, setFactoryLESettings, setFactoryParasitics, setFactoryResolution, setFactoryScale, setFactoryTransparentLayers, setNodesGrouped, setNoDirectionalArcs, setNoNegatedArcs, setNonElectrical, setNonStandard, setNoPrimitiveNodes, setNotUsed, setNumTransparentLayers, setPrimitiveFunction, setPrimitiveNodeSize, setResolution, setRuleVariables, setSavedLayerOrder, setSoftTechnologies, setSpiceHeaderLevel1, setSpiceHeaderLevel2, setSpiceHeaderLevel3, setState, setStaticTechnology, setTechDesc, setTechName, setTechShortName, setup, toString, whatTechnology, whatTechnology, 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)
Method Detail

tech

public static Artwork tech()
the Artwork Technology object.


getNodesGrouped

public java.lang.Object[][] getNodesGrouped(Cell curCell)
Method to compute the component menu entries automatically.

Overrides:
getNodesGrouped in class Technology
Parameters:
curCell - the current cell being displayed (may affect the palette).
Returns:
a two-dimensional array of menu entries.

getDefaultNodesGrouped

public java.lang.Object[][] getDefaultNodesGrouped()
Method to construct a default group of elements for the palette.

Overrides:
getDefaultNodesGrouped in class Technology
Returns:
the default set of objects to display in the component menu.

getShapeOfNode

protected Poly[] getShapeOfNode(NodeInst ni,
                                boolean electrical,
                                boolean reasonable,
                                Technology.NodeLayer[] primLayers,
                                Layer layerOverride)
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:
ni - the NodeInst to describe.
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.
layerOverride - the layer to use for all generated polygons (if not null).
Returns:
an array of Poly objects.

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 static 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

isFilledArrowHeads

public static boolean isFilledArrowHeads()
Method to tell whether arrow heads are filled-in.

Returns:
true if arrow heads are filled-in.

setFilledArrowHeads

public static void setFilledArrowHeads(boolean f)
Method to set whether arrow heads are filled-in.

Parameters:
f - true if arrow heads are filled-in.