#define RECTH | ( | rc | ) | ((rc).bottom - (rc).top) |
#define RECTHP | ( | prc | ) | ((prc)->bottom - (prc)->top) |
#define RECTW | ( | rc | ) | ((rc).right - (rc).left) |
#define RECTWP | ( | prc | ) | ((prc)->right - (prc)->left) |
Copies one rectangle to another.
This function copies the coordinates of the source rectangle pointed to by psrc to the destination rectangle pointed to by pdrc.
pdrc | The pointer to the destination rectangle. | |
psrc | The pointer to the source rectangle. |
Determines whether two rectangles intersect.
This function determines whether two rectangles (psrc1 and psrc2) intersect.
psrc1 | The first source rectangles. | |
psrc2 | The second source rectangles. |
Determines whether two rectangles are equal.
This function determines whether the two specified rectangles (prc1 and prc2) are equal by comparing the coordinates of the upper-left and lower-right corners.
prc1 | The pointers to the first rectangles. | |
prc2 | The pointers to the second rectangles. |
Gets the bound rectangle of two source rectangles.
This function creates the bound rect (pdrc) of two rectangles (psrc1 and prsrc2). The bound rect is the smallest rectangle that contains both source rectangles.
pdrc | The destination rectangle. | |
psrc1 | The first source rectangle. | |
psrc2 | The second source rectangle. |
void InflateRect | ( | RECT * | prc, | |
int | cx, | |||
int | cy | |||
) | [inline, static] |
Increases or decreases the width and height of an rectangle.
This function increases or decreases the width and height of the specified rectangle prc. This function adds cx units to the left and right ends of the rectangle and cy units to the top and bottom. the cx and cy are signed values; positive values increases the width and height, and negative values decreases them.
prc | The pointer to the rectangle. | |
cx | The inflating x value. | |
cy | The inflating y value. |
void InflateRectToPt | ( | RECT * | prc, | |
int | x, | |||
int | y | |||
) | [inline, static] |
Inflates a rectangle to contain a point.
This function inflates the rectangle prc to contain the specified point (x,y).
prc | The pointer to the rectangle. | |
x | x,y: The point. | |
y | x,y: The point. |
Calculates the intersection of two rectangles.
This function calculates the intersection of two source rectangles (psrc1 and psrc2) and places the coordinates of the intersection rectangle into the destination rectangle pointed to by pdrc. If the source rectangles do not intersect, and empty rectangle (in which all coordinates are set to zero) is placed into the destination rectangle.
pdrc | The pointer to the destination rectangle. | |
psrc1 | The first source rectangles. | |
psrc2 | The second source rectangles. |
Determines whether one rectangle is covered by another.
This function determines whether one rectangle (prc1) is covered by another rectangle (prc2).
prc1 | The first rectangles. | |
prc2 | The second rectangles. |
Determines whether an rectangle is empty.
This function determines whether the specified rectangle prc is empty. An empty rectangle is one that has no area; that is, the coordinates of the right side is equal to the coordinate of the left side, or the coordinates of the bottom side is equal to the coordinate of the top side.
prc | The pointer to the rectangle. |
void GUIAPI NormalizeRect | ( | RECT * | pRect | ) |
Normalizes a rectangle.
This function normalizes the rectangle pointed to by prc so that both the height and width are positive.
pRect | The pointer to the rectangle. |
void OffsetRect | ( | RECT * | prc, | |
int | x, | |||
int | y | |||
) | [inline, static] |
Moves a rectangle by offsets.
This function moves the specified rectangle by the specified offsets. x and y specify the amount to move the rectangle left/right or up/down respectively. x must be a negative value to move the rectangle to the left, and y must be a negative value to move the rectangle up.
prc | The pointer to the rectangle. | |
x | The x offset. | |
y | The y offset. |
Determines whether a point lies within an rectangle.
This function determines whether the specified point (x,y) lies within the specified rectangle prc.
A point is within a rectangle if it lies on the left or top side or is within all four sides. A point on the right or bottom side is considered outside the rectangle.
prc | The pointer to the rectangle. | |
x | x,y: The point. | |
y | x,y: The point. |
Definition at line 5231 of file gdi.h.
References FALSE, _RECT::left, _RECT::top, and TRUE.
void SetRect | ( | RECT * | prc, | |
int | left, | |||
int | top, | |||
int | right, | |||
int | bottom | |||
) | [inline, static] |
Sets a rectangle.
This function sets the rectangle with specified values.
prc | The pointer to the rectangle. | |
left | The x coordinate of the upper-left corner of the rectangle. | |
top | The y coordinate of the upper-left corner of the rectangle. | |
right | The x coordinate of the lower-right corner of the rectangle. | |
bottom | The y coordinate of the lower-right corner of the rectangle. |
void SetRectEmpty | ( | RECT * | prc | ) | [inline, static] |
Empties a rectangle.
This function empties the rectangle pointed to by prc. An empty rectangle in MiniGUI is a rectangle whose width and height both are zero. This function will sets all coordinates of the rectangle to be zero.
prc | The pointer to the rectangle. |
Obtains the rectangles when substracting one rectangle from another.
This function obtains the rectangles substracting the rectangle psrc1 from the other psrc2. rc should be an array of RECT struct, and may contain at most four rectangles. This function returns the number of result rectangles.
rc | The pointer to the resule rectangle array. | |
psrc1 | The pointer to the minuend rectangle. | |
psrc2 | The pointer to the subtrahend rectangle. |
Unions two source rectangles.
This function creates the union (pdrc) of two rectangles (psrc1 and psrc2), if the source rectangles are border upon and not stagger.
pdrc | The unioned rectangle. | |
psrc1 | The first source rectangles. | |
psrc2 | The second source rectangles. |