DrawGrid is used by Plotter to draw the grid lines on a graph. It can however also be used to draw GridLines on any UserView and could even be used to add grid lines to UserViews behind sliders or in any GUI.
Note that DrawGrid does not hold any reference to the UserView but is meant to have its .draw method called inside of the UserView's drawFunc. It only needs to know what bounds the grid lines should be drawn within and what the horizontal and vertical GridLines are.
bounds |
The bounds describing the extents of the grid (not including any labels). Multiple DrawGrid may be used to draw grids on a single UserView. |
horzGrid |
A GridLines, BlankGridLines or GridLines subclass. |
vertGrid |
A GridLines, BlankGridLines or GridLines subclass. |
A DrawGrid.
For testing new GridLines objects.
horzGrid |
A GridLines object or subclass. |
vertGrid |
A GridLines object or subclass. |
bounds |
Bounds describing the extents of the grid (not including any labels) within the parent view. Can be a Point or Rect. Default: |
A DrawGrid.
This draws to the currently active UserView. This method is meant to be called from inside the drawFunc of a UserView.
nil
Get/set bounds describing the extents of the grid (not including any labels).
b |
A Rect. |
A Rect.
Set the colors of the grid lines for each axis.
colors |
An Array of two colors for the x and y grid lines, respectively. |
Self.
Get/set opacity.
A Float.
Set the line dash pattern. pattern should be a FloatArray of values that specify the lengths of the painted segments and not painted segments. See Pen: *lineDash.
Self.
A DrawGridX object that draws the x (horizontal) axis. In general you shouldn't need to set this.
A DrawGridX.
A DrawGridY object that draws the y (vertical) axis. In general you shouldn't need to set this.
A DrawGridY.