next up previous contents index
Next: Ghost Rendering Up: Control Functions 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, and will disappear when a new current cell is chosen. 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 "t"
Arguments: xl, xr, yl [, yu, attribute]
Draw an open triangle. The two lower vertices are xl, yl and xr,yl. The third vertex is ( xl+xr)/2,yu. If yu is not given, it is set to make the triangle equilateral.

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

Type: 5 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: 6 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.


next up previous contents index
Next: Ghost Rendering Up: Control Functions Previous: Exit   Contents   Index
Stephen R. Whiteley 2006-10-23