| Package | graphics.geom |
| Class | public class Rectangles |
| Inheritance | Rectangles Object |
Rectangle class is used to create and modify Rectangle objects.
A Rectangle object is an area defined by its position, as indicated by its top-left corner point (x, y), and by its width and its height.
The x, y, width, and height properties of the Rectangle class are independent of each other; changing the value of one property has no effect on the others.
To used this class with a FP8 and > with flash.display.BitmapData class and other flash.classes you can use the method toFlash() to return a compatible reference of this object.
| Method | Defined By | ||
|---|---|---|---|
compare(rectangle1:Rectangle, rectangle2:Rectangle):int [static]
Compares its two arguments for order. | Rectangles | ||
equals(rectangle1:Rectangle, rectangle2:Rectangle):Boolean [static]
Compares the specified Rectangle objects for equality. | Rectangles | ||
getBottomLeft(rectangle:Rectangle):Point [static]
Returns the location of the Rectangle object's bottom-left corner, determined by the values of the x and y properties. | Rectangles | ||
getCenter(rectangle:Rectangle):Point [static]
Returns the location of the Rectangle object's center, determined by the values of the x and y properties. | Rectangles | ||
getTopRight(rectangle:Rectangle):Point [static]
Returns the location of the Rectangle object's top-right corner determined by the x and y values of the point. | Rectangles | ||
setBottomLeft(rectangle:Rectangle, point:Point):void [static]
Sets the location of the Rectangle object's bottom-left corner, determined by the values of the x and y properties. | Rectangles | ||
setCenter(rectangle:Rectangle, point:Point):void [static]
Sets the x and y coordinates of the top-left corner of the rectangle if the specified value in argument is the middle of the Rectangle. | Rectangles | ||
setTopRight(rectangle:Rectangle, point:Point):void [static]
Sets the location of the Rectangle object's top-right corner determined by the x and y values of the point. | Rectangles | ||
toObject(rectangle:Rectangle):Object [static]
Returns the Object representation of this object. | Rectangles | ||
toSource(rectangle:Rectangle):String [static]
Returns the source code string representation of the object. | Rectangles | ||
| compare | () | method |
public static function compare(rectangle1:Rectangle, rectangle2:Rectangle):intCompares its two arguments for order.
Parameters
rectangle1:Rectangle — the first Rectangle to compare.
| |
rectangle2:Rectangle — the second Rectangle to compare.
|
int —
|
ClassCastError — the arguments of the method must be Rectangle reference.
|
| equals | () | method |
public static function equals(rectangle1:Rectangle, rectangle2:Rectangle):BooleanCompares the specified Rectangle objects for equality.
Parameters
rectangle1:Rectangle | |
rectangle2:Rectangle |
Boolean — true if the the specified Rectangle objects are equals.
|
| getBottomLeft | () | method |
public static function getBottomLeft(rectangle:Rectangle):PointReturns the location of the Rectangle object's bottom-left corner, determined by the values of the x and y properties.
Parameters
rectangle:Rectangle |
Point — the location of the Rectangle object's bottom-left corner, determined by the values of the x and y properties.
|
| getCenter | () | method |
public static function getCenter(rectangle:Rectangle):PointReturns the location of the Rectangle object's center, determined by the values of the x and y properties.
Parameters
rectangle:Rectangle |
Point — the location of the Rectangle object's center, determined by the values of the x and y properties.
|
| getTopRight | () | method |
public static function getTopRight(rectangle:Rectangle):PointReturns the location of the Rectangle object's top-right corner determined by the x and y values of the point.
Parameters
rectangle:Rectangle |
Point — the location of the Rectangle object's top-right corner determined by the x and y values of the point.
|
| setBottomLeft | () | method |
public static function setBottomLeft(rectangle:Rectangle, point:Point):voidSets the location of the Rectangle object's bottom-left corner, determined by the values of the x and y properties.
Parameters
rectangle:Rectangle | |
point:Point |
| setCenter | () | method |
public static function setCenter(rectangle:Rectangle, point:Point):voidSets the x and y coordinates of the top-left corner of the rectangle if the specified value in argument is the middle of the Rectangle.
Parameters
rectangle:Rectangle | |
point:Point |
| setTopRight | () | method |
public static function setTopRight(rectangle:Rectangle, point:Point):voidSets the location of the Rectangle object's top-right corner determined by the x and y values of the point.
Parameters
rectangle:Rectangle | |
point:Point |
| toObject | () | method |
public static function toObject(rectangle:Rectangle):ObjectReturns the Object representation of this object.
Parameters
rectangle:Rectangle |
Object — the Object representation of this object.
|
| toSource | () | method |
public static function toSource(rectangle:Rectangle):StringReturns the source code string representation of the object.
Parameters
rectangle:Rectangle |
String — the source code string representation of the object.
|