Skip to content

Paintable

Under Construction

This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/scenery/blob/main/js/nodes/Paintable.ts for the most up-to-date information.

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.