| Package | com.rubenswieringa.geom |
| Class | public class SuperRectangle |
| Inheritance | SuperRectangle mx.graphics.RoundedRectangle |
| Property | Defined by | ||
|---|---|---|---|
| bottomLeft : Point [read-only]
Point representing the lower left corner of this SuperRectangle.
| SuperRectangle | ||
| center : Point [read-only]
The center of the SuperRectangle.
| SuperRectangle | ||
| middle : Point [read-only]
The center of this SuperRectangle instance.
| SuperRectangle | ||
| topRight : Point [read-only]
Point representing the upper right corner of this SuperRectangle.
| SuperRectangle | ||
| Method | Defined by | ||
|---|---|---|---|
|
SuperRectangle(x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, cornerRadius:Number = 0)
Constructor.
| SuperRectangle | ||
|
createSuperRectangle(rect:Rectangle):SuperRectangle
[static]
Takes a Rectangle instance and returns it as a SuperRectangle with the same position, width, height, and (if applicable) corner-radius.
| SuperRectangle | ||
|
getCorners():Array
Returns an Array with Point instances indicating the corners of the SuperRectangle.
| SuperRectangle | ||
|
getLines():Array
Returns an Array with Point instances indicating the 4 sides of this SuperRectangle as Lines.
| SuperRectangle | ||
|
isOnSide(point:Point):int
Indicates on which side of this SuperRectangle a Point is.
| SuperRectangle | ||
|
toArray():Array
Returns an Array with Point instances indicating the corners of the SuperRectangle.
| SuperRectangle | ||
| Constant | Defined by | ||
|---|---|---|---|
| BOTTOM : int = 2 [static]
| SuperRectangle | ||
| LEFT : int = 3 [static]
| SuperRectangle | ||
| NONE : int = -1 [static]
| SuperRectangle | ||
| RIGHT : int = 1 [static]
| SuperRectangle | ||
| TOP : int = 0 [static]
| SuperRectangle | ||
| bottomLeft | property |
bottomLeft:Point [read-only]Point representing the lower left corner of this SuperRectangle.
Implementation public function get bottomLeft():Point
| center | property |
center:Point [read-only]The center of the SuperRectangle.
Implementation public function get center():Point
| middle | property |
middle:Point [read-only]The center of this SuperRectangle instance.
Implementation public function get middle():Point
| topRight | property |
topRight:Point [read-only]Point representing the upper right corner of this SuperRectangle.
Implementation public function get topRight():Point
| SuperRectangle | () | constructor |
public function SuperRectangle(x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, cornerRadius:Number = 0)Constructor.
Parametersx:Number (default = 0) |
|
y:Number (default = 0) |
|
width:Number (default = 0) |
|
height:Number (default = 0) |
|
cornerRadius:Number (default = 0) |
| createSuperRectangle | () | method |
public static function createSuperRectangle(rect:Rectangle):SuperRectangleTakes a Rectangle instance and returns it as a SuperRectangle with the same position, width, height, and (if applicable) corner-radius.
Parametersrect:Rectangle — Rectangle
|
SuperRectangle —
rect as a SuperRectangle.
|
| getCorners | () | method |
public function getCorners():ArrayReturns an Array with Point instances indicating the corners of the SuperRectangle. The first index (0) is the top-left corner, the second (1) the top-right, etc.
ReturnsArray — Array
|
| getLines | () | method |
public function getLines():ArrayReturns an Array with Point instances indicating the 4 sides of this SuperRectangle as Lines.
ReturnsArray — Array
|
See also
| isOnSide | () | method |
public function isOnSide(point:Point):intIndicates on which side of this SuperRectangle a Point is. Note that if the Point is not on the SuperRectangle its border, -1 will be the return-value.
Parameterspoint:Point — A coordinate.
|
int — An integer indicating on which side a given coordinate is. 0 stands for he top-side, 1 for right-side, etc. Use the constants of the SuperRectangle class for improved code-readability.
|
See also
| toArray | () | method |
public function toArray():ArrayReturns an Array with Point instances indicating the corners of the SuperRectangle. The first index (0) is the top-left corner, the second (1) the top-right, etc.
ReturnsArray — Array
|
See also
| BOTTOM | constant |
public static const BOTTOM:int = 2
| LEFT | constant |
public static const LEFT:int = 3
| NONE | constant |
public static const NONE:int = -1
| RIGHT | constant |
public static const RIGHT:int = 1
| TOP | constant |
public static const TOP:int = 0