Skip to content

CanvasGridLineSet

Overview

Copy/paste of GridLineSet that renders to canvas. Note, these 2 files should be maintained together, to keep as similar an API as possible.

@author Sam Reid (PhET Interactive Simulations)

Class CanvasGridLineSet

import { CanvasGridLineSet } from 'scenerystack/bamboo';

Constructor

new CanvasGridLineSet( chartTransform : ChartTransform, axisOrientation : Orientation, spacing : number, providedOptions? : CanvasGridLineSetOptions )

Instance Methods

setSpacing( spacing : number )

setLineDashOffset( lineDashOffset : number )

paintCanvas( context : CanvasRenderingContext2D )

Type CanvasGridLineSetOptions

import type { CanvasGridLineSetOptions } from 'scenerystack/bamboo';

Source Code

See the source for CanvasGridLineSet.ts in the bamboo repository.