Constructors
constructor
- new Graphics(changeCb?: (() => void)): Graphics
Parameters
Optional changeCb: (() => void)
Properties
Private _changeCb
_changeCb: any
Readonly commands
Methods
drawRect
- drawRect(x: number, y: number, width: number, height: number, fillColor?: Color, lineColor?: Color, lineWidth?: number): void
Parameters
x: number
y: number
width: number
height: number
Optional fillColor: Color
Optional lineColor: Color
Optional lineWidth: number
Returns void
drawTexture
- drawTexture(x: number, y: number, width: number, height: number, tex: <internal>.default): void
Parameters
x: number
y: number
width: number
height: number
Returns void
绘制矩形