Apache Flex (FlexJS) 0.7.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
Rectangle

Package | org.apache.flex.geom
Class | public class Rectangle
Inheritance | Rectangle Object

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The Rectangle class is a utility class for holding four coordinates of a rectangle

Public Properties

| Property | Defined By
--- | --- | ---
|  | bottom : Number | Rectangle
|  | bottomRight : Point | Rectangle
|  | height : Number | Rectangle
|  | left : Number | Rectangle
|  | right : Number | Rectangle
|  | size : Point | Rectangle
|  | top : Number | Rectangle
|  | topLeft : Point | Rectangle
|  | width : Number | Rectangle
|  | x : Number | Rectangle
|  | y : Number | Rectangle

Public Methods

| Method | Defined By
--- | --- | ---
|  | Rectangle(x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0) | Rectangle
|  | clone():Rectangle | Rectangle
|  | contains(x:Number, y:Number):Boolean | Rectangle
|  | containsPoint(point:Point):Boolean | Rectangle
|  | containsRect(rect:Rectangle):Boolean | Rectangle
|  | copyFrom(sourceRect:Rectangle):void | Rectangle
|  | equals(toCompare:Rectangle):Boolean | Rectangle
|  | inflate(dx:Number, dy:Number):void | Rectangle
|  | inflatePoint(point:Point):void | Rectangle
|  | intersection(toIntersect:Rectangle):Rectangle | Rectangle
|  | intersects(toIntersect:Rectangle):Boolean | Rectangle
|  | isEmpty():Boolean | Rectangle
|  | offset(dx:Number, dy:Number):void | Rectangle
|  | offsetPoint(point:Point):void | Rectangle
|  | setEmpty():void | Rectangle
|  | setTo(xa:Number, ya:Number, widtha:Number, heighta:Number):void | Rectangle
|  | toString():String | Rectangle
|  | union(toUnion:Rectangle):Rectangle | Rectangle

Property Detail

bottom | property

`bottom:Number`

Implementation
`public function get bottom():Number`
`public function set bottom(value:Number):void`

bottomRight | property |

`bottomRight:Point`

Implementation
`public function get bottomRight():Point`
`public function set bottomRight(value:Point):void`

height | property |

`public var height:Number`

left | property |

`left:Number`

Implementation
`public function get left():Number`
`public function set left(value:Number):void`

right | property |

`right:Number`

Implementation
`public function get right():Number`
`public function set right(value:Number):void`

size | property |

`size:Point`

Implementation
`public function get size():Point`
`public function set size(value:Point):void`

top | property |

`top:Number`

Implementation
`public function get top():Number`
`public function set top(value:Number):void`

topLeft | property |

`topLeft:Point`

Implementation
`public function get topLeft():Point`
`public function set topLeft(value:Point):void`

width | property |

`public var width:Number`

x | property |

`public var x:Number`

y | property |

`public var y:Number`

Constructor Detail

Rectangle | () | Constructor

`public function Rectangle(x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0)`

Parameters

| `x:Number` (default = `0`)``
| `y:Number` (default = `0`)``
| `width:Number` (default = `0`)``
| `height:Number` (default = `0`)``

Method Detail

clone | () | method

`public function clone():Rectangle`

Returns

| `Rectangle`

contains | () | method |

`public function contains(x:Number, y:Number):Boolean`

Parameters

| `x:Number`
| `y:Number`

Returns

| `Boolean`

containsPoint | () | method |

`public function containsPoint(point:Point):Boolean`

Parameters

| `point:Point`

Returns

| `Boolean`

containsRect | () | method |

`public function containsRect(rect:Rectangle):Boolean`

Parameters

| `rect:Rectangle`

Returns

| `Boolean`

copyFrom | () | method |

`public function copyFrom(sourceRect:Rectangle):void`

Parameters

| `sourceRect:Rectangle`

equals | () | method |

`public function equals(toCompare:Rectangle):Boolean`

Parameters

| `toCompare:Rectangle`

Returns

| `Boolean`

inflate | () | method |

`public function inflate(dx:Number, dy:Number):void`

Parameters

| `dx:Number`
| `dy:Number`

inflatePoint | () | method |

`public function inflatePoint(point:Point):void`

Parameters

| `point:Point`

intersection | () | method |

`public function intersection(toIntersect:Rectangle):Rectangle`

Parameters

| `toIntersect:Rectangle`

Returns

| `Rectangle`

intersects | () | method |

`public function intersects(toIntersect:Rectangle):Boolean`

Parameters

| `toIntersect:Rectangle`

Returns

| `Boolean`

isEmpty | () | method |

`public function isEmpty():Boolean`

Returns

| `Boolean`

offset | () | method |

`public function offset(dx:Number, dy:Number):void`

Parameters

| `dx:Number`
| `dy:Number`

offsetPoint | () | method |

`public function offsetPoint(point:Point):void`

Parameters

| `point:Point`

setEmpty | () | method |

`public function setEmpty():void`

setTo | () | method |

`public function setTo(xa:Number, ya:Number, widtha:Number, heighta:Number):void`

Parameters

| `xa:Number`
| `ya:Number`
| `widtha:Number`
| `heighta:Number`

toString | () | method |

`public function toString():String`

Returns

| `String`

union | () | method |

`public function union(toUnion:Rectangle):Rectangle`

Parameters

| `toUnion:Rectangle`

Returns

| `Rectangle`

Mon Sep 5 2016, 07:19 AM -07:00