Grid
(Engine-Level Function)
Description: | Places a (lined) grid pattern on the screen. |
Returns: | Nothing |
Usage: | Steady State only. |
Function Groups: | Graphics |
Related to: | Box | GUIRectangle| Line | ZBox | ZGrid |
Format: | Grid(X1, Y1, X2, Y2, Style, Color, Horizontal, Vertical) |
Parameters: |
X1 |
Required. Any numeric expression giving the X coordinate on the screen of one side of the grid area. |
Y1 |
Required. Any numeric expression giving the Y coordinate on the screen of either the top or bottom of the grid area. |
X2 |
Required. Any numeric expression giving the X coordinate on the screen of the side of the grid area opposite to X1. |
Y2 |
Required. Any numeric expression giving the Y coordinate on the screen of either the top or bottom of the grid area, whichever is the opposite to Y1. |
Style |
Required. Any numeric expression giving the line style for the grid lines. Valid line styles are from 1 to 10, where 1 is a solid line. |
Color |
Required. Any numeric expression giving the color of the grid lines. If the number is less than 10000, the grid lines are non-destructive. If greater than or equal to 10000, the grid lines are destructive and the actual color used is Color - 10000. RGB values and system color constants are not supported. |
Horizontal |
Required. Any numeric expression giving the number of horizontal lines in the grid. This value may be zero. |
Vertical |
Required. Any numeric expression giving the number of vertical lines in the grid. This value may be zero. |
Comments | This statement is non-destructive unless Color is explicitly set destructive. The outside perimeter of the grid area is not drawn. |
Example:
Grid(100, 100, 700, 500 { Bounding box for the grid }, 3 { Dotted line style }, 9 { Light blue color }, 3 { 3 horizontal lines divide 4 areas }, 5 { 5 vertical lines divide 6 areas });
This example divides an area into 6 blocks wide by 4 blocks high using 3 horizontal lines and 5 vertical lines.