Resizer
A resizer that can be used to store a base and a target resolution.
The attached resizeable will be updated with the base resolution when the target resolution changes. The new calculated resolution can then be retrieved via Resizer.width and Resizer.height.
Static Member Summary
Static Public Members | ||
public static get |
An auto sizing constant. |
Constructor Summary
Public Constructor | ||
public |
constructor(resizeable: Resizable, width: Number, height: Number, scale: Number) Constructs a new resizer. |
Member Summary
Public Members | ||
public |
base: Vector2 The base size. |
|
public get |
The calculated height. |
|
public set |
Sets the target height. |
|
public |
A resizable object. |
|
public get |
The current resolution scale. |
|
public set |
Sets the resolution scale. |
|
public get |
The calculated width. |
|
public set |
Sets the target width. |
Static Public Members
Public Constructors
Public Members
public base: Vector2 source
The base size.
This size will be passed to the resizable object every time the target width, height or scale is changed.
public get height: Number source
The calculated height.
If both the width and the height are set to Resizer.AUTO_SIZE, the base height will be returned.
public set height: Number source
Sets the target height.
Use Resizer.AUTO_SIZE to automatically calculate the height based on the width and the original aspect ratio.
public set scale: Number source
Sets the resolution scale.
Also sets the width and height to Resizer.AUTO_SIZE.
public get width: Number source
The calculated width.
If both the width and the height are set to Resizer.AUTO_SIZE, the base width will be returned.
public set width: Number source
Sets the target width.
Use Resizer.AUTO_SIZE to automatically calculate the width based on the height and the original aspect ratio.