next up previous contents index
Next: Ghost Rendering Up: Main Functions 1 Previous: Exit   Contents   Index

Annotation

(int) AddMark(type, arguments ...)
This function will add a ``user mark'' to a display list, which is rendered as highlighting in the current cell. These can be used for illustrative purposes. The marks are not included in the design database, but are persistent to the current cell and are remembered as long as the current cell exists in memory. Any call can have associated marks, whether electrical or physical. Marks are shown in any window displaying the cell as the top level. Marks are not shown in expanded subcells.

The arguments that follow the type argument vary depending upon the type. The type argument can be an integer code, or a string whose first character signifies the type. The return value, if nonzero, is a unique mark id, which can be passed to EraseMark to erase the mark. A zero return indicates that an error occurred.

The table below describes the marks available. All coordinates and dimensions are in microns, in the coordinate system of the current cell. Each mark takes an optional attribute argument, which is an integer whose set bits indicate a display property. These bits are

bit 0: Draw with a textured (dashed) line if set, otherwise use a solid line.
bit 1: Cause the mark to blink, using the selection colors.
bit 2: Render the mark in an alternate color (bit 1 is ignored).

Type: 1 or "l"
Arguments: x1, y1, x2, y2 [, attribute]
Draw a line segment from x1,y1 to x2,y2.

Type: 2 or "b"
Arguments: l, b, r, t [, attribute]
Draw an open box, l,b is lower-left corner and r,t is upper-right corner.

Type: 3 or "u"
Arguments: xl, xr, yb [, yt, attribute]
Draw an open triangle. The two base vertices are xl, yb and xr,yb. The third vertex is ( xl+xr)/2,yt. If yt is not given, it is set to make the triangle equilateral.

Type: 4 or "t"
Arguments: yl, yu, xb [, xt, attribute]
Draw an open triangle. The two lower vertices are xb, yl and xb,yu. The third vertex is xt,(yl+yu)/2. If xt is not given, it is set to make the triangle equilateral.

Type: 5 or "c"
Arguments: xc, yc, rad [, attribute]
Draw a circle of radius rad centered at xc,yc.

Type: 6 or "e"
Arguments: xc, yc, rx, ry [, attribute]
Draw an ellipse centered at xc,yc using radii rx and ry.

Type: 7 or "p"
Arguments: numverts, xy_array [, attribute]
Draw an open polygon or path. The number of vertices is given first, followed by an array of size 2*numverts or larger that contains the vertex coordinates as x-y pairs. For a polygon, The vertex list should be closed, i.e., the first and last vertices listed (and counted) should be the same.

Type: 8 or "s"
Arguments: string, x, y [, width, height, xform, attribute]
Draw a text string. The string is followed by the coordinates of the reference point, which for default justification is the lower-left corner of the bounding box. The width, height, and xform arguments are analogous to those of the Label script function, providing the rendering size and justification and transformation information. Unlike the Label function, the settings of the Justify and UseTransform functions are ignored, transformation and justification must be set through the xform argument.

(int) EraseMark(id)
Remove a mark from the ``user marks'' display list. The argument is the id number returned from AddMark. If zero is passed instead, all marks will be erased. The return value is 1 if any marks were erased.

(int) DumpMarks(filename)
This function will save the marks currently defined in the current cell to a file. If the argument is null or empty (or scalar 0), a file name will be composed: cellname.mode.marks, where mode is ``phys'' or ``elec''. The return is the number of marks written, or -1 if error. On error, a message may be available from GetError. If 0, no file was produced, as no marks were found.

(int) ReadMarks(filename)
This function will read the marks found in a file into the current cell. The file must be in the format produced by DumpMarks, and apply to the same name and display mode as the current cell. A null or empty or 0 argument will imply a cell name composed as described for DumpMarks The return value is the number of marks read, or -1 if error. On error, a message may be available from GetEreror.


next up previous contents index
Next: Ghost Rendering Up: Main Functions 1 Previous: Exit   Contents   Index
Stephen R. Whiteley 2017-11-08