Packagenet.guttershark.util
Classpublic final class DisplayListUtils

The DisplayListUtils class contains utlility methods for display list manipulation.

See also

Utilities class.


Public Methods
 MethodDefined by
  
flip(obj:Object, axis:String = "y"):void
Flip an object on the x or y axis.
DisplayListUtils
  
[static] Singleton access.
DisplayListUtils
  
localToLocal(from:DisplayObject, to:DisplayObject):Point
Translate the display object container position in a new container.
DisplayListUtils
  
scale(target:DisplayObject, scale:Number):void
Set the scale of an object - updates the x and y.
DisplayListUtils
  
scaleRatio(target:DisplayObject, targetW:Number, targetH:Number):void
Scale while retaining original w:h ratio.
DisplayListUtils
  
scaleToFit(target:DisplayObject, targetW:Number, targetH:Number, center:Boolean = false):void
Scale target item to fit within target confines.
DisplayListUtils
Method detail
flip()method
public function flip(obj:Object, axis:String = "y"):void

Flip an object on the x or y axis.

Parameters
obj:Object — The object to flip
 
axis:String (default = "y") — The axis to flip on - "x" or "y"
gi()method 
public static function gi():DisplayListUtils

Singleton access.

Returns
DisplayListUtils
localToLocal()method 
public function localToLocal(from:DisplayObject, to:DisplayObject):Point

Translate the display object container position in a new container.

Parameters
from:DisplayObject
 
to:DisplayObject

Returns
Point
scale()method 
public function scale(target:DisplayObject, scale:Number):void

Set the scale of an object - updates the x and y.

Parameters
target:DisplayObject — The target item to scale.
 
scale:Number — The scale percentage.
scaleRatio()method 
public function scaleRatio(target:DisplayObject, targetW:Number, targetH:Number):void

Scale while retaining original w:h ratio.

Parameters
target:DisplayObject — The item to be scaled.
 
targetW:Number — The target item width.
 
targetH:Number — The target item height.
scaleToFit()method 
public function scaleToFit(target:DisplayObject, targetW:Number, targetH:Number, center:Boolean = false):void

Scale target item to fit within target confines.

Parameters
target:DisplayObject — The item to be aligned.
 
targetW:Number — The target item width.
 
targetH:Number — The target item height.
 
center:Boolean (default = false) — Center the object within the targetW and targetH.