[Classes] [Prev] [Next] [Methods]

CBounds

Methods Index

Heritage
Description
Protected Data Members
Public Methods
Constructor Methods
Utility Methods
Test and Operator Methods

CBounds


Heritage

Superclass: None

Subclasses: None


Description

CBounds is a utility class representing an integer rectangle. In contrast to CRect, CBounds uses integer coordinates, which are more suitable for some applications, such as table-cell addressing. CBounds uses long for its coordinate representation so that it can support large coordinate spaces.

CBounds does not require that Bottom be greater than or equal to Top, nor that Right be greater than or equal to Left. Any rectangle is considered empty if Bottom is less than or equal to Top or if Right is less than or equal to Left.


Protected Data Members

long itsTop;
long itsLeft;
long itsBottom;
long itsRight;


Public Methods

Constructor Methods

CBounds();
CBounds(
long theTop, long theLeft,
long theBottom, long theRight);

Utility Methods

long Top() const;
long Left() const;
long Bottom() const;
long Right() const;
void Top(long theTop);
void Left(long theLeft);
void Bottom(long theBottom);
void Right(long theRight); 
long Height() const; 
long Width() const;
CCell TopLeft() const;
CCell TopRight() const;
CCell BottomLeft() const;
CCell BottomRight() const;

Test and Operator Methods

BOOLEAN Contains(const CCell& theBounds) const;
BOOLEAN IsEqual(const CBounds& theBounds) const;
int operator==(const CBounds& theBounds) const; 
BOOLEAN IsEmpty() const; 
CBounds Intersection(const CBounds& theBounds) const;
CBounds Union(const CBounds& theBounds) const;
CBounds Union(const CCell& theCell) const;
const CBounds& operator+=(const CCell& theCell);
const CBounds& operator-=(const CCell& theCell);


[Classes] [Prev] [Next] [Methods]

support@xvt.com


Visit our online help desk for tech support

Copyright © 2009, Providence Software Solutions Inc. All rights reserved.