Main Page | Packages | Class Tree | Index | Help

xp.system

class Rect

Object
  |
  +--xp.system.Rect

Implemented Interfaces: ICloneable

class Rect
extends Object

Represents a rectangular structure


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:
support@epresenterplus.com Style properties - rowHeight


Field Summary

public
height: Number


public
width: Number


public
x: Number


public
y: Number


Property Summary

public
bottom (read-only)


public
bottomLeft: x,y (read-only)
returns an object with the properties x and y*

public
bottomRight: x+width,y (read-only)
returns an object with the properties x and y*

public
left (read-only)


public
location: x,y (read)
returns an object with the properties x and y*

public
location: (write)


public
right (read-only)


public
size: width,height (read)
returns an object with the properties width and height*

public
size: (write)


public
top (read-only)


public
topLeft: x,y (read-only)
returns an object with the properties x and y*

public
topRight: x+width,y (read-only)
returns an object with the properties x and y*

Constructor

public
Rect ( x: Number, y: Number, w: Number, h: Number)
Initializes a new instance of the Rect class with the specified coordinates/dimensions.

Method Summary

public
clone ( ): Object
Creates a shallow copy of the current Object.

public
contains ( v: Rect ): Boolean
Specifies whether this Rect contains the specified rect.

public
equals ( v: Rect )


public static
fromLTRB ( l, r, t, b ): Rect
Initializes a new instance of the Rect class from the specified coordinates.

public
inflate ( incW: Number, incH: Number ): Void
Inflates the Rectangle by the specified amount

public
offset ( incX: Number, incY: Number ): Void
Offsets the rectangle



Field Documentation

height

public var height: Number

width

public var width: Number

x

public var x: Number

y

public var y: Number

Property Documentation

bottom

public bottom (read-only)

bottomLeft

public bottomLeft: x,y (read-only)
returns an object with the properties x and y*

bottomRight

public bottomRight: x+width,y (read-only)
returns an object with the properties x and y*

left

public left (read-only)

location

public location: x,y (read)
returns an object with the properties x and y*

location

public location: (write)

right

public right (read-only)

size

public size: width,height (read)
returns an object with the properties width and height*

size

public size: (write)

top

public top (read-only)

topLeft

public topLeft: x,y (read-only)
returns an object with the properties x and y*

topRight

public topRight: x+width,y (read-only)
returns an object with the properties x and y*


Constructor Documentation

Rect

public function Rect(x: Number,
 y: Number,
 w: Number,
 h: Number)
Initializes a new instance of the Rect class with the specified coordinates/dimensions.

Parameters:
x
The horizontal position of the rectangle
y
The vertical position of the rectangle.
w
The width of the rectangle.
h
The height of the rectangle.

Method Documentation

clone

public function clone(): Object
Creates a shallow copy of the current Object.

Specified by:
clone in interface ICloneable

contains

public function contains(v: Rect): Boolean
Specifies whether this Rect contains the specified rect.

equals

public function equals(v: Rect)

fromLTRB

public static function fromLTRB(l,
 r,
 t,
 b): Rect
Initializes a new instance of the Rect class from the specified coordinates.

Parameters:
l
The left position of the rectangle
r
The right position of the rectangle.
t
The top position of the rectangle.
b
The bottom position of the rectangle.
Returns:
a new Rectangle

inflate

public function inflate(incW: Number,
 incH: Number): Void
Inflates the Rectangle by the specified amount

Parameters:
incW
The amount to increase the width by
incH
The amount to increase the height by

offset

public function offset(incX: Number,
 incY: Number): Void
Offsets the rectangle

Parameters:
incX
The amount to offet horizontally
incY

The documentation was generated from the following file:


Generated on 10/30/2005 9:34:02 PM by AS2Doc