Skip to content

Paintable

Overview

Trait for Nodes that support a standard fill and/or stroke (e.g. Text, Path and Path subtypes).

@author Jonathan Olson <jonathan.olson@colorado.edu>

Type PaintableNode

Workaround type since we can't detect mixins in the type system well

import type { PaintableNode } from 'scenerystack/scenery';

Path | Text

Type PaintableOptions

import type { PaintableOptions } from 'scenerystack/scenery';
  • fill?: TPaint
  • fillPickable?: boolean
  • stroke?: TPaint
  • strokePickable?: boolean
  • lineWidth?: number
  • lineCap?: LineCap
  • lineJoin?: LineJoin
  • miterLimit?: number
  • lineDash?: number[]
  • lineDashOffset?: number
  • cachedPaints?: TPaint[]

Source Code

See the source for Paintable.ts in the scenery repository.