| API Documentation | All Packages | All Classes | Index | Frames | ![]() |
| Class SceneViewport | Properties | Methods | Events | |
| Package | org.openzoom.flash.viewport |
| Class | public final class SceneViewport |
| Inheritance | SceneViewport flash.events.EventDispatcher |
| Implements | ISceneViewport |
| Property | Defined by | ||
|---|---|---|---|
| bottom : Number [read-only]
The sum of the y and height properties.
| SceneViewport | ||
| bottomRight : Point [read-only]
The location of the IViewport object's bottom-right corner,
determined by the values of the right and bottom properties.
| SceneViewport | ||
| center : Point [read-only]
Returns the center of the viewport.
| SceneViewport | ||
| height : Number
Vertical dimension of the viewport.
| SceneViewport | ||
| left : Number [read-only]
The x coordinate of the top-left corner of the viewport.
| SceneViewport | ||
| right : Number [read-only]
The sum of the x and width properties.
| SceneViewport | ||
| scale : Number
Scale of the scene.
| SceneViewport | ||
| top : Number [read-only]
The y coordinate of the top-left corner of the viewport.
| SceneViewport | ||
| topLeft : Point [read-only]
The location of the IViewport object's top-left corner,
determined by the x and y coordinates of the point.
| SceneViewport | ||
| transform : IViewportTransform
Transformation that is currently applied to the viewport
| SceneViewport | ||
| transformer : IViewportTransformer
Transforms the IViewport object after its state has been changed.
| SceneViewport | ||
| viewportHeight : Number [read-only]
Height of the viewport container.
| SceneViewport | ||
| viewportWidth : Number [read-only]
Width of the viewport container.
| SceneViewport | ||
| width : Number
Horizontal dimension of the viewport.
| SceneViewport | ||
| x : Number
Horizontal coordinate of the viewport.
| SceneViewport | ||
| y : Number
Vertical coordinate of the viewport.
| SceneViewport | ||
| zoom : Number
Zoom level of the viewport.
| SceneViewport | ||
| Method | Defined by | ||
|---|---|---|---|
|
SceneViewport(lock:SingletonLock, viewport:INormalizedViewport)
Constructor.
| SceneViewport | ||
|
beginTransform():void
Dispatch
transformStart event to
let all listeners know that a viewport transition has started. | SceneViewport | ||
|
contains(x:Number, y:Number):Boolean
Determines whether the specified point is contained within this Viewport object.
| SceneViewport | ||
|
dispose():void
| SceneViewport | ||
|
endTransform():void
Dispatch
transformEnd event to
let all listeners know that a viewport transition has finished. | SceneViewport | ||
|
fitToBounds(bounds:Rectangle, scale:Number = 1.0, immediately:Boolean = false):void
Show a rectangular area of the scene inside the viewport.
| SceneViewport | ||
|
getBounds():Rectangle
Returns a Rectangle object with the bounds of the viewport.
| SceneViewport | ||
|
getCenter():Point
| SceneViewport | ||
|
[static]
Returns an instance of SceneViewport for a given normalized viewport.
| SceneViewport | ||
|
intersection(toIntersect:Rectangle):Rectangle
If the Rectangle object specified in the toIntersect parameter intersects
with this Viewport object, returns the area of intersection as a Rectangle
object.
| SceneViewport | ||
|
intersects(toIntersect:Rectangle):Boolean
Determines whether the object specified in the toIntersect parameter
intersects with this Viewport object.
| SceneViewport | ||
|
localToScene(point:Point):Point
Converts the point object from the viewport's
container (local) coordinates to scene coordinates.
| SceneViewport | ||
|
panBy(deltaX:Number, deltaY:Number, immediately:Boolean = false):void
Move the viewport.
| SceneViewport | ||
|
panCenterTo(centerX:Number, centerY:Number, immediately:Boolean = false):void
Move the viewport center.
| SceneViewport | ||
|
panTo(x:Number, y:Number, immediately:Boolean = false):void
Move the viewport.
| SceneViewport | ||
|
sceneToLocal(point:Point):Point
Converts the point object from scene coordinates
to the viewport's container (local) coordinates.
| SceneViewport | ||
|
showAll(immediately:Boolean = false):void
Fit entire scene into the viewport.
| SceneViewport | ||
|
toString():String
| SceneViewport | ||
|
zoomBy(factor:Number, transformX:Number, transformY:Number, immediately:Boolean = false):void
Zoom the viewport by a factor.
| SceneViewport | ||
|
zoomTo(zoom:Number, transformX:Number, transformY:Number, immediately:Boolean = false):void
Zoom the viewport to a zoom level z.
| SceneViewport | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| SceneViewport | ||||
| SceneViewport | ||||
| SceneViewport | ||||
| SceneViewport | ||||
| SceneViewport | ||||
| bottom | property |
bottom:Number [read-only]The sum of the y and height properties.
This property can be used as the source for data binding.
Implementation public function get bottom():Number
| bottomRight | property |
bottomRight:Point [read-only]The location of the IViewport object's bottom-right corner, determined by the values of the right and bottom properties.
This property can be used as the source for data binding.
Implementation public function get bottomRight():Point
| center | property |
center:Point [read-only]Returns the center of the viewport.
This property can be used as the source for data binding.
Implementation public function get center():Point
| height | property |
height:Number [read-write]Vertical dimension of the viewport.
This property can be used as the source for data binding.
Implementation public function get height():Number
public function set height(value:Number):void
| left | property |
left:Number [read-only]The x coordinate of the top-left corner of the viewport.
This property can be used as the source for data binding.
Implementation public function get left():Number
| right | property |
right:Number [read-only]The sum of the x and width properties.
This property can be used as the source for data binding.
Implementation public function get right():Number
| scale | property |
scale:Number [read-write]Scale of the scene.
This property can be used as the source for data binding.
Implementation public function get scale():Number
public function set scale(value:Number):void
| top | property |
top:Number [read-only]The y coordinate of the top-left corner of the viewport.
This property can be used as the source for data binding.
Implementation public function get top():Number
| topLeft | property |
topLeft:Point [read-only]The location of the IViewport object's top-left corner, determined by the x and y coordinates of the point.
This property can be used as the source for data binding.
Implementation public function get topLeft():Point
| transform | property |
transform:IViewportTransform [read-write]Transformation that is currently applied to the viewport
Implementation public function get transform():IViewportTransform
public function set transform(value:IViewportTransform):void
| transformer | property |
transformer:IViewportTransformer [read-write]Transforms the IViewport object after its state has been changed.
Implementation public function get transformer():IViewportTransformer
public function set transformer(value:IViewportTransformer):void
| viewportHeight | property |
viewportHeight:Number [read-only]Height of the viewport container.
This property can be used as the source for data binding.
Implementation public function get viewportHeight():Number
| viewportWidth | property |
viewportWidth:Number [read-only]Width of the viewport container.
This property can be used as the source for data binding.
Implementation public function get viewportWidth():Number
| width | property |
width:Number [read-write]Horizontal dimension of the viewport.
This property can be used as the source for data binding.
Implementation public function get width():Number
public function set width(value:Number):void
| x | property |
x:Number [read-write]Horizontal coordinate of the viewport.
This property can be used as the source for data binding.
Implementation public function get x():Number
public function set x(value:Number):void
| y | property |
y:Number [read-write]Vertical coordinate of the viewport.
This property can be used as the source for data binding.
Implementation public function get y():Number
public function set y(value:Number):void
| zoom | property |
zoom:Number [read-write]Zoom level of the viewport. Scene fits exactly into viewport at value 1.
This property can be used as the source for data binding.
Implementation public function get zoom():Number
public function set zoom(value:Number):void
| SceneViewport | () | constructor |
public function SceneViewport(lock:SingletonLock, viewport:INormalizedViewport)Constructor.
Parameterslock:SingletonLock |
|
viewport:INormalizedViewport |
| beginTransform | () | method |
public function beginTransform():void
Dispatch transformStart event to
let all listeners know that a viewport transition has started.
| contains | () | method |
public function contains(x:Number, y:Number):BooleanDetermines whether the specified point is contained within this Viewport object.
Parametersx:Number — The x coordinate (horizontal position) of the point.
|
|
y:Number — The y coordinate (vertical position) of the point.
|
Boolean — true if this Viewport object contains the specified
point; otherwise false.
|
| dispose | () | method |
public function dispose():void
| endTransform | () | method |
public function endTransform():void
Dispatch transformEnd event to
let all listeners know that a viewport transition has finished.
| fitToBounds | () | method |
public function fitToBounds(bounds:Rectangle, scale:Number = 1.0, immediately:Boolean = false):voidShow a rectangular area of the scene inside the viewport.
Parametersbounds:Rectangle — Rectangle to be shown in the viewport.
|
|
scale:Number (default = 1.0) — Scale at which the rectangle is beeing displayed, e.g. useful
for displaying some space around the rectangle.
|
|
immediately:Boolean (default = false) |
| getBounds | () | method |
public function getBounds():RectangleReturns a Rectangle object with the bounds of the viewport.
ReturnsRectangle |
| getCenter | () | method |
public function getCenter():PointReturns
Point |
| getInstance | () | method |
public static function getInstance(viewport:INormalizedViewport):ISceneViewportReturns an instance of SceneViewport for a given normalized viewport.
Parametersviewport:INormalizedViewport |
ISceneViewport |
| intersection | () | method |
public function intersection(toIntersect:Rectangle):RectangleIf the Rectangle object specified in the toIntersect parameter intersects with this Viewport object, returns the area of intersection as a Rectangle object. If the objects do not intersect, this method returns an empty Rectangle object with its properties set to 0.
ParameterstoIntersect:Rectangle — The Rectangle object to compare against to see if it
intersects with this Viewport object.
|
Rectangle — A Rectangle object that equals the area of intersection.
If the rectangles do not intersect, this method returns an empty Rectangle
object; that is, a rectangle with its x, y, width, and height properties set to 0.
|
| intersects | () | method |
public function intersects(toIntersect:Rectangle):BooleanDetermines whether the object specified in the toIntersect parameter intersects with this Viewport object. This method checks the x, y, width, and height properties of the specified Rectangle object to see if it intersects with this Viewport object.
ParameterstoIntersect:Rectangle — The Rectangle object to compare against this Viewport object.
|
Boolean — true if the specified object intersects with this Viewport
object; otherwise false.
|
| localToScene | () | method |
public function localToScene(point:Point):PointConverts the point object from the viewport's container (local) coordinates to scene coordinates.
Parameterspoint:Point |
Point |
| panBy | () | method |
public function panBy(deltaX:Number, deltaY:Number, immediately:Boolean = false):voidMove the viewport.
ParametersdeltaX:Number — Horizontal translation delta
|
|
deltaY:Number — Vertical translation delta
|
|
immediately:Boolean (default = false) |
| panCenterTo | () | method |
public function panCenterTo(centerX:Number, centerY:Number, immediately:Boolean = false):voidMove the viewport center.
ParameterscenterX:Number — Horizontal coordinate of the new center
|
|
centerY:Number — Vertical coordinate of the new center
|
|
immediately:Boolean (default = false) |
| panTo | () | method |
public function panTo(x:Number, y:Number, immediately:Boolean = false):voidMove the viewport.
Parametersx:Number — Horizontal coordinate
|
|
y:Number — Vertical coordinate
|
|
immediately:Boolean (default = false) |
| sceneToLocal | () | method |
public function sceneToLocal(point:Point):PointConverts the point object from scene coordinates to the viewport's container (local) coordinates.
Parameterspoint:Point |
Point |
| showAll | () | method |
public function showAll(immediately:Boolean = false):voidFit entire scene into the viewport.
Parametersimmediately:Boolean (default = false) |
| toString | () | method |
public override function toString():StringReturns
String |
| zoomBy | () | method |
public function zoomBy(factor:Number, transformX:Number, transformY:Number, immediately:Boolean = false):voidZoom the viewport by a factor.
Parametersfactor:Number — Multiplier for the zoom.
|
|
transformX:Number — Horizontal coordinate of the zooming center
|
|
transformY:Number — Vertical coordinate of the zooming center
|
|
immediately:Boolean (default = false) |
| zoomTo | () | method |
public function zoomTo(zoom:Number, transformX:Number, transformY:Number, immediately:Boolean = false):voidZoom the viewport to a zoom level z.
Parameterszoom:Number — Target value for the viewport's zoom property
|
|
transformX:Number — Horizontal coordinate of the zooming center
|
|
transformY:Number — Vertical coordinate of the zooming center
|
|
immediately:Boolean (default = false) |
| resize | event |
| targetUpdate | event |
| transform | event |
| transformEnd | event |
| transformStart | event |