Packageorg.openzoom.flash.viewport
Interfacepublic interface IViewportTransform extends IDisposable
SubinterfacesIViewportTransformContainer
ImplementorsNullTransformer, SmoothTransformer, TweenerTransformer, TweensyZeroTransformer, ViewportTransform

Interface for viewport transform implementations.



Public Properties
 PropertyDefined by
  bottom : Number
[read-only] The sum of the y and height properties.
IViewportTransform
  bottomRight : Point
[read-only] The location of the IViewport object's bottom-right corner, determined by the values of the right and bottom properties.
IViewportTransform
  center : Point
[read-only] Returns the center of the transform.
IViewportTransform
  height : Number
Vertical dimension of the viewport.
IViewportTransform
  left : Number
[read-only] The x coordinate of the top-left corner of the viewport.
IViewportTransform
  right : Number
[read-only] The sum of the x and width properties.
IViewportTransform
  scale : Number
Scale of the scene.
IViewportTransform
  sceneHeight : Number
[read-only] Indicates the height of the scene, in pixels.
IViewportTransform
  sceneWidth : Number
[read-only] Indicates the width of the scene, in pixels.
IViewportTransform
  top : Number
[read-only] Coordinate of the upper boundary of the viewport transform.
IViewportTransform
  topLeft : Point
[read-only] The location of the IViewport object's top-left corner, determined by the x and y coordinates of the point.
IViewportTransform
  viewportHeight : Number
[read-only] Height of the viewport container.
IViewportTransform
  viewportWidth : Number
[read-only] Width of the viewport container.
IViewportTransform
  width : Number
Horizontal dimension of the viewport.
IViewportTransform
  x : Number
Horizontal coordinate of the viewport.
IViewportTransform
  y : Number
Vertical coordinate of the viewport.
IViewportTransform
  zoom : Number
Zoom level of the viewport.
IViewportTransform
Public Methods
 MethodDefined by
  
Returns a new IViewportTransform object with the same values for the x, y, width, height and zoom properties as the original IViewportTransform object.
IViewportTransform
  
contains(x:Number, y:Number):Boolean
Determines whether the specified point is contained within this Viewport object.
IViewportTransform
  
Copy values from other to this instance of IViewportTransform.
IViewportTransform
 Inherited
dispose():void
Releases all resources this object holds on to.
IDisposable
  
equals(other:IViewportTransform):Boolean
Determines whether the object specified in the other parameter is equal to this Rectangle object.
IViewportTransform
  
fitToBounds(bounds:Rectangle, scale:Number = 1.0):void
Show an area of the scene inside the viewport.
IViewportTransform
  
getBounds():Rectangle
Returns a Rectangle object with the bounds of the viewport.
IViewportTransform
  
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.
IViewportTransform
  
intersects(toIntersect:Rectangle):Boolean
Determines whether the object specified in the toIntersect parameter intersects with this Viewport object.
IViewportTransform
  
panBy(deltaX:Number, deltaY:Number):void
Move the viewport.
IViewportTransform
  
panCenterTo(centerX:Number, centerY:Number):void
Move the viewport center.
IViewportTransform
  
panTo(x:Number, y:Number):void
Move the viewport.
IViewportTransform
  
showAll():void
Fit entire scene into the viewport.
IViewportTransform
  
zoomBy(factor:Number, transformX:Number = 0.5, transformY:Number = 0.5):void
Zoom the viewport by a factor.
IViewportTransform
  
zoomTo(zoom:Number, transformX:Number = 0.5, transformY:Number = 0.5):void
Zoom the viewport to the given zoom level.
IViewportTransform
Property detail
bottomproperty
bottom:Number  [read-only]

The sum of the y and height properties.

Implementation
    public function get bottom():Number
bottomRightproperty 
bottomRight:Point  [read-only]

The location of the IViewport object's bottom-right corner, determined by the values of the right and bottom properties.

Implementation
    public function get bottomRight():Point
centerproperty 
center:Point  [read-only]

Returns the center of the transform.

Implementation
    public function get center():Point
heightproperty 
height:Number  [read-write]

Vertical dimension of the viewport.

Implementation
    public function get height():Number
    public function set height(value:Number):void
leftproperty 
left:Number  [read-only]

The x coordinate of the top-left corner of the viewport.

Implementation
    public function get left():Number
rightproperty 
right:Number  [read-only]

The sum of the x and width properties.

Implementation
    public function get right():Number
scaleproperty 
scale:Number  [read-write]

Scale of the scene.

Implementation
    public function get scale():Number
    public function set scale(value:Number):void
sceneHeightproperty 
sceneHeight:Number  [read-only]

Indicates the height of the scene, in pixels.

Implementation
    public function get sceneHeight():Number
sceneWidthproperty 
sceneWidth:Number  [read-only]

Indicates the width of the scene, in pixels.

Implementation
    public function get sceneWidth():Number
topproperty 
top:Number  [read-only]

Coordinate of the upper boundary of the viewport transform.

Implementation
    public function get top():Number
topLeftproperty 
topLeft:Point  [read-only]

The location of the IViewport object's top-left corner, determined by the x and y coordinates of the point.

Implementation
    public function get topLeft():Point
viewportHeightproperty 
viewportHeight:Number  [read-only]

Height of the viewport container.

Implementation
    public function get viewportHeight():Number
viewportWidthproperty 
viewportWidth:Number  [read-only]

Width of the viewport container.

Implementation
    public function get viewportWidth():Number
widthproperty 
width:Number  [read-write]

Horizontal dimension of the viewport.

Implementation
    public function get width():Number
    public function set width(value:Number):void
xproperty 
x:Number  [read-write]

Horizontal coordinate of the viewport.

Implementation
    public function get x():Number
    public function set x(value:Number):void
yproperty 
y:Number  [read-write]

Vertical coordinate of the viewport.

Implementation
    public function get y():Number
    public function set y(value:Number):void
zoomproperty 
zoom:Number  [read-write]

Zoom level of the viewport. Scene fits exactly into viewport at value 1.

Implementation
    public function get zoom():Number
    public function set zoom(value:Number):void
Method detail
clone()method
public function clone():IViewportTransform

Returns a new IViewportTransform object with the same values for the x, y, width, height and zoom properties as the original IViewportTransform object.

Returns
IViewportTransform
contains()method 
public function contains(x:Number, y:Number):Boolean

Determines whether the specified point is contained within this Viewport object.

Parameters
x:Number — The x coordinate (horizontal position) of the point.
 
y:Number — The y coordinate (vertical position) of the point.

Returns
Boolean — true if this Viewport object contains the specified point; otherwise false.
copy()method 
public function copy(other:IViewportTransform):void

Copy values from other to this instance of IViewportTransform.

Parameters
other:IViewportTransform
equals()method 
public function equals(other:IViewportTransform):Boolean

Determines whether the object specified in the other parameter is equal to this Rectangle object.

Parameters
other:IViewportTransform

Returns
Boolean
fitToBounds()method 
public function fitToBounds(bounds:Rectangle, scale:Number = 1.0):void

Show an area of the scene inside the viewport.

Parameters
bounds:Rectangle — Rectangular area to be shown in the viewport.
 
scale:Number (default = 1.0) — Scale at which the area is beeing displayed.
getBounds()method 
public function getBounds():Rectangle

Returns a Rectangle object with the bounds of the viewport.

Returns
Rectangle
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.

Parameters
toIntersect:Rectangle — The Rectangle object to compare against to see if it intersects with this Viewport object.

Returns
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.

Parameters
toIntersect:Rectangle — The Rectangle object to compare against this Viewport object.

Returns
Boolean — true if the specified object intersects with this Viewport object; otherwise false.
panBy()method 
public function panBy(deltaX:Number, deltaY:Number):void

Move the viewport.

Parameters
deltaX:Number — Horizontal translation delta
 
deltaY:Number — Vertical translation delta
panCenterTo()method 
public function panCenterTo(centerX:Number, centerY:Number):void

Move the viewport center.

Parameters
centerX:Number — Horizontal coordinate
 
centerY:Number — Vertical coordinate
panTo()method 
public function panTo(x:Number, y:Number):void

Move the viewport.

Parameters
x:Number — Horizontal coordinate
 
y:Number — Vertical coordinate
showAll()method 
public function showAll():void

Fit entire scene into the viewport.

zoomBy()method 
public function zoomBy(factor:Number, transformX:Number = 0.5, transformY:Number = 0.5):void

Zoom the viewport by a factor.

Parameters
factor:Number — Scale factor 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
zoomTo()method 
public function zoomTo(zoom:Number, transformX:Number = 0.5, transformY:Number = 0.5):void

Zoom the viewport to the given zoom level.

Parameters
zoom:Number — Zoom level
 
transformX:Number (default = 0.5) — Horizontal coordinate of the zooming center
 
transformY:Number (default = 0.5) — Vertical coordinate of the zooming center