Packageorg.flixel
Classpublic class FlxRect
InheritanceFlxRect Inheritance Object
Subclasses FlxQuadTree

Stores a rectangle.



Public Properties
 PropertyDefined By
  bottom : Number
[read-only] The Y coordinate of the bottom of the rectangle.
FlxRect
  height : Number
FlxRect
  left : Number
[read-only] The X coordinate of the left side of the rectangle.
FlxRect
  right : Number
[read-only] The X coordinate of the right side of the rectangle.
FlxRect
  top : Number
[read-only] The Y coordinate of the top of the rectangle.
FlxRect
  width : Number
FlxRect
  x : Number
FlxRect
  y : Number
FlxRect
Public Methods
 MethodDefined By
  
FlxRect(X:Number = 0, Y:Number = 0, Width:Number = 0, Height:Number = 0)
Instantiate a new rectangle.
FlxRect
  
Helper function, just copies the values from the specified rectangle.
FlxRect
  
copyFromFlash(FlashRect:Rectangle):FlxRect
Helper function, just copies the values from the specified Flash rectangle.
FlxRect
  
Helper function, just copies the values from this rectangle to the specified rectangle.
FlxRect
  
copyToFlash(FlashRect:Rectangle):Rectangle
Helper function, just copies the values from this rectangle to the specified Flash rectangle.
FlxRect
  
make(X:Number = 0, Y:Number = 0, Width:Number = 0, Height:Number = 0):FlxRect
Instantiate a new rectangle.
FlxRect
  
overlaps(Rect:FlxRect):Boolean
Checks to see if some FlxRect object overlaps this FlxRect object.
FlxRect
Property Detail
bottomproperty
bottom:Number  [read-only]

The Y coordinate of the bottom of the rectangle. Read-only.


Implementation
    public function get bottom():Number
heightproperty 
public var height:Number

The default value is 0.

leftproperty 
left:Number  [read-only]

The X coordinate of the left side of the rectangle. Read-only.


Implementation
    public function get left():Number
rightproperty 
right:Number  [read-only]

The X coordinate of the right side of the rectangle. Read-only.


Implementation
    public function get right():Number
topproperty 
top:Number  [read-only]

The Y coordinate of the top of the rectangle. Read-only.


Implementation
    public function get top():Number
widthproperty 
public var width:Number

The default value is 0.

xproperty 
public var x:Number

The default value is 0.

yproperty 
public var y:Number

The default value is 0.

Constructor Detail
FlxRect()Constructor
public function FlxRect(X:Number = 0, Y:Number = 0, Width:Number = 0, Height:Number = 0)

Instantiate a new rectangle.

Parameters
X:Number (default = 0) — The X-coordinate of the point in space.
 
Y:Number (default = 0) — The Y-coordinate of the point in space.
 
Width:Number (default = 0) — Desired width of the rectangle.
 
Height:Number (default = 0) — Desired height of the rectangle.
Method Detail
copyFrom()method
public function copyFrom(Rect:FlxRect):FlxRect

Helper function, just copies the values from the specified rectangle.

Parameters

Rect:FlxRect — Any FlxRect.

Returns
FlxRect — A reference to itself.
copyFromFlash()method 
public function copyFromFlash(FlashRect:Rectangle):FlxRect

Helper function, just copies the values from the specified Flash rectangle.

Parameters

FlashRect:Rectangle — Any Rectangle.

Returns
FlxRect — A reference to itself.
copyTo()method 
public function copyTo(Rect:FlxRect):FlxRect

Helper function, just copies the values from this rectangle to the specified rectangle.

Parameters

Rect:FlxRect — Any FlxRect.

Returns
FlxRect — A reference to the altered rectangle parameter.
copyToFlash()method 
public function copyToFlash(FlashRect:Rectangle):Rectangle

Helper function, just copies the values from this rectangle to the specified Flash rectangle.

Parameters

FlashRect:Rectangle — Any Rectangle.

Returns
Rectangle — A reference to the altered rectangle parameter.
make()method 
public function make(X:Number = 0, Y:Number = 0, Width:Number = 0, Height:Number = 0):FlxRect

Instantiate a new rectangle.

Parameters

X:Number (default = 0) — The X-coordinate of the point in space.
 
Y:Number (default = 0) — The Y-coordinate of the point in space.
 
Width:Number (default = 0) — Desired width of the rectangle.
 
Height:Number (default = 0) — Desired height of the rectangle.

Returns
FlxRect — A reference to itself.
overlaps()method 
public function overlaps(Rect:FlxRect):Boolean

Checks to see if some FlxRect object overlaps this FlxRect object.

Parameters

Rect:FlxRect — The rectangle being tested.

Returns
Boolean — Whether or not the two rectangles overlap.