RulerNode¶
Overview¶
RulerNode is the visual representation of a ruler.
@author Chris Malley (PixelZoom, Inc.)
Class RulerNode¶
Constructor¶
new RulerNode( rulerWidth : number, rulerHeight : number, majorTickWidth : number, majorTickLabels : string[], units : string | TReadOnlyProperty<string>, providedOptions? : RulerNodeOptions )¶
Instance Methods¶
dispose()¶
Static Properties¶
DEFAULT_FILL¶
(readonly)
Type RulerNodeOptions¶
- backgroundFill?: TColor
body of the ruler - backgroundStroke?: TColor
- backgroundLineWidth?: number
- insetsWidth?: number
- majorTickFont?: Font
major tick options - majorTickHeight?: number
- majorTickStroke?: TColor
- majorTickLineWidth?: number
- minorTickFont?: Font
minor tick options - minorTickHeight?: number
- minorTickStroke?: TColor
- minorTickLineWidth?: number
- minorTicksPerMajorTick?: number
- unitsFont?: Font
units options - unitsMajorTickIndex?: number
- unitsSpacing?: number
- tickMarksOnTop?: boolean
appearance options - tickMarksOnBottom?: boolean
- & NodeOptions
Source Code¶
See the source for RulerNode.ts in the scenery-phet repository.