Canvas
Reading needs 1 minutes
Clear canvas elements
clear(): Promise<void>;
Returns:
Get canvas instance
getCanvas(): Canvas;
Returns:
Type: Canvas
Description: 画布实例
Get the size of the current canvas container
getSize(): [number, number];
Returns:
Type: [number, number]
Description: 画布尺寸
Set the size of the current canvas container
setSize(width: number, height: number): void;
Parameter | Type | Description |
---|---|---|
width | number | 画布宽度 |
height | number | 画布高度 |
Returns: