Bitmap

Bitmap

new Bitmap(loader, source, callback)

The Bitmap constructor
Parameters:
Name Type Argument Description
loader AssetLoader The asset loader to use;
source String <optional>
The URL location of the movie to load.
callback Function <optional>
A callback to be called when your movie has loaded (only called if you passed a `url`). The callback will be called with it's first argument signifying an error. So, if the first argument is `null` you can assume the movie was loaded successfully.
Properties:
Name Type Description
__supportedAttributes__ __list__ List of supported attribute names. In addition to the property names listed for DisplayObject, these are the attribute names you can pass to the attr() method. Note that this property is not available in your code, it's just here for documentation purposes.
Properties
Name Type Description
source string The source of the bitmap.
height number The height of the bitmap.
width number The width of the bitmap.

Extends

Methods

bindAssetCallback(callback) → {this}

Registers events for a callback function which'll be triggered for both `error` and `load` events (i.e. node-style callback, `function(err, data) {}`)
Parameters:
Name Type Description
callback Function The function to be triggered upon `load` or `error`
Inherited From:
Returns:
Type
this

clone() → {Bitmap}

Clones the method
Returns:
Cloned instance
Type
Bitmap

getBoundingBox(transform) → {Object}

Get computed dimensions of the bitmap
Parameters:
Name Type Argument Default Description
transform Matrix <optional>
null A transform to apply to all points before computation.
Returns:
an object with all box properties
Type
Object