Class: Canvas

Canvas

new Canvas()

Canvas utility.
Source:

Methods

<static> loadImage(canvas, src, x, y, width, height, opt_callback)

Loads an image source into the canvas.
Parameters:
Name Type Description
canvas HTMLCanvasElement The canvas dom element.
src string The image source.
x number The canvas horizontal coordinate to load the image.
y number The canvas vertical coordinate to load the image.
width number The image width.
height number The image height.
opt_callback function Callback that fires when the image is loaded into the canvas.
Source: