Class BaseBrushAbstract

See

demo

Hierarchy

Constructors

Properties

canvas: Canvas

Todo

add type

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

Color of a brush

Default


limitedToCanvasSize: boolean = false

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

Default

false
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


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 = 1

Width of a brush, has to be a Number, no string literals

Default


Methods

  • Private

    Check is pointer is outside canvas boundaries

    Parameters

    Returns boolean

  • Private

    Sets the transformation on given context

    Parameters

    • ctx: CanvasRenderingContext2D

      context to render on

    Returns void

  • Private

    Sets brush styles

    Parameters

    • ctx: CanvasRenderingContext2D

    Returns void

Generated using TypeDoc