class TRect |
Geometric rectangle.
The class represents a rectangle whose sides are parallel with the axes of the co-ordinate system.
The co-ordinates of the top-left and bottom-right corners are used to set the dimensions of the rectangle. The bottom right co-ordinate is outside the rectangle. Thus TRect(TPoint(2,2),TSize(4,4)) is equal to TRect(TPoint(2,2),TPoint(6,6)), and in both cases you get a 4x4 pixel rectangle on the screen.
Functions are provided to initialise and manipulate the rectangle and to extract information about it.
Public Member Functions | |
---|---|
TRect(TUninitialized) | |
TRect() | |
TRect(TInt, TInt, TInt, TInt) | |
TRect(const TPoint &, const TPoint &) | |
TRect(const TPoint &, const TSize &) | |
TRect(const TSize &) | |
IMPORT_C void | BoundingRect(const TRect &) |
IMPORT_C TPoint | Center() |
IMPORT_C TBool | Contains(const TPoint &) |
IMPORT_C void | Grow(TInt, TInt) |
IMPORT_C void | Grow(const TSize &) |
IMPORT_C TInt | Height() |
IMPORT_C void | Intersection(const TRect &) |
IMPORT_C TBool | Intersects(const TRect &) |
IMPORT_C TBool | IsEmpty() |
IMPORT_C TBool | IsNormalized() |
IMPORT_C void | Move(TInt, TInt) |
IMPORT_C void | Move(const TPoint &) |
IMPORT_C void | Normalize() |
IMPORT_C void | Resize(TInt, TInt) |
IMPORT_C void | Resize(const TSize &) |
IMPORT_C void | SetHeight(TInt) |
IMPORT_C void | SetRect(TInt, TInt, TInt, TInt) |
IMPORT_C void | SetRect(const TPoint &, const TPoint &) |
IMPORT_C void | SetRect(const TPoint &, const TSize &) |
IMPORT_C void | SetSize(const TSize &) |
IMPORT_C void | SetWidth(TInt) |
IMPORT_C void | Shrink(TInt, TInt) |
IMPORT_C void | Shrink(const TSize &) |
IMPORT_C TSize | Size() |
IMPORT_C TInt | Width() |
IMPORT_C TBool | operator!=(const TRect &) |
IMPORT_C TBool | operator==(const TRect &) |
Private Member Functions | |
---|---|
void | Adjust(TInt, TInt) |
Public Member Enumerations | |
---|---|
enum | TUninitialized { EUninitialized } |
Public Attributes | |
---|---|
TPoint | iBr |
TPoint | iTl |
TRect | ( | TUninitialized | ) | [inline] |
Constructs a default rectangle.
This initialises the co-ordinates of its top left and bottom right corners to (0,0).
TUninitialized |
IMPORT_C void | BoundingRect | ( | const TRect & | aRect | ) |
const TRect & aRect |
IMPORT_C TBool | Contains | ( | const TPoint & | aPoint | ) | const |
const TPoint & aPoint |
IMPORT_C void | Intersection | ( | const TRect & | aRect | ) |
const TRect & aRect |
IMPORT_C TBool | Intersects | ( | const TRect & | aRect | ) | const |
const TRect & aRect |
IMPORT_C void | SetRect | ( | const TPoint & | aPointTL, |
const TPoint & | aPointBR | |||
) |
IMPORT_C void | SetRect | ( | const TPoint & | aPoint, |
const TSize & | aSize | |||
) |
IMPORT_C TBool | operator!= | ( | const TRect & | aRect | ) | const |
const TRect & aRect |
IMPORT_C TBool | operator== | ( | const TRect & | aRect | ) | const |
const TRect & aRect |