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”(数量)和“shadowBlur”(数量)从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 = "miter")
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: