BaseBrush
See
Extended by
Constructors
new BaseBrush()
new BaseBrush(
canvas
):BaseBrush
Parameters
• canvas: Canvas
Returns
Defined in
Properties
canvas
canvas:
Canvas
Todo
add type
Defined in
color
color:
string
='rgb(0, 0, 0)'
Color of a brush
Default
Defined in
limitedToCanvasSize
limitedToCanvasSize:
boolean
=false
When true
, the free drawing is limited to the whiteboard size. Default to false.
Default
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
Defined in
strokeDashArray
strokeDashArray:
null
|number
[] =null
Stroke Dash Array.
Default
Defined in
strokeLineCap
strokeLineCap:
CanvasLineCap
='round'
Line endings style of a brush (one of “butt”, “round”, “square”)
Default
Defined in
strokeLineJoin
strokeLineJoin:
CanvasLineJoin
='round'
Corner style of a brush (one of “bevel”, “round”, “miter”)
Default
Defined in
strokeMiterLimit
strokeMiterLimit:
number
=10
Maximum miter length (used for strokeLineJoin = “miter”) of a brush’s
Default
Defined in
width
width:
number
=1
Width of a brush, has to be a Number, no string literals
Default
Defined in
Methods
_render()
abstract
_render():void
Returns
void
Defined in
onMouseDown()
abstract
onMouseDown(pointer
,ev
):void
Parameters
• pointer: Point
• ev: TBrushEventData
Returns
void
Defined in
onMouseMove()
abstract
onMouseMove(pointer
,ev
):void
Parameters
• pointer: Point
• ev: TBrushEventData
Returns
void
Defined in
onMouseUp()
abstract
onMouseUp(ev
):boolean
|void
Parameters
• ev: TBrushEventData
Returns
boolean
| void
true if brush should continue blocking interaction