#include <rect.h>
Public Member Functions | |
f_inline | Rect () |
constucts undefined Rect for performance reasons | |
f_inline | Rect (const Rect &inOther) |
copy constructs a Rect from inOther | |
f_inline | Rect (int inLeft, int inTop, int inRight, int inBottom) |
constructs a Rect from the coordinates inLeft, inTop, inRight and inBottom | |
f_inline void | Set (int inLeft, int inTop, int inRight, int inBottom) |
sets up a Rect from the coordinates inLeft, inTop, inRight and inBottom | |
f_inline int | Left () const |
returns the left boundary of the rectangle | |
f_inline int | Right () const |
return the right boundary of the rectangle | |
f_inline int | Top () const |
return the top boundary of the rectangle | |
f_inline int | Bottom () const |
return the bottom boundary of the rectangle | |
f_inline int | Width () const |
calculates the width of the rectangle | |
f_inline int | Height () const |
calculates the height of the rectangle | |
f_inline void | Normalize () |
normalizes the rectangle coordinates, i.e. | |
f_inline void | Widen (int inDelta) |
widens the rectangle about inDelta | |
f_inline void | Widen (int inDeltaWidth, int inDeltaHeight) |
widens the rectangle horizontally about inDeltaWidth and vertically about inDeltaHeight | |
f_inline void | Widen (int inDeltaLeft, int inDeltaTop, int inDeltaRight, int inDeltaBottom) |
widens the rectangles left boundary about inDeltaleft, the right boundary about inDeltaRigt, the top boundary about inDeltaTop and the bottom boundary about inDeltaBottom | |
f_inline void | Shrink (int inDelta) |
shrinks the rectangle about inDelta | |
f_inline void | Shrink (int inDeltaWidth, int inDeltaHeight) |
shrinks the rectangle horizontally about inDeltaWidth and vertically about inDeltaHeight | |
f_inline void | Shrink (int inDeltaLeft, int inDeltaTop, int inDeltaRight, int inDeltaBottom) |
shrinks the rectangles left boundary about inDeltaleft, the right boundary about inDeltaRigt, the top boundary about inDeltaTop and the bottom boundary about inDeltaBottom | |
f_inline void | Offset (int inDeltaX, int inDeltaY) |
moves the rectangle horizontally inDeltaX and vertically inDeltaY | |
f_inline bool | Intersects (const Rect &b) const |
returns true if this rectangle intersects with the rectangle b | |
f_inline Rect & | operator= (const Rect &inOther) |
sets up the rectangle from inOther | |
f_inline bool | operator== (const Rect &inRHS) const |
returns true if inRhs is equal to this rectangle | |
f_inline bool | operator!= (const Rect &inRHS) const |
returns true if inRhs differs from this rectangle | |
Private Attributes | |
int | mLeft |
the left boundary | |
int | mTop |
the top boundary | |
int | mRight |
the right boundary | |
int | mBottom |
the bottom boundary |
Definition at line 35 of file rect.h.
|
constucts undefined Rect for performance reasons
|
|
copy constructs a Rect from inOther
|
|
constructs a Rect from the coordinates inLeft, inTop, inRight and inBottom
|
|
return the bottom boundary of the rectangle
Definition at line 60 of file rect.h. References mBottom. Referenced by operator!=(), operator=(), and operator==(). |
|
calculates the height of the rectangle
|
|
returns true if this rectangle intersects with the rectangle b
|
|
returns the left boundary of the rectangle
Definition at line 51 of file rect.h. References mLeft. Referenced by operator!=(), operator=(), and operator==(). |
|
normalizes the rectangle coordinates, i.e. assures that right>left and top>bottom. Definition at line 70 of file rect.h. References salt::gSwap(), mBottom, mLeft, mRight, and mTop. Here is the call graph for this function: ![]() |
|
moves the rectangle horizontally inDeltaX and vertically inDeltaY
|
|
returns true if inRhs differs from this rectangle
Definition at line 117 of file rect.h. References Bottom(), Left(), mBottom, mLeft, mRight, mTop, Right(), and Top(). Here is the call graph for this function: ![]() |
|
sets up the rectangle from inOther
Definition at line 109 of file rect.h. References Bottom(), Left(), mBottom, mLeft, mRight, mTop, Right(), and Top(). Here is the call graph for this function: ![]() |
|
returns true if inRhs is equal to this rectangle
Definition at line 114 of file rect.h. References Bottom(), Left(), mBottom, mLeft, mRight, mTop, Right(), and Top(). Here is the call graph for this function: ![]() |
|
return the right boundary of the rectangle
Definition at line 54 of file rect.h. References mRight. Referenced by operator!=(), operator=(), and operator==(). |
|
sets up a Rect from the coordinates inLeft, inTop, inRight and inBottom
|
|
shrinks the rectangles left boundary about inDeltaleft, the right boundary about inDeltaRigt, the top boundary about inDeltaTop and the bottom boundary about inDeltaBottom
|
|
shrinks the rectangle horizontally about inDeltaWidth and vertically about inDeltaHeight
|
|
shrinks the rectangle about inDelta
|
|
return the top boundary of the rectangle
Definition at line 57 of file rect.h. References mTop. Referenced by operator!=(), operator=(), and operator==(). |
|
widens the rectangles left boundary about inDeltaleft, the right boundary about inDeltaRigt, the top boundary about inDeltaTop and the bottom boundary about inDeltaBottom
|
|
widens the rectangle horizontally about inDeltaWidth and vertically about inDeltaHeight
|
|
widens the rectangle about inDelta
|
|
calculates the width of the rectangle
|
|
the bottom boundary
Definition at line 130 of file rect.h. Referenced by Bottom(), Height(), Intersects(), Normalize(), Offset(), operator!=(), operator=(), operator==(), Set(), Shrink(), and Widen(). |
|
the left boundary
Definition at line 121 of file rect.h. Referenced by Intersects(), Left(), Normalize(), Offset(), operator!=(), operator=(), operator==(), Set(), Shrink(), Widen(), and Width(). |
|
the right boundary
Definition at line 127 of file rect.h. Referenced by Intersects(), Normalize(), Offset(), operator!=(), operator=(), operator==(), Right(), Set(), Shrink(), Widen(), and Width(). |
|
the top boundary
Definition at line 124 of file rect.h. Referenced by Height(), Intersects(), Normalize(), Offset(), operator!=(), operator=(), operator==(), Set(), Shrink(), Top(), and Widen(). |