next up previous contents index
Next: Layers Up: Geometry Creation and Management Previous: Current Transform   Contents   Index

Grid

(int) ShowGrid(on, win)
This function sets whether or not the grid is shown in a window. If the first argument is nonzero, the grid will be shown, otherwise the grid will not be shown. The second argument is an integer representing the drawing window: 0 for the main window, and 1-4 for subwindows. The change will not be visible until the window is redrawn (one can call Redraw). If success, 1 is returned, or 0 is returned if the window does not exist.

(int) ShowAxes(style, win)
This function sets the axes presentation style in physical mode windows. The first argument is an integer 0-2, where 0 suppresses drawing of axes, 1 indicates plain axes, and 2 (or anything else) indicates axes with a box at the origin. The second argument is an integer representing the drawing window: 0 for the main window, 1-4 for subwindows. Axes are never shown in electrical mode windows. On success, 1 is returned. If the window does not exist or is not showing a physical view, 0 is returned. The change will not be visible until the window is redrawn (one can call Redraw).

(int) SetGrid(interval, snap, win)
This function sets the grid parameters for the window indicated by the third argument, which is 0 for the main window or 1-4 for the subwindows. The interval argument sets the grid line spacing, in microns. The snap number supplies the number of snap points per grid interval if positive, or the number of grid intervals per snap point if negative. Values from -10 - 10 are accepted for this parameter. Values of 0.01 or larger are valid for the interval, if not 0. Either argument can be 0, in which case the present parameter is retained. The function fails if the window argument does not correspond to an existing window.

The function does not redraw the window. The Redraw function can be called to redraw the window if necessary.

(real) GetGridInterval(win)
This function returns the grid interval in microns for the grid in the window indicated by the argument, which is 0 for the main window or 1-4 for the subwindows. The function fails if the argument does not correspond to an existing window.

(int) GetGridSnap(win)
This function returns the snap number for the grid in the window specified by the argument, which is 0 for the main window or 1-4 for the subwindows. The snap number determines the number of snap coordinates between grid intervals if positive, or grid intervals per snap coordinate if negative. The function fails if the argument does not correspond to an existing window.

(int) SetGridStyle(style, win)
This function sets the line style used for grid rendering. The first argument is an integer mask that defines the on-off pattern. The pattern starts at the most significant `1' bit and continues through the least significant bit, and repeats. Set bits are rendered as the visible part of the pattern. If the style is 0, a dot is shown at each grid point. Passing -1 will give continuous lines. The second argument is an integer representing the drawing window: 0 for the main window, 1-4 for subwindows. The function returns 1 on success, 0 if the window does not exist. The change will not be visible until the window is redrawn (one can call Redraw).

(int) GetGridStyle(win)
This function returns the line style mask used for rendering the grid in the given window. The mask has the interpretation described in the description of SetGridStyle. The argument is an integer representing the window: 0 for the main window, and 1-4 for subwindows. If the window does not exist, 0 is returned.

(int) SetGridOnTop(ontop, win)
This function sets whether the grid is shown above or below rendered objects. If the first argument is nonzero, the grid will be shown above rendered objects. The second argument is an integer representing the drawing window: 0 for the main window and 1-4 for subwindows. The function returns 1 on success, 0 if the window does not exist. The change will not be visible until the window is redrawn (one can call Redraw).

(int) GetGridOnTop(win)
This function returns 1 is the grid is shown on top of objects. The argument is an integer representing the drawing window: 0 for the main window and 1-4 for subwindows. If the grid is shown below rendered objects, 0 is returned. If the window does not exist, -1 is returned.

(int) ClipToGrid(coord, win)
The first argument to this function is a coordinate in microns. The return value is the coordinate, in microns, snapped to the nearest snap point of the grid of the window given in the second argument. The second argument is 0 for the main window, or 1-4 for the subwindows. The function fails if the window argument does not correspond to an existing window.


next up previous contents index
Next: Layers Up: Geometry Creation and Management Previous: Current Transform   Contents   Index
Stephen R. Whiteley 2006-10-23