| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
The Dimension class encapsulates the width and height
of an object (in double precision) in a single object.
Normally the values of width and height are non-negative
integers. The constructors that allow you to create
a dimension do not prevent you from setting a negative
value for these properties. If the value of width or height
is negative, the behavior of some methods defined by other
objects is undefined.
public var height:Number
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
The height dimension, negative values can be used.
public var width:Number
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
The width dimension, negative values can be used.
public function Dimension(width:Number = 0, height:Number = 0)
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Constructs a Dimension and initializes it
to the specified width and specified height.
Parameters
| width:Number (default = 0) — specified width
|
| |
| height:Number (default = 0) — specified height
|
public function clone():Dimension
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns a copy of this Dimension object.
Returns
public function equals(dimension:Dimension):Boolean
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Checks whether two dimension objects have equal values.
Parameters
| dimension:Dimension — the reference object with which to compare.
|
Returns
| Boolean — true if this object is the same as the obj
argument, false otherwise.
|
public function scale(n:Number):Dimension
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Parameters
Returns
public function setSize(dimension:Dimension):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Sets the size of this Dimension object to the specified size.
Parameters
| dimension:Dimension — the new size for this Dimension object
|
public function setSizeWH(width:Number, height:Number):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Sets the size of this Dimension object to the specified width and height.
Parameters
| width:Number — the new width for this Dimension object
|
| |
| height:Number — the new height for this Dimension object
|
public function toPoint():Point
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns a Point object with its x and y sets
respectively on width and height of this
Dimension.
Returns
| Point — a Point object which contains values
of this Dimension
|
public function toString():String
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns the String representation of this object/
Returns
| String — the String representation of this object
|
LowRA API documentation 2008- 2009
Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1
mer. févr. 25 2009, 9:22 AM GMT+01:00