Class SprayBrush

See

demo

Hierarchy

Constructors

Properties

canvas: Canvas

Todo

add type

color: string = 'rgb(0, 0, 0)'

Color of a brush

Default


density: number = 20

Density of a spray (number of dots per chunk)

Default


dotWidth: number = 1

Width of spray dots

Default


dotWidthVariance: number = 1

Width variance of spray dots

Default


limitedToCanvasSize: boolean = false

When true, the free drawing is limited to the whiteboard size. Default to false.

Default

false
optimizeOverlapping: boolean = true

Whether overlapping dots (rectangles) should be removed (for performance reasons)

Default


randomOpacity: boolean = false

Whether opacity of a dot should be random

Default


shadow: null | Shadow = null

Shadow object representing shadow of this shape. Backwards incompatibility note: This property replaces "shadowColor" (String), "shadowOffsetX" (Number), "shadowOffsetY" (Number) and "shadowBlur" (Number) since v1.2.12

Default


sprayChunk: SprayBrushPoint[]
sprayChunks: SprayBrushPoint[][]
strokeDashArray: null | number[] = null

Stroke Dash Array.

Default


strokeLineCap: CanvasLineCap = 'round'

Line endings style of a brush (one of "butt", "round", "square")

Default


strokeLineJoin: CanvasLineJoin = 'round'

Corner style of a brush (one of "bevel", "round", "miter")

Default


strokeMiterLimit: number = 10

Maximum miter length (used for strokeLineJoin = "miter") of a brush's

Default


width: number = 10

Width of a spray

Default


Methods

Generated using TypeDoc