| Package | sandy.view |
| Class | public final class ViewPort |
This is the area where the view of the camera is projected.
It may be the whole or only a part of the stage
| Property | Defined by | ||
|---|---|---|---|
| hasChanged : Boolean = false
Flag which specifies if the view port dimension has changed.
| ViewPort | ||
| height : int
The height of the view port.
| ViewPort | ||
| height2 : int [read-only]
| ViewPort | ||
| ratio : Number [read-only]
The width/height ratio of the view port.
| ViewPort | ||
| width : int
The width of the view port.
| ViewPort | ||
| width2 : int [read-only]
| ViewPort | ||
| Method | Defined by | ||
|---|---|---|---|
|
ViewPort(p_nW:Number, p_nH:Number)
Creates a new ViewPort.
| ViewPort | ||
|
update():void
Updates the view port.
| ViewPort | ||
| Constant | Defined by | ||
|---|---|---|---|
| offset : Point
A point representing the offset to change the view port center.
| ViewPort | ||
| hasChanged | property |
public var hasChanged:Boolean = falseFlag which specifies if the view port dimension has changed.
| height | property |
height:int [read-write]The height of the view port.
Implementation public function get height():int
public function set height(value:int):void
| height2 | property |
height2:int [read-only]Implementation
public function get height2():int
| ratio | property |
ratio:Number [read-only]The width/height ratio of the view port.
Implementation public function get ratio():Number
| width | property |
width:int [read-write]The width of the view port.
Implementation public function get width():int
public function set width(value:int):void
| width2 | property |
width2:int [read-only]Implementation
public function get width2():int
| ViewPort | () | constructor |
public function ViewPort(p_nW:Number, p_nH:Number)Creates a new ViewPort.
Parametersp_nW:Number — The width of the rendered screen.
|
|
p_nH:Number — The height of the rendered screen.
|
| update | () | method |
public function update():voidUpdates the view port.
| offset | constant |
public const offset:PointA point representing the offset to change the view port center.
If you set myCamera.viewport.offset.y to 100, everything drawn at the screen will be moved 100 pixels down (due to Flash vertical axis convention).