#include <cascade/graphics/CascadeRect.h>
Inheritance diagram for CascadeRect:
Public Member Functions | |
CascadeRect () | |
CascadeRect (s32 xx, s32 yy, u32 ww, u32 hh) | |
CascadeRect (const CascadeRect &rect) | |
bool | IsObscuredBy (const CascadeRect &rect) const |
bool | IntersectRect (const CascadeRect &rect) const |
bool | MakeIntersectRect (const CascadeRect &rect, CascadeRect &intersectRectToMake) const |
void | MakeUnionRect (const CascadeRect &rect, CascadeRect &unionRectToMake) const |
bool | PointInRect (const CascadePoint &point) const |
CascadePoint | TopLeft () const |
CascadePoint | BottomLeft () const |
CascadePoint | TopRight () const |
CascadePoint | BottomRight () const |
CascadePoint | CenterPoint () const |
void | MoveTo (const CascadePoint &point) |
void | MoveCenterTo (const CascadePoint &point) |
void | InsetRect (s32 dx, s32 dy) |
void | InflateRect (s32 dx, s32 dy) |
void | OffsetRect (s32 dx, s32 dy) |
bool | operator== (const CascadeRect &rect) const |
bool | operator!= (const CascadeRect &rect) const |
Public Attributes | |
s32 | x |
s32 | y |
u32 | w |
u32 | h |
CascadeRect represents a rectangle described by (x, y, width, height) whose endpoints are x, y, x + w - 1, y + h - 1
|
default constructor The default constructor for CascadeRect initializes the rectangle with zero values. |
|
constructor with arguments This constructor rectangle with the values passed in.
|
|
copy constructor This copy constructor copies the rectangle from the rect passed in.
|
|
returns the point at the bottom left of the rectangle BottomLeft() returns a CascadePoint representing the bottom left point of this rectangle.
|
|
returns the point at the bottom right of the rectangle BottomRight() returns a CascadePoint representing the bottom right point of this rectangle.
|
|
returns the point at the center of the rectangle CenterPoint() gets the center point of the rectangle, rounded down if a dimension isn't evenly divisible by 2.
|
|
inflates or shrinks a rectangle Inflates or shrinks the rectangle by moving its left and right edges out by the number of pixels specified in dx, and the top and bottom edges out by the number of pixels specified in dy. Negative arguments to the function move the edges inward, shrinking the rectangle. The rectangle remains centered on the same point in the coordinate plane, and the size is altered by 2*dx in the horizontal and 2*dy in the vertical. If the size of either dimension shrinks to less than one, the rectangle is set to the empty rectangle (0,0,0,0).
|
|
shrinks or inflates a rectangle Shrinks or inflates the rectangle by moving its left and right edges in by the number of pixels specified in dx, and the top and bottom edges in by the number of pixels specified in dy. Negative arguments to the function move the edges outward, expanding the rectangle. The rectangle remains centered on the same point in the coordinate plane, and the size is altered by 2*dx in the horizontal and 2*dy in the vertical. If the size of either dimension shrinks to less than one, the rectangle is set to the empty rectangle (0,0,0,0).
|
|
determines whether a rectangle intersects with this rectangle IntersectRect() returns true if the rectangle described by rect intersects with the rectangle described by this, false otherwise.
|
|
determines whether a rectangle obscures this rectangle IsObscuredBy() returns true if the rectangle described by rect completely overlaps (obscures) the rectangle described by this, false otherwise.
|
|
makes the intersection of two rectangles MakeIntersectRect() sets intersectRectToMake to be the intersection of rect and this, returning true if rect and this intersect, false otherwise. if MakeIntersectRect() returns false, intersectRectToMake is left untouched. intersectRectToMake can refer to either *this or rect successfully.
|
|
makes the union of two rectangles MakeUnionRect() sets unionRectToMake to be the union of rect and this. unionRectToMake can refer to either *this or rect successfully
|
|
makes the rectangle centered on a point Move the center of this rectangle to the supplied point. The center point is calculated as in CenterPoint() -- it is rounded down if a dimension isn't evenly divisible by 2.
|
|
moves the rectangle Move the rectangle's x & y coordinates to the supplied point.
|
|
offsets a rectangle Offsets the rectangle by moving it's x and y coordinates by the amounts specified.
|
|
short desc This comparison operator determines whether or not two rectangles are not equal.
|
|
short desc This comparison operator determines whether or not two rectangles are equal.
|
|
tests whether or not a point falls within the rect PointInRect() returns true if point falls within the rectangle described by this, false otherwise
|
|
returns the point at the top left of the rectangle TopLeft() returns a CascadePoint representing the top left point of this rectangle.
|
|
returns the point at the top right of the rectangle TopRight() returns a CascadePoint representing the top right point of this rectangle.
|
|
the height of the rectangle h represents the height of the rectangle. |
|
the width of the rectangle w represents the width of the rectangle. |
|
the left edge of the rectangle x represents the left coordinate of the rectangle. |
|
the top edge of the rectangle y represents the top coordinate of the rectangle. |