跳转到内容

CircleBrush

See

demo

Extends

Constructors

new CircleBrush()

new CircleBrush(canvas): CircleBrush

Parameters

canvas: Canvas

Returns

CircleBrush

Overrides

BaseBrush.constructor

Defined in

src/brushes/CircleBrush.ts:22

Properties

canvas

canvas: Canvas

Todo

add type

Inherited from

BaseBrush.canvas

Defined in

src/brushes/BaseBrush.ts:73


color

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

Color of a brush

Default

Inherited from

BaseBrush.color

Defined in

src/brushes/BaseBrush.ts:16


limitedToCanvasSize

limitedToCanvasSize: boolean = false

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

Default

false

Inherited from

BaseBrush.limitedToCanvasSize

Defined in

src/brushes/BaseBrush.ts:68


points

points: CircleBrushPoint[]

Defined in

src/brushes/CircleBrush.ts:20


shadow

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

Inherited from

BaseBrush.shadow

Defined in

src/brushes/BaseBrush.ts:32


strokeDashArray

strokeDashArray: null | number[] = null

Stroke Dash Array.

Default

Inherited from

BaseBrush.strokeDashArray

Defined in

src/brushes/BaseBrush.ts:60


strokeLineCap

strokeLineCap: CanvasLineCap = 'round'

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

Default

Inherited from

BaseBrush.strokeLineCap

Defined in

src/brushes/BaseBrush.ts:39


strokeLineJoin

strokeLineJoin: CanvasLineJoin = 'round'

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

Default

Inherited from

BaseBrush.strokeLineJoin

Defined in

src/brushes/BaseBrush.ts:46


strokeMiterLimit

strokeMiterLimit: number = 10

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

Default

Inherited from

BaseBrush.strokeMiterLimit

Defined in

src/brushes/BaseBrush.ts:53


width

width: number = 10

Width of a brush

Default

Overrides

BaseBrush.width

Defined in

src/brushes/CircleBrush.ts:18

Methods

addPoint()

addPoint(pointer): CircleBrushPoint

Parameters

pointer: Point

Returns

CircleBrushPoint

Just added pointer point

Defined in

src/brushes/CircleBrush.ts:128


dot()

dot(ctx, point): void

Parameters

ctx: CanvasRenderingContext2D

point: CircleBrushPoint

Returns

void

Defined in

src/brushes/CircleBrush.ts:39


drawDot()

drawDot(pointer): void

Invoked inside on mouse down and mouse move

Parameters

pointer: Point

Returns

void

Defined in

src/brushes/CircleBrush.ts:31


onMouseDown()

onMouseDown(pointer): void

Invoked on mouse down

Parameters

pointer: Point

Returns

void

Overrides

BaseBrush.onMouseDown

Defined in

src/brushes/CircleBrush.ts:50


onMouseMove()

onMouseMove(pointer): void

Invoked on mouse move

Parameters

pointer: Point

Returns

void

Overrides

BaseBrush.onMouseMove

Defined in

src/brushes/CircleBrush.ts:75


onMouseUp()

onMouseUp(): void

Invoked on mouse up

Returns

void

Overrides

BaseBrush.onMouseUp

Defined in

src/brushes/CircleBrush.ts:91