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

Package | starling.utils
Class | public class ScaleMode
Inheritance | ScaleMode Object

A class that provides constant values for the 'RectangleUtil.fit' method.

Public Methods

| Method | Defined By
--- | --- | ---
|  | isValid(scaleMode:String):Boolean [static] Indicates whether the given scale mode string is valid. | ScaleMode

Public Constants

| Constant | Defined By
--- | --- | ---
|  | NO_BORDER : String = noBorder [static] Specifies that the rectangle fills the specified area without distortion but possibly with some cropping, while maintaining the original aspect ratio. | ScaleMode
|  | NONE : String = none [static] Specifies that the rectangle is not scaled, but simply centered within the specified area. | ScaleMode
|  | SHOW_ALL : String = showAll [static] Specifies that the entire rectangle will be scaled to fit into the specified area, while maintaining the original aspect ratio. | ScaleMode

Method Detail

isValid | () | method

`public static function isValid(scaleMode:String):Boolean`

Indicates whether the given scale mode string is valid.

Parameters

| `scaleMode:String`

Returns

| `Boolean`

Constant Detail

NO_BORDER | Constant

`public static const NO_BORDER:String = noBorder`

Specifies that the rectangle fills the specified area without distortion but possibly with some cropping, while maintaining the original aspect ratio.

NONE | Constant |

`public static const NONE:String = none`

Specifies that the rectangle is not scaled, but simply centered within the specified area.

SHOW_ALL | Constant |

`public static const SHOW_ALL:String = showAll`

Specifies that the entire rectangle will be scaled to fit into the specified area, while maintaining the original aspect ratio. This might leave empty bars at either the top and bottom, or left and right.

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