Class Index | File Index

Classes


Class lime.fill.Image


Extends lime.fill.Fill.

Defined in: image.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Image fill.
Field Summary
Field Attributes Field Name and Description
 
id
Common name for Image objects
<private> <static>  
lime.fill.Image.loadedImages_
Already loaded image cache to reuse all img objects.
Method Summary
Method Attributes Method Name and Description
<private>  
 
Return core DOM Image element for the fill.
 
<private>  
Update sprite dimensions after image has been loaded
 
initForSprite(sprite)
 
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.
Class Detail
lime.fill.Image(img)
Image fill.
Parameters:
{string|Image|lime.Sprite} img
Image.
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.

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jun 30 2011 11:27:23 GMT+0300 (EEST)