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 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 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
Returns 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 public function stageToStarling(stage:Stage):Starling
Product Version : | Feathers 2.2.0 |
Finds the Starling instance that controls a particular
starling.display.Stage
.
Parameters
Returns