Constructor
new HTMLCanvas(type)
Creates one according to the specified type
HTMLCanvas
Example。 Please do not use new HTMLCanvas directly!
Parameters:
Name | Type | Description |
---|---|---|
type |
String
|
Type. 2D, 3D. |
Extends
- Bitmap
Member
(static) create :function
Creates one according to the specified type
HTMLCanvas
Example。
(static) TYPE2D :String
- Default Value:
- "2D"
(static) TYPE3D :String
- Default Value:
- "3D"
(static) TYPEAUTO :String
- Default Value:
- "AUTO"
asBitmap :Boolean
context :Context
Canvas rendering context.
getContext :function
Get the Canvas rendering context.
Methods
clear()
Empty canvas content.
destroy()
Destruction.
getCanvas()
getMemSize() → {int}
Get memory size.
Returns:
- Type:
-
int
Memory size.
release()
Release.
size(w, h)
Set width height.
Parameters:
Name | Type | Description |
---|---|---|
w |
Number
|
Width. |
h |
Number
|
Height. |