#include <krmath.h>
Public Methods | |
int | Width () const |
width of the rectangle. | |
int | Height () const |
height of the rectangle. | |
void | Set (int _xmin, int _ymin, int _xmax, int _ymax) |
Initialize. Convenience function. | |
void | SetInvalid () |
Initialize to an invalid rectangle. | |
void | Zero () |
Set all the members to zero. | |
bool | IsValid () const |
Return true if this is potentially a valid rectangle. | |
void | FromPair (int x0, int y0, int x1, int y1) |
Creates the rectangle from 2 points, which can be in any relationship to each other. | |
bool | Intersect (const KrRect &rect) const |
Return true if the rectangles intersect. | |
bool | HasInside (const KrRect &rect) const |
Return true if 'rect' is inside this. | |
bool | HasInside (const KrVector2 &point) const |
Return true if 'rect' is inside this. | |
void | DoUnion (const KrRect &rect) |
Merge the rect into this. | |
void | DoIntersection (const KrRect &rect) |
Turn this into the intersection. | |
void | DoClip (const KrRect &rect) |
Clip this to the passed in rectangle. Will become invalid if they don't intersect. | |
void | Scale (GlFixed x, GlFixed y) |
Scale all coordinates by the given ratios:. | |
void | EdgeAdd (int i) |
Changes the boundaries. | |
Public Attributes | |
int | xmin |
the lower x (inclusive). | |
int | ymin |
the lower y (inclusive). | |
int | xmax |
the upper x (inclusive). | |
int | ymax |
the upper y (inclusive). |