Package | org.openzoom.flash.viewport |
Class | public final class NormalizedViewport |
Inheritance | NormalizedViewport flash.events.EventDispatcher |
Implements | INormalizedViewport, INormalizedViewportContainer |
Property | Defined by | ||
---|---|---|---|
bottom : Number [read-only]
The sum of the y and height properties.
| NormalizedViewport | ||
bottomRight : Point [read-only]
The location of the IViewport object's bottom-right corner,
determined by the values of the right and bottom properties.
| NormalizedViewport | ||
center : Point [read-only]
Returns the center of the viewport.
| NormalizedViewport | ||
height : Number
Vertical dimension of the viewport.
| NormalizedViewport | ||
left : Number [read-only]
The x coordinate of the top-left corner of the viewport.
| NormalizedViewport | ||
right : Number [read-only]
The sum of the x and width properties.
| NormalizedViewport | ||
scale : Number
Scale of the scene.
| NormalizedViewport | ||
scene : IReadonlyMultiScaleScene
[read-only]
Scene this viewport belongs to.
| NormalizedViewport | ||
top : Number [read-only]
The y coordinate of the top-left corner of the viewport.
| NormalizedViewport | ||
topLeft : Point [read-only]
The location of the IViewport object's top-left corner,
determined by the x and y coordinates of the point.
| NormalizedViewport | ||
transform : IViewportTransform
Transformation that is currently applied to the viewport
| NormalizedViewport | ||
transformer : IViewportTransformer
Transforms the IViewport object after its state has been changed.
| NormalizedViewport | ||
viewportHeight : Number [read-only]
Height of the viewport container.
| NormalizedViewport | ||
viewportWidth : Number [read-only]
Width of the viewport container.
| NormalizedViewport | ||
width : Number
Horizontal dimension of the viewport.
| NormalizedViewport | ||
x : Number
Horizontal coordinate of the viewport.
| NormalizedViewport | ||
y : Number
Vertical coordinate of the viewport.
| NormalizedViewport | ||
zoom : Number
Zoom level of the viewport.
| NormalizedViewport |
Method | Defined by | ||
---|---|---|---|
NormalizedViewport(viewportWidth:Number, viewportHeight:Number, scene:IReadonlyMultiScaleScene)
Constructor.
| NormalizedViewport | ||
beginTransform():void
Dispatch
transformStart event to
let all listeners know that a viewport transition has started. | NormalizedViewport | ||
contains(x:Number, y:Number):Boolean
Determines whether the specified point is contained within this Viewport object.
| NormalizedViewport | ||
dispose():void
| NormalizedViewport | ||
endTransform():void
Dispatch
transformEnd event to
let all listeners know that a viewport transition has finished. | NormalizedViewport | ||
fitToBounds(bounds:Rectangle, scale:Number = 1.0, immediately:Boolean = false):void
Show a rectangular area of the scene inside the viewport.
| NormalizedViewport | ||
getBounds():Rectangle
Returns a Rectangle object with the bounds of the viewport.
| NormalizedViewport | ||
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.
| NormalizedViewport | ||
intersects(toIntersect:Rectangle):Boolean
Determines whether the object specified in the toIntersect parameter
intersects with this Viewport object.
| NormalizedViewport | ||
localToScene(point:Point):Point
Converts the point object from the viewport's
container (local) coordinates to scene coordinates.
| NormalizedViewport | ||
panBy(deltaX:Number, deltaY:Number, immediately:Boolean = false):void
Move the viewport.
| NormalizedViewport | ||
panCenterTo(x:Number, y:Number, immediately:Boolean = false):void
Move the viewport center.
| NormalizedViewport | ||
panTo(x:Number, y:Number, immediately:Boolean = false):void
Move the viewport.
| NormalizedViewport | ||
sceneToLocal(point:Point):Point
Converts the point object from scene coordinates
to the viewport's container (local) coordinates.
| NormalizedViewport | ||
setSize(width:Number, height:Number):void
Sets viewportWidth and viewportHeight.
| NormalizedViewport | ||
showAll(immediately:Boolean = false):void
Fit entire scene into the viewport.
| NormalizedViewport | ||
toString():String
| NormalizedViewport | ||
zoomBy(factor:Number, transformX:Number = 0.5, transformY:Number = 0.5, immediately:Boolean = false):void
Zoom the viewport by a factor.
| NormalizedViewport | ||
zoomTo(zoom:Number, transformX:Number = 0.5, transformY:Number = 0.5, immediately:Boolean = false):void
Zoom the viewport to a zoom level z.
| NormalizedViewport |
Event | Summary | Defined by | ||
---|---|---|---|---|
NormalizedViewport | ||||
NormalizedViewport | ||||
NormalizedViewport | ||||
NormalizedViewport | ||||
NormalizedViewport |
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.
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
scene | property |
scene:IReadonlyMultiScaleScene
[read-only]Scene this viewport belongs to.
Implementation public function get scene():IReadonlyMultiScaleScene
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
This property can be used as the source for data binding.
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
NormalizedViewport | () | constructor |
public function NormalizedViewport(viewportWidth:Number, viewportHeight:Number, scene:IReadonlyMultiScaleScene)
Constructor.
ParametersviewportWidth:Number |
|
viewportHeight:Number |
|
scene:IReadonlyMultiScaleScene |
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):Boolean
Determines 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):void
Show 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():Rectangle
Returns a Rectangle object with the bounds of the viewport.
ReturnsRectangle |
intersection | () | method |
public function 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. 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):Boolean
Determines 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):Point
Converts 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):void
Move the viewport.
ParametersdeltaX:Number — Horizontal translation delta
|
|
deltaY:Number — Vertical translation delta
|
|
immediately:Boolean (default = false )
|
panCenterTo | () | method |
public function panCenterTo(x:Number, y:Number, immediately:Boolean = false):void
Move the viewport center.
Parametersx:Number — Horizontal coordinate of the new center
|
|
y:Number — Vertical coordinate of the new center
|
|
immediately:Boolean (default = false )
|
panTo | () | method |
public function panTo(x:Number, y:Number, immediately:Boolean = false):void
Move the viewport.
Parametersx:Number — Horizontal coordinate
|
|
y:Number — Vertical coordinate
|
|
immediately:Boolean (default = false )
|
sceneToLocal | () | method |
public function sceneToLocal(point:Point):Point
Converts the point object from scene coordinates to the viewport's container (local) coordinates.
Parameterspoint:Point |
Point |
setSize | () | method |
public function setSize(width:Number, height:Number):void
Sets viewportWidth and viewportHeight. Dispatches Event.RESIZE.
Parameterswidth:Number |
|
height:Number |
showAll | () | method |
public function showAll(immediately:Boolean = false):void
Fit entire scene into the viewport.
Parametersimmediately:Boolean (default = false )
|
toString | () | method |
public override function toString():String
Returns
String |
zoomBy | () | method |
public function zoomBy(factor:Number, transformX:Number = 0.5, transformY:Number = 0.5, immediately:Boolean = false):void
Zoom the viewport by a factor.
Parametersfactor:Number — Multiplier for the zoom.
|
|
transformX:Number (default = 0.5 ) — Horizontal coordinate of the zooming center
|
|
transformY:Number (default = 0.5 ) — Vertical coordinate of the zooming center
|
|
immediately:Boolean (default = false )
|
zoomTo | () | method |
public function zoomTo(zoom:Number, transformX:Number = 0.5, transformY:Number = 0.5, immediately:Boolean = false):void
Zoom the viewport to a zoom level z.
Parameterszoom:Number — Target value for the viewport's zoom property
|
|
transformX:Number (default = 0.5 ) — Horizontal coordinate of the zooming center
|
|
transformY:Number (default = 0.5 ) — Vertical coordinate of the zooming center
|
|
immediately:Boolean (default = false )
|
resize | event |
targetUpdate | event |
transformEnd | event |
transformStart | event |
transformUpdate | event |