GODPAPER | All Packages | All Classes | Index | Frames No Frames |
Package

Public Methods

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

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`

Thu Jan 16 2014, 01:13 PM +08:00