Class lime.fill.Image
Extends
lime.fill.Fill.
Defined in: image.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
lime.fill.Image(img)
Image fill.
|
| Field Attributes | Field Name and Description |
|---|---|
|
Common name for Image objects
|
|
| <private> <static> |
lime.fill.Image.loadedImages_
Already loaded image cache to reuse all img objects.
|
| Method Attributes | Method Name and Description |
|---|---|
| <private> | |
|
Return core DOM Image element for the fill.
|
|
|
getPixelSizeAndOffset(shape)
|
|
| <private> |
Update sprite dimensions after image has been loaded
|
|
initForSprite(sprite)
|
|
|
isLoaded()
Return true if image object has been loaded from network.
|
|
|
setCanvasStyle(context, shape)
|
|
|
setDOMBackgroundProp_(domEl, shape)
Common functionality so it could be reused on Frame
|
|
|
setDOMStyle(domEl, shape)
|
|
|
setOffset(offset, opt_perc)
Set the offset that defines the drawing start position.
|
|
|
setSize(size, opt_perc)
Set the drawing size for the fill.
|
Field Detail
id
Common name for Image objects
<private> <static>
lime.fill.Image.loadedImages_
Already loaded image cache to reuse all img objects.
Method Detail
<private>
addLoadHandler_()
{Element}
getImageElement()
Return core DOM Image element for the fill.
- Returns:
- {Element} Image element.
getPixelSizeAndOffset(shape)
- Parameters:
- shape
<private>
imageLoadedHandler_(e)
Update sprite dimensions after image has been loaded
- Parameters:
- {Event} e
- Event.
initForSprite(sprite)
- Parameters:
- sprite
{boolean}
isLoaded()
Return true if image object has been loaded from network.
- Returns:
- {boolean} If image has been loaded.
setCanvasStyle(context, shape)
- Parameters:
- context
- shape
setDOMBackgroundProp_(domEl, shape)
Common functionality so it could be reused on Frame
- Parameters:
- domEl
- shape
setDOMStyle(domEl, shape)
- Parameters:
- domEl
- shape
{lime.fill.Image}
setOffset(offset, opt_perc)
Set the offset that defines the drawing start position. Default is top-left(0,0).
- Parameters:
- {goog.math.Coordinate} offset
- Image fill offset.
- {boolean=} opt_perc
- If offset is relative factor from size.
- Returns:
- {lime.fill.Image} object itself.
{lime.fill.Image}
setSize(size, opt_perc)
Set the drawing size for the fill. Size can also be passed in
with two numbers.
- Parameters:
- {(goog.math.Size|number)} size
- Image fill size.
- {(boolean|number)=} opt_perc
- If size is relative factor from original.
- Returns:
- {lime.fill.Image} object itself.