Extends
Members
color :String
Color of a brush
画笔的颜色
Type:
- String
- Inherited From:
- Default Value:
- rgb(0, 0, 0)
- Source:
limitedToCanvasSize :Boolean
When `true`, the free drawing is limited to the whiteboard size. Default to false.
当为“true”时,自由绘图将被限制在白板大小内。默认为false。
Type:
- Boolean
- Inherited From:
- Default Value:
- false
- Source:
shadow :fabric.Shadow
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
表示此形状的阴影的阴影对象。
向后不兼容注意:这个属性取代了"shadowColor" (String), "shadowOffsetX" (Number),
“shadowOffsetY”(Number)和“shadowBlur”(Number)自v1.2.12
Type:
- Inherited From:
- Source:
strokeLineCap :String
Line endings style of a brush (one of "butt", "round", "square")
笔刷的线尾样式(有“屁股”、“圆”、“方”三种)
Type:
- String
- Inherited From:
- Default Value:
- round
- Source:
strokeLineJoin :String
Corner style of a brush (one of "bevel", "round", "miter")
笔刷的角样式(“斜角”,“圆”,“斜字”之一)
Type:
- String
- Inherited From:
- Default Value:
- round
- Source:
strokeMiterLimit :Number
Maximum miter length (used for strokeLineJoin = "miter") of a brush's
笔刷的最大斜接长度(用于strokeLineJoin = "斜接")
Type:
- Number
- Inherited From:
- Default Value:
- 10
- Source:
width :Number
Width of a brush, has to be a Number, no string literals
画笔的宽度,必须是数字,不能是字符串
Type:
- Number
- Inherited From:
- Default Value:
- 1
- Source:
Methods
_setBrushStyles(ctx)
Sets brush styles
设置画笔样式
Parameters:
Name | Type | Description |
---|---|---|
ctx |
CanvasRenderingContext2D |
- Overrides:
- fabric.BaseBrush#_setBrushStyles
- Source:
createPath()
Creates path
创建路径
- Source:
getPattern(ctx)
Creates "pattern" instance property
创建"pattern"实例属性
Parameters:
Name | Type | Description |
---|---|---|
ctx |
CanvasRenderingContext2D |
- Source: