Public Member Functions | |
| TMCRect (void) | |
| TMCRect (const int32 left, const int32 top, const int32 right, const int32 bottom) | |
| TMCRect (const TMCPoint &topLeft, const TMCPoint &bottomRight) | |
| int32 | L (void) const |
| int32 | T (void) const |
| int32 | R (void) const |
| int32 | B (void) const |
| void | CenterInside (const TMCRect &inRect) |
| void | MaximizeInside (const TMCRect &inBounds, const TMCPoint &inRatio) |
| boolean | EqualDimensions (const TMCRect &inRect) const |
| boolean | Empty (void) const |
| boolean | Valid () const |
| boolean | Invalid () const |
| boolean | Equal (const TMCRect &inRect) const |
| int32 | GetWidth (void) const |
| int32 | GetHeight (void) const |
| TMCPoint | GetSize (void) const |
| TMCPoint | GetCenter (void) const |
| int32 | GetArea (void) const |
| void | Inset (const int32 dx, const int32 dy) |
| boolean | Intersect (const TMCRect &inRect, const boolean inSetEmpty=1) |
| void | Offset (const int32 dx, const int32 dy) |
| void | PinPoint (const TMCPoint &inPt, TMCPoint &outPoint) const |
| TMCPoint | PinPoint (const TMCPoint &inPt) const |
| void | Proportion (const TMCRect &inRect) |
| void | PtToRect (const TMCPoint &pt1, const TMCPoint &pt2) |
| boolean | PtInside (const TMCPoint &srcPt) const |
| boolean | RectInside (const TMCRect &inRect) const |
| boolean | RectInRect (const TMCRect &inRect) const |
| boolean | RectOverRect (const TMCRect &inRect) const |
| void | Scale (const float scale) |
| void | Set (const int32 left, const int32 top, const int32 right, const int32 bottom) |
| void | SetEmpty (void) |
| void | SetInvalid (void) |
| void | Union (const TMCRect &inRect) |
| void | SafeUnion (const TMCRect &inRect) |
| void | UnionPt (const TMCPoint &inPt) |
| TMCPoint | TopLeft (void) const |
| TMCPoint | TopRight (void) const |
| TMCPoint | TopCenter (void) const |
| TMCPoint | LeftCenter (void) const |
| TMCPoint | RightCenter (void) const |
| TMCPoint | BottomLeft (void) const |
| TMCPoint | BottomRight (void) const |
| TMCPoint | BottomCenter (void) const |
| boolean | operator== (const TMCRect &rr) const |
| boolean | operator!= (const TMCRect &rr) const |
| TMCRect & | operator= (const TMCRect &rr) |
| TMCRect & | operator= (const int32 i) |
| TMCRect & | operator+= (const TMCPoint &pp) |
| TMCRect & | operator-= (const TMCPoint &pp) |
Public Attributes | |
| int32 | left |
| int32 | top |
| int32 | right |
| int32 | bottom |
Static Public Attributes | |
| const TMCRect | kZero |
| const TMCRect | kEmpty |
| const TMCRect | kInvalid |
| const TMCRect | kBiggest |
|
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Positions "centerRect" at the center of srcRect. |
|
|
Return TRUE if the rectangle has no width or height. |
|
|
UIFramework Compatibility: Equal(). Compare the components of the two rectangles and return TRUE if they are all the same. |
|
|
Compare the components of the two rectangles and return TRUE if they are the same width and height. |
|
|
Calculate and return the area of the rectangle. |
|
|
Calculate and return the center of the rectangle. |
|
|
Calculate and return the height of the rectangle. May return a negative width. |
|
|
returns TMCPoint(GetWidth(), GetHeight()) |
|
|
Calculate and return the width of the rectangle. May return a negative width. |
|
||||||||||||
|
InsetRect shrinks or expands the rectangle. The left and right sides are moved by dx; the top and bottom sides are moved by dy. Note: The rectangle is not set to an empty rect (0,0,0,0) if the resulting width or height is less than zero. |
|
||||||||||||
|
Intersect calculates the rectangle that is the intersection of "this" and the input rectangle, and returns TRUE if they indeed intersect or FALSE if they do not. If the rectangles do not intersect, the rect is set either empty or invalid based on the "inSetEmpty" flag. |
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
Gives "this" the maximum possible size at the center of inBounds that has the same ratio than inRatio |
|
||||||||||||
|
Offset moves the rectangle by adding dx to the horizontal coordinates, and adding dy to the vertical coordinates. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Pin the passed in point to within the rectangle and return the resulting point. |
|
||||||||||||
|
Pin the passed in point to within the rectangle and return the resulting point. |
|
|
Proportionally map src rect into dst. Warning: zero width or zero height rects are dangerous. |
|
|
PtInside determines whether a point is enclosed within the specified rectangle, and returns TRUE if so and FALSE if not. |
|
||||||||||||
|
PtToRect returns the smallest rectangle which encloses the two input points. |
|
|
|
|
|
Note: similar to above, but ignores empty rects. This routine interprets rectangles in the same way that QD does. A rectangle will hit if any of the bits in the bitmap it encloses overlap with any of the bits in the bitmap enclosed by the other rectangle. |
|
|
RectInside determines whether a rectangle is enclosed within a second rectangle, and returns TRUE if so and FALSE if not. |
|
|
returns true if rects intersect false otherwise |
|
|
|
|
|
this version of Union rect handle the case when one of the rects is empty |
|
|
Scales each component. Note: accurate but slow. |
|
||||||||||||||||||||
|
Set assigns the four boundary coordinates to a rectangle. The result is a rectangle with coordinates (left,top,right,bottom). |
|
|
Set the rectangle to no width or height. |
|
|
Set the rectangle to have negative width or height. This is useful for initializing a rectangle to be the union of a set of rectangles |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Union calculates the smallest rectangle which encloses both input rectangles. The destination (result) rectangle may also be one of the input rectangles. |
|
|
UnionPt expands the input rectangle to enclose the input point. If the point is already within the rectangle, nothing is changed. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.9.1