Skip to content

CircleBrush

Defined in: src/brushes/CircleBrush.ts:12

See

demo

Extends

Constructors

new CircleBrush()

new CircleBrush(canvas): CircleBrush

Defined in: src/brushes/CircleBrush.ts:22

Parameters

canvas

Canvas

Returns

CircleBrush

Overrides

BaseBrush.constructor

Properties

canvas

canvas: Canvas

Defined in: src/brushes/BaseBrush.ts:73

Todo

add type

Inherited from

BaseBrush.canvas


color

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

Defined in: src/brushes/BaseBrush.ts:16

Color of a brush

Default

Inherited from

BaseBrush.color


limitedToCanvasSize

limitedToCanvasSize: boolean = false

Defined in: src/brushes/BaseBrush.ts:68

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

Default

false

Inherited from

BaseBrush.limitedToCanvasSize


points

points: CircleBrushPoint[]

Defined in: src/brushes/CircleBrush.ts:20


shadow

shadow: null | Shadow = null

Defined in: src/brushes/BaseBrush.ts:32

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

Inherited from

BaseBrush.shadow


strokeDashArray

strokeDashArray: null | number[] = null

Defined in: src/brushes/BaseBrush.ts:60

Stroke Dash Array.

Default

Inherited from

BaseBrush.strokeDashArray


strokeLineCap

strokeLineCap: CanvasLineCap = 'round'

Defined in: src/brushes/BaseBrush.ts:39

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

Default

Inherited from

BaseBrush.strokeLineCap


strokeLineJoin

strokeLineJoin: CanvasLineJoin = 'round'

Defined in: src/brushes/BaseBrush.ts:46

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

Default

Inherited from

BaseBrush.strokeLineJoin


strokeMiterLimit

strokeMiterLimit: number = 10

Defined in: src/brushes/BaseBrush.ts:53

Maximum miter length (used for strokeLineJoin = “miter”) of a brush’s

Default

Inherited from

BaseBrush.strokeMiterLimit


width

width: number = 10

Defined in: src/brushes/CircleBrush.ts:18

Width of a brush

Default

Overrides

BaseBrush.width

Methods

addPoint()

addPoint(pointer): CircleBrushPoint

Defined in: src/brushes/CircleBrush.ts:128

Parameters

pointer

Point

Returns

CircleBrushPoint

Just added pointer point


dot()

dot(ctx, point): void

Defined in: src/brushes/CircleBrush.ts:39

Parameters

ctx

CanvasRenderingContext2D

point

CircleBrushPoint

Returns

void


drawDot()

drawDot(pointer): void

Defined in: src/brushes/CircleBrush.ts:31

Invoked inside on mouse down and mouse move

Parameters

pointer

Point

Returns

void


onMouseDown()

onMouseDown(pointer): void

Defined in: src/brushes/CircleBrush.ts:50

Invoked on mouse down

Parameters

pointer

Point

Returns

void

Overrides

BaseBrush.onMouseDown


onMouseMove()

onMouseMove(pointer): void

Defined in: src/brushes/CircleBrush.ts:75

Invoked on mouse move

Parameters

pointer

Point

Returns

void

Overrides

BaseBrush.onMouseMove


onMouseUp()

onMouseUp(): void

Defined in: src/brushes/CircleBrush.ts:91

Invoked on mouse up

Returns

void

Overrides

BaseBrush.onMouseUp