Public Methods
 FunctionDefined By
  
calculateScaleRatioToFill(originalWidth:Number, originalHeight:Number, targetWidth:Number, targetHeight:Number):Number
Calculates a scale value to maintain aspect ratio and fill the required bounds (with the possibility of cutting of the edges a bit).
feathers.utils.display
  
calculateScaleRatioToFit(originalWidth:Number, originalHeight:Number, targetWidth:Number, targetHeight:Number):Number
Calculates a scale value to maintain aspect ratio and fit inside the required bounds (with the possibility of a bit of empty space on the edges).
feathers.utils.display
  
getDisplayObjectDepthFromStage(target:DisplayObject):int
Calculates how many levels deep the target object is on the display list, starting from the Starling stage.
feathers.utils.display
  
nativeToGlobal(nativePosition:Point, starling:Starling = null, result:Point = null):Point
Converts from native coordinates to Starling global coordinates.
feathers.utils.display
  
stageToStarling(stage:Stage):Starling
Finds the Starling instance that controls a particular starling.display.Stage.
feathers.utils.display
Function detail
calculateScaleRatioToFill()function
public function calculateScaleRatioToFill(originalWidth:Number, originalHeight:Number, targetWidth:Number, targetHeight:Number):Number

Product Version : Feathers 1.0.0

Calculates a scale value to maintain aspect ratio and fill the required bounds (with the possibility of cutting of the edges a bit).

Parameters

originalWidth:Number
 
originalHeight:Number
 
targetWidth:Number
 
targetHeight:Number

Returns
Number
calculateScaleRatioToFit()function 
public function calculateScaleRatioToFit(originalWidth:Number, originalHeight:Number, targetWidth:Number, targetHeight:Number):Number

Product Version : Feathers 1.0.0

Calculates a scale value to maintain aspect ratio and fit inside the required bounds (with the possibility of a bit of empty space on the edges).

Parameters

originalWidth:Number
 
originalHeight:Number
 
targetWidth:Number
 
targetHeight:Number

Returns
Number
getDisplayObjectDepthFromStage()function 
public function getDisplayObjectDepthFromStage(target:DisplayObject):int

Product Version : Feathers 1.0.0

Calculates how many levels deep the target object is on the display list, starting from the Starling stage. If the target object is the stage, the depth will be 0. A direct child of the stage will have a depth of 1, and it increases with each new level. If the object does not have a reference to the stage, the depth will always be -1, even if the object has a parent.

Parameters

target:DisplayObject

Returns
int
nativeToGlobal()function 
public function nativeToGlobal(nativePosition:Point, starling:Starling = null, result:Point = null):Point

Product Version : Feathers 3.5.0

Converts from native coordinates to Starling global coordinates.

Parameters

nativePosition:Point
 
starling:Starling (default = null)
 
result:Point (default = null)

Returns
Point
stageToStarling()function 
public function stageToStarling(stage:Stage):Starling

Product Version : Feathers 2.2.0

Finds the Starling instance that controls a particular starling.display.Stage.

Parameters

stage:Stage

Returns
Starling