| Package | graphics.geom |
| Class | public class Dimension |
| Inheritance | Dimension Object |
| Implements | Geometry |
| Subclasses | AspectRatio |
Dimension class encapsulates the width and height of an object.
| Property | Defined By | ||
|---|---|---|---|
| height : Number
Determinates the height value of this instance. | Dimension | ||
| width : Number
Determinates the width value of this instance. | Dimension | ||
| ZERO : Dimension [static]
Defines the Dimension object with the width and height properties set to zero. | Dimension | ||
| Method | Defined By | ||
|---|---|---|---|
Dimension(... arguments)
Creates a new Dimension instance. | Dimension | ||
clone():*
Returns a shallow copy of this instance. | Dimension | ||
Decreases the size by s and return its self(this). | Dimension | ||
equals(o:*):Boolean
Compares the specified object with this object for equality. | Dimension | ||
getBounds(x:Number, y:Number):Rectangle
Returns a new bounds with this size with a pos. | Dimension | ||
Increases the size by s and return its self(this). | Dimension | ||
setSize(w:Number, h:Number):void
Sets the size of this instance. | Dimension | ||
toObject():Object
Returns the Object representation of this object. | Dimension | ||
toSource(indent:int = 0):String
Returns the source code string representation of the object. | Dimension | ||
toString():String
Returns the string representation of this instance. | Dimension | ||
| height | property |
height:NumberDeterminates the height value of this instance.
public function get height():Number public function set height(value:Number):void| width | property |
width:NumberDeterminates the width value of this instance.
public function get width():Number public function set width(value:Number):void| ZERO | property |
public static var ZERO:DimensionDefines the Dimension object with the width and height properties set to zero.
| Dimension | () | Constructor |
public function Dimension(... arguments)
Creates a new Dimension instance.
... arguments |
| clone | () | method |
public function clone():*Returns a shallow copy of this instance.
Returns* — a shallow copy of this instance.
|
| decreaseSize | () | method |
public function decreaseSize(s:Dimension):DimensionDecreases the size by s and return its self(this).
Parameters
s:Dimension — an other Dimension reference to decreases the current Dimension.
|
Dimension — the current reference of this object.
|
| equals | () | method |
public function equals(o:*):BooleanCompares the specified object with this object for equality.
Parameters
o:* |
Boolean — true if the the specified object is equal with this object.
|
| getBounds | () | method |
public function getBounds(x:Number, y:Number):RectangleReturns a new bounds with this size with a pos.
Parameters
x:Number | |
y:Number |
Rectangle — a new bounds with this size with a pos.
|
| increaseSize | () | method |
public function increaseSize(s:Dimension):DimensionIncreases the size by s and return its self(this).
Parameters
s:Dimension — an other Dimension reference to increase the current Dimension.
|
Dimension — the current reference of this object.
|
| setSize | () | method |
public function setSize(w:Number, h:Number):voidSets the size of this instance.
Parameters
w:Number | |
h:Number |
| toObject | () | method |
public function toObject():ObjectReturns the Object representation of this object.
ReturnsObject — the Object representation of this object.
|
| toSource | () | method |
public function toSource(indent:int = 0):StringReturns the source code string representation of the object.
Parameters
indent:int (default = 0) |
String — the source code string representation of the object.
|
| toString | () | method |
public function toString():StringReturns the string representation of this instance.
ReturnsString — the string representation of this instance.
|