-
changeURL(newUrl)
-
Change the source URL of the ImageObject
Parameters:
| Name |
Type |
Description |
newUrl |
String
|
the new URL |
- Source:
-
contains() → {Boolean}
-
Generic contains method for PostcardObject.
- Inherited From:
- Source:
Returns:
if the coordinate is within the object's bounds
-
Type
-
Boolean
-
draw()
-
Draw method for the image object. Only applies after image data is loaded via proxy
- Source:
-
getCurrentImageData() → {ImageData|Error}
-
Get the current image data
- Source:
Returns:
-
Type
-
ImageData
|
Error
-
getOriginalImageData() → {ImageData|Error}
-
Get the original image data
- Source:
Returns:
-
Type
-
ImageData
|
Error
-
getRotation()
-
Get rotation of the image object.
- Source:
-
hide()
-
Set opacity on the PostcardObject to 0.0
- Inherited From:
- Source:
-
onImageLoaded(callback)
-
Set a callback function to be called when an image is done loading
Parameters:
| Name |
Type |
Description |
callback |
function
|
Callback function. Applied to `this` |
- Source:
-
revert()
-
Revert any changes made to the image
- Source:
-
setImageData(newImageData)
-
Set the new image data
Parameters:
| Name |
Type |
Description |
newImageData |
ImageData
|
new ImageData object to set |
- Source:
-
setRotation(angle)
-
Set rotation of the image object.
Parameters:
| Name |
Type |
Description |
angle |
Number
|
Angle of rotation, in degrees; |
- Source:
-
show()
-
Set opacity on the PostcardObject to 1.0
- Inherited From:
- Source:
-
update(newOptions)
-
Generic update method for PostcardObject.
Parameters:
| Name |
Type |
Description |
newOptions |
Object
|
any options to update |
- Inherited From:
- Source:
-
<private, inner> applyImage()
-
Takes raw image data (from the proxy or cache) and sets it to the ImageObject,
using an HTMLImageElement as a shell
- Source:
-
<private, inner> loadImage()
-
Method to get image data via proxy. Uses the JSONP library to get the raw image data, then
adds it to the cache of images and makes a call to applyImage()
- Source:
-
<private, inner> onImageRefresh()
-
Happens whenever image.src changes
- Source: