Class: Image

lime.fill.Image

new lime.fill.Image(img)

Image fill.
Parameters:
Name Type Description
img string | Image | lime.Sprite Image.
Source:

Extends

Summary

Members
<private, static> loadedImages_
Already loaded image cache to reuse all img objects.
id :string
Common name for Image objects
Methods
<private> addLoadHandler_()
getImageElement() → {HTMLImageElement}
Return core DOM Image element for the fill.
<private> imageLoadedHandler_(e)
Update sprite dimensions after image has been loaded
initForSprite()
isLoaded() → {boolean}
Return true if image object has been loaded from network.
<protected> setDOMBackgroundProp_()
Common functionality so it could be reused on Frame
setDOMStyle()
setOffset(offset, opt_perc) → {lime.fill.Image}
Set the offset that defines the drawing start position. Default is top-left(0,0).
setSize(size, opt_perc) → {lime.fill.Image}
Set the drawing size for the fill. Size can also be passed in with two numbers.

Members

<private, static> loadedImages_

Already loaded image cache to reuse all img objects.
Source:

id :string

Common name for Image objects
Source:

Methods

<private> addLoadHandler_()

Source:

getImageElement() → {HTMLImageElement}

Return core DOM Image element for the fill.
Source:
Returns:
Image element.
Type
HTMLImageElement

<private> imageLoadedHandler_(e)

Update sprite dimensions after image has been loaded
Parameters:
Name Type Description
e Event Event.
Source:

initForSprite()

Source:

isLoaded() → {boolean}

Return true if image object has been loaded from network.
Source:
Returns:
If image has been loaded.
Type
boolean

<protected> setDOMBackgroundProp_()

Common functionality so it could be reused on Frame
Source:

setDOMStyle()

Source:

setOffset(offset, opt_perc) → {lime.fill.Image}

Set the offset that defines the drawing start position. Default is top-left(0,0).
Parameters:
Name Type Argument Description
offset goog.math.Coordinate Image fill offset.
opt_perc boolean <optional>
If offset is relative factor from size.
Source:
Returns:
object itself.
Type
lime.fill.Image

setSize(size, opt_perc) → {lime.fill.Image}

Set the drawing size for the fill. Size can also be passed in with two numbers.
Parameters:
Name Type Argument Description
size goog.math.Size | number Image fill size.
opt_perc boolean | number <optional>
If size is relative factor from original.
Source:
Returns:
object itself.
Type
lime.fill.Image