new lime.fill.Image(img)
Image fill.
Parameters:
Name | Type | Description |
---|---|---|
img |
string | Image | lime.Sprite | Image. |
- Source:
- fill/image.js, line 11
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:
- fill/image.js, line 62
-
id :string
-
Common name for Image objects
- Source:
- fill/image.js, line 68
Methods
-
<private> addLoadHandler_()
-
- Source:
- fill/image.js, line 103
-
getImageElement() → {HTMLImageElement}
-
Return core DOM Image element for the fill.
- Source:
- fill/image.js, line 121
Returns:
Image element.- Type
- HTMLImageElement
-
<private> imageLoadedHandler_(e)
-
Update sprite dimensions after image has been loaded
Parameters:
Name Type Description e
Event Event. - Source:
- fill/image.js, line 113
-
initForSprite()
-
- Source:
- fill/image.js, line 73
-
isLoaded() → {boolean}
-
Return true if image object has been loaded from network.
- Source:
- fill/image.js, line 129
Returns:
If image has been loaded.- Type
- boolean
-
<protected> setDOMBackgroundProp_()
-
Common functionality so it could be reused on Frame
- Source:
- fill/image.js, line 193
-
setDOMStyle()
-
- Source:
- fill/image.js, line 207
-
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:
- fill/image.js, line 156
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:
- fill/image.js, line 140
Returns:
object itself.- Type
- lime.fill.Image