Class: Brush
Memberof
M3D.Shapes
Description
画笔
Hierarchy
-
Brush
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new Brush(): Brush
Returns
Description
构造函数
Properties
updateContentCallBack
• updateContentCallBack: (param
: any
) => void
Type declaration
▸ (param
): void
Parameters
Name | Type |
---|---|
param | any |
Returns
void
Methods
clearShape2D
▸ clearShape2D(): void
Returns
void
Description
清空2D对象
draw
▸ draw(): void
Returns
void
Description
绘制
drawBackground
▸ drawBackground(context
, shape2D
): void
Parameters
Name | Type |
---|---|
context | CanvasRenderingContext2D |
shape2D | Shape2D |
Returns
void
Description
绘制背景
drawContent
▸ drawContent(context
, shape2D
): void
Parameters
Name | Type |
---|---|
context | CanvasRenderingContext2D |
shape2D | Shape2D |
Returns
void
Description
绘制文本内容
getCanvas
▸ getCanvas(): HTMLCanvasElement
Returns
HTMLCanvasElement
Description
获取Canvas
setShape2D
▸ setShape2D(shape2D
): void
Parameters
Name | Type |
---|---|
shape2D | Shape2D |
Returns
void
Description
设置Shape2D