Class twodee.ImageNode
Extends
.
A node which draws an image.
Defined in: ImageNode.js.
Constructor Attributes | Constructor Name and Description |
---|---|
twodee.ImageNode(image)
Constructs a new image node.
|
Method Attributes | Method Name and Description |
---|---|
getImage()
Returns the image.
|
|
render(g, transform)
|
|
setImage(image)
Sets the image
|
|
setShowBounds(showBounds)
Enables or disables the display of node bounds.
|
Class Detail
twodee.ImageNode(image)
Constructs a new image node.
- Parameters:
- {HTMLImageElement|Image} image
- Optional image. If not set then it must be set with the setImage() method.
Method Detail
{HTMLImageElement|Image}
getImage()
Returns the image.
- Returns:
- {HTMLImageElement|Image} The image
render(g, transform)
- Parameters:
- {CanvasRenderingContext2D} g
- The graphics context
- {twodee.Matrix} transform
- The transformation
setImage(image)
Sets the image
- Parameters:
- {HTMLImageElement|Image} image
- The image to set
setShowBounds(showBounds)
Enables or disables the display of node bounds. This is for debugging
purposes.
- Parameters:
- {boolean} showBounds
- True to show the bounds, false to hide them