ig.

ImageDrawing

new ImageDrawing()

Image for pixel perfect scaled dynamic drawing.
- this class is intended for use of cached drawings to improve performance, i.e. don't redraw a lot IMPORTANT:do not use this for actual image files, instead use ig.Image.

Author:
  • Collin Hover - collinhover.com
Source:

loaded :Boolean

Image drawing is always loaded.

Default Value:
  • true
Source:

finalize(scale)

Finalizes drawing and flag image to redraw sizes. IMPORTANT: finalizing at a scale other than 1 will disable dynamic resizing for the image!

Parameters:
Name Type Argument Default Description
scale Number <optional>
1 scale to finalize at
Source:

init(settings)

Initializes drawing canvas.

Parameters:
Name Type Description
settings Object settings object.
Source:

load()

Image drawing does not need to load.

Source:

onload()

Image drawing does not need on load callback.

Source:

reload()

Image drawing does not need to reload.

Source:

setDimensions(width, height)

Set width and height of image.

Parameters:
Name Type Description
width Number of original size.
height Number of original size.
Source:

setHeight(height)

Set height of image.

Parameters:
Name Type Description
height Number of original size.
Source:

setWidth(width)

Set width of image.

Parameters:
Name Type Description
width Number of original size.
Source: