| Package | pegas.geom |
| Class | public class Dimension |
| Implements | Geometry |
| Subclasses | AspectRatio, Rectangle |
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 | ||
|
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:Number [read-write]Determinates the height value of this instance.
Implementation public function get height():Number
public function set height(value:Number):void
| width | property |
width:Number [read-write]Determinates the width value of this instance.
Implementation 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).
Parameterss: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.
Parameterso:* |
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.
Parametersx: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).
Parameterss: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.
Parametersw: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.
Parametersindent: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.
|