| Package | com.afcomponents.umap.types |
| Class | public class Size |
import com.afcomponents.umap.types.Size; var size:Size = new Size(100,150); size.height /= 2; trace(size); // traces (width=100, height=75)
| Property | Defined by | ||
|---|---|---|---|
| height : uint
Gets or sets rectangle's height.
| Size | ||
| width : uint
Gets or sets rectangle's width.
| Size | ||
| Method | Defined by | ||
|---|---|---|---|
|
Size(width:uint, height:uint)
Size constructor.
| Size | ||
|
Creates a copy of this
Size object. | Size | ||
|
deflate(x:uint, y:uint):void
Decreases the area dimensions by given horizontal & vertical values.
| Size | ||
|
Determines whether two Size objects are equal.
| Size | ||
|
fromRectangle(rect:Rectangle):Size
[static]
Returns new
Size object from a Rectangle object. | Size | ||
|
getTypeFromXML(xml:XML):Size
[static]
Returns new object, which will be constructed from the source XML data.
| Size | ||
|
getXMLFromType(size:Size, name:String):XML
[static]
Returns XML data that describes the Object.
| Size | ||
|
inflate(x:uint, y:uint):void
Increases the area dimensions by given horizontal & vertical values.
| Size | ||
|
toString():String
Returns a
String that represents this object's properties. | Size | ||
| Constant | Defined by | ||
|---|---|---|---|
| DEFAULT_NODE_NAME : String = "size" [static]
Defines default root node name for XML conversion.
| Size | ||
| height | property |
height:uint [read-write]Gets or sets rectangle's height.
The default value is 0.
public function get height():uint
public function set height(value:uint):void
| width | property |
width:uint [read-write]Gets or sets rectangle's width.
The default value is 0.
public function get width():uint
public function set width(value:uint):void
| Size | () | constructor |
public function Size(width:uint, height:uint)Size constructor. Constructs a Size object with specified width & height dimensions.
Parameterswidth:uint — Rectangle's width
|
|
height:uint — Rectangle's height
|
| clone | () | method |
public function clone():Size
Creates a copy of this Size object.
Size —
A copy of this object.
|
| deflate | () | method |
public function deflate(x:uint, y:uint):voidDecreases the area dimensions by given horizontal & vertical values.
Parametersx:uint — Amount of horizontal area decrease.
|
|
y:uint — Amount of vertical area decrease.
|
| equals | () | method |
public function equals(other:Size):BooleanDetermines whether two Size objects are equal.
Two Size objects are equal if all parameters in this object are equal to the parameters of the other.
Parametersother:Size — The object to be compared.
|
Boolean — A value of true if object is equal to this Size object; false if it is not.
|
| fromRectangle | () | method |
public static function fromRectangle(rect:Rectangle):Size
Returns new Size object from a Rectangle object.
rect:Rectangle — Source Rectangle object.
|
Size —
New Size object or a value of null if the rectangle object is invalid.
|
| getTypeFromXML | () | method |
public static function getTypeFromXML(xml:XML):SizeReturns new object, which will be constructed from the source XML data.
Parametersxml:XML — Source XML data.
|
Size —
Object that was constructed from the source XML data.
|
| getXMLFromType | () | method |
public static function getXMLFromType(size:Size, name:String):XMLReturns XML data that describes the Object. You can also specify root node name in the second parameter.
Parameterssize:Size — Object that should be converted to XML.
|
|
name:String — Root node name.
|
XML — XML data that describes the properties of the source object.
|
| inflate | () | method |
public function inflate(x:uint, y:uint):voidIncreases the area dimensions by given horizontal & vertical values.
Parametersx:uint — Amount of horizontal area increase.
|
|
y:uint — Amount of vertical area increase.
|
| toString | () | method |
public function toString():String
Returns a String that represents this object's properties.
The output will look like "(width=width, height=height)"
ReturnsString — A textual representation of this Size object.
|
| DEFAULT_NODE_NAME | constant |
public static const DEFAULT_NODE_NAME:String = "size"Defines default root node name for XML conversion.