CircleBrush
See
Extends
Constructors
new CircleBrush()
new CircleBrush(
canvas
):CircleBrush
Parameters
• canvas: Canvas
Returns
Overrides
Defined in
Properties
canvas
canvas:
Canvas
Todo
add type
Inherited from
Defined in
color
color:
string
='rgb(0, 0, 0)'
Color of a brush
Default
Inherited from
Defined in
limitedToCanvasSize
limitedToCanvasSize:
boolean
=false
When true
, the free drawing is limited to the whiteboard size. Default to false.
Default
Inherited from
Defined in
points
points:
CircleBrushPoint
[]
Defined in
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
Defined in
strokeDashArray
strokeDashArray:
null
|number
[] =null
Stroke Dash Array.
Default
Inherited from
Defined in
strokeLineCap
strokeLineCap:
CanvasLineCap
='round'
Line endings style of a brush (one of “butt”, “round”, “square”)
Default
Inherited from
Defined in
strokeLineJoin
strokeLineJoin:
CanvasLineJoin
='round'
Corner style of a brush (one of “bevel”, “round”, “miter”)
Default
Inherited from
Defined in
strokeMiterLimit
strokeMiterLimit:
number
=10
Maximum miter length (used for strokeLineJoin = “miter”) of a brush’s
Default
Inherited from
Defined in
width
width:
number
=10
Width of a brush
Default
Overrides
Defined in
Methods
addPoint()
addPoint(
pointer
):CircleBrushPoint
Parameters
• pointer: Point
Returns
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
drawDot()
drawDot(
pointer
):void
Invoked inside on mouse down and mouse move
Parameters
• pointer: Point
Returns
void
Defined in
onMouseDown()
onMouseDown(
pointer
):void
Invoked on mouse down
Parameters
• pointer: Point
Returns
void
Overrides
Defined in
onMouseMove()
onMouseMove(
pointer
):void
Invoked on mouse move
Parameters
• pointer: Point
Returns
void
Overrides
Defined in
onMouseUp()
onMouseUp():
void
Invoked on mouse up
Returns
void