GridBackgroundNode¶
Overview¶
Displays a background for a given GridConstraint.
NOTE: If there are "holes" in the GridBox/GridConstraint (where there is no cell content for an x/y position), then there will be no background for where those cells (if added) would have been.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class GridBackgroundNode¶
Constructor¶
new GridBackgroundNode( constraint : GridConstraint, providedOptions? : GridBackgroundNodeOptions )¶
Instance Methods¶
dispose()¶
Releases references
Type GridBackgroundNodeOptions¶
- createCellBackground?: CreateCellBackground
Allows full customization of the background for each cell. The cell is passed in, and can be used in any way to generate the background.cell.lastAvailableBounds
is the bounds to provide.cell.position.horizontal
andcell.position.vertical
are the row and column indices of the cell.cell.size
can also be used. - fill?: TPaint
If no createCellBackground is provided, these will be used for the fill/stroke of the Rectangle created for the cells. - stroke?: TPaint
- & NodeOptions
Source Code¶
See the source for GridBackgroundNode.ts in the scenery repository.