SmartCanvas
Drawings on canvas using hidden canvas as a cache for better performance drawings during canvas animations. SmartCanvas also adopts a canvas to
Static Member Summary
Static Public Members | ||
public static get |
pixelRatio: number: * Returns current device pixel ratio |
Static Method Summary
Static Public Methods | ||
public static |
redraw() Forces redraw all canvas in the current collection |
Constructor Summary
Public Constructor | ||
public |
constructor(canvas: HTMLCanvasElement, width: number, height: number) |
Member Summary
Public Members | ||
public |
Target drawings canvas element 2D context |
|
public |
Canvas caching element 2D context |
|
public |
Actual drawings height |
|
public |
Actual drawings width |
|
public |
X-coordinate of drawings zero point |
|
public |
Y-coordinate of drawings zero point |
|
public |
element: HTMLCanvasElement Target drawings canvas element |
|
public |
elementClone: HTMLCanvasElement | Node Canvas caching element |
|
public |
Canvas base height |
|
public |
Minimal side length in pixels of the drawing |
|
public |
On canvas redraw event callback |
|
public |
Canvas base width |
Method Summary
Public Methods | ||
public |
commit(): * Commits the drawings |
|
public |
destroy() Destroys this object, removing the references from memory |
|
public |
init() Initializes canvases and contexts |
|
public |
redraw(): * Redraw this object |