Container
Extends:
Create a new container with a canvas element
Example:
let container = new Container({ width: 200, height: 200, background: 'gray' });
Constructor Summary
Public Constructor | ||
public |
constructor(options: Object) Create a new canvas |
Member Summary
Public Members | ||
public |
background: hex |
|
public |
canvas: HTMLCanvasElement |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
Inherited Summary
From class Drawer | ||
public |
|
|
public |
Reset canvas zone |
|
public |
Add models to debug |
|
public |
drawCircle(x: number, y: number, radius: number, size: number, color: string, start: number, end: number) Draw a circle |
|
public |
drawFillCircle(x: number, y: number, radius: number, color: string, lineSize: number, lineColor: string, start: number, end: number) Draw a fill circle |
|
public |
drawFillRect(x: number, y: number, width: number, height: number, color: string, lineSize: number, lineColor: string) Draw a fill rectangle |
|
public |
drawImage(source: *, x: number, y: number, width: number, height: number, destinationX: number, destinationY: number, destinationWidth: number, destinationHeight: number) Draw images |
|
public |
Draw a line |
|
public |
Draw model |
|
public |
Draw a rectangle |
|
public |
drawText(text: string, x: number, y: number, size: string, font: string, color: string, style: string, align: string, baseline: string): Object Draw a text |
|
public |
Restore last saved context |
|
public |
rotateModel(model: Model, deg: float, pivotX: number, pivotY: number): Drawer Rotate model |
|
public |
Save context |