next up previous contents index
Next: Current Layer Up: Main Functions 3 Previous: Grid and Edge Snapping   Contents   Index

Grid Style

(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 sub-windows. 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 sub-windows. 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) 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 sub-windows. 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 sub-windows. If the window does not exist, 0 is returned.

(int) SetGridCrossSize(xsize, win)
This applies only to grids with style 0 (dot grid). The xsize is an integer 0-6 which indicates the number of pixels to draw in the four compass directions around the central pixel. Thus, for nonzero values, the ``dot'' is rendered as a small cross. 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 or the style is nonzero. The change will not be visible until the window is redrawn (one can call Redraw).

(int) GetGridCrossSize(win)
This returns an integer 0-6, which will be nonzero only for grid style 0 (dot grid), and if the ``dots'' are being rendered as small crosses via a call to SetGridCrossSize or otherwise. 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 sub-windows. 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 sub-windows. If the grid is shown below rendered objects, 0 is returned. If the window does not exist, -1 is returned.

(int) SetGridCoarseMult(mult, win)
This sets the number of fine grid lines per coarse grid line. The first argument is an integer 1-50 that provides this multiple (it is clipped to this range). If 1, the coarse grid color is used for all grid lines. The second argument represents the drawing window whose grid is being changed, 0 for the main drawing window, and 1-4 for sub-windows. The change will not be visible until the window is redrawn (one can call Redraw()).

The return value is 1 on success, 0 if the window does not exist.

(int) GetGridCoarseMult(win)
This returns the number of fine grid lines per coarse grid interval, as being used in the drawing window indicated by the argument. The argument is 0 for the main drawing window, 1-4 for sub-windows. If the window does not exist, zero is returned.

(int) SaveGrid(regnum, win)
This will save a grid parameter set to a register. The first argument is a register index value 0-7. Register 0 is used internally for the ``last'' value whenever grid parameters are changed, so is probably not a good choice unless this behavior is expected. These are the same registers as used with the Grid Setup panel, and are associated with the PhysGridReg and ElecGridReg keyword families in the technology file.

The second argument represents the drawing window whose grid parameters are to be saved. The value is 0 for the main drawing window, and 1-4 for sub-windows. Note that separate registers exist for electrical and physical mode, so register numbers can be reused in the two modes.

The return value is 1 on success, 0 if the indicated window does not exist, or the register value is out of range.

(int) RecallGrid(regnum, win)
This will recall a grid parameter set from a register, and update the grid of a drawing window. The first argument is a register index value 0-7. Register 0 is used internally for the ``last'' value whenever grid parameters are changed, so is probably not a good choice unless this behavior is expected. These are the same registers as used with the Grid Setup panel, and are associated with the PhysGridReg and ElecGridReg keyword families in the technology file.

The second argument represents the drawing window whose grid parameters are to be saved. The value is 0 for the main drawing window, and 1-4 for sub-windows. Note that separate registers exist for electrical and physical mode, so register numbers can be reused in the two modes.

The return value is 1 on success, 0 if the indicated window does not exist. The change will not be visible until the window is redrawn (one can call Redraw()).


next up previous contents index
Next: Current Layer Up: Main Functions 3 Previous: Grid and Edge Snapping   Contents   Index
Stephen R. Whiteley 2017-03-22