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
  
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

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

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

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
stageToStarling()function 
public function stageToStarling(stage:Stage):Starling

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

Parameters

stage:Stage

Returns
Starling