![]() |
![]() |
Macros | |
| #define | min(a, b) (((a) < (b)) ? (a) : (b)) |
| #define | max(a, b) (((a) < (b)) ? (b) : (a)) |
Functions | |
| void | GrRectDraw (const tContext *pContext, const tRectangle *pRect) |
| void | GrRectFill (const tContext *pContext, const tRectangle *pRect) |
| long | GrRectOverlapCheck (tRectangle *psRect1, tRectangle *psRect2) |
| long | GrRectIntersectGet (tRectangle *psRect1, tRectangle *psRect2, tRectangle *psIntersect) |
| #define min | ( | a, | |
| b | |||
| ) | (((a) < (b)) ? (a) : (b)) |
Referenced by GrRectIntersectGet().
| #define max | ( | a, | |
| b | |||
| ) | (((a) < (b)) ? (b) : (a)) |
Referenced by GrRectIntersectGet().
| void GrRectDraw | ( | const tContext * | pContext, |
| const tRectangle * | pRect | ||
| ) |
Draws a rectangle.
| pContext | is a pointer to the drawing context to use. |
| pRect | is a pointer to the structure containing the extents of the rectangle. |
This function draws a rectangle. The rectangle will extend from lXMin to lXMax and lYMin to lYMax, inclusive.
References GrLineDrawH(), GrLineDrawV(), tRectangle::sXMax, tRectangle::sXMin, tRectangle::sYMax, and tRectangle::sYMin.
| void GrRectFill | ( | const tContext * | pContext, |
| const tRectangle * | pRect | ||
| ) |
Draws a filled rectangle.
| pContext | is a pointer to the drawing context to use. |
| pRect | is a pointer to the structure containing the extents of the rectangle. |
This function draws a filled rectangle. The rectangle will extend from lXMin to lXMax and lYMin to lYMax, inclusive. The clipping of the rectangle to the clipping rectangle is performed within this routine; the display driver's rectangle fill routine is used to perform the actual rectangle fill.
References DpyRectFill, tContext::pDisplay, tContext::sClipRegion, tRectangle::sXMax, tRectangle::sXMin, tRectangle::sYMax, tRectangle::sYMin, and tContext::ulForeground.
| long GrRectOverlapCheck | ( | tRectangle * | psRect1, |
| tRectangle * | psRect2 | ||
| ) |
Determines if two rectangles overlap.
| psRect1 | is a pointer to the first rectangle. |
| psRect2 | is a pointer to the second rectangle. |
This function determines whether two rectangles overlap. It assumes that rectangles psRect1 and psRect2 are valid with sXMin < sXMax and sYMin < sYMax.
References tRectangle::sXMax, tRectangle::sXMin, tRectangle::sYMax, and tRectangle::sYMin.
Referenced by GrRectIntersectGet().
| long GrRectIntersectGet | ( | tRectangle * | psRect1, |
| tRectangle * | psRect2, | ||
| tRectangle * | psIntersect | ||
| ) |
Determines the intersection of two rectangles.
| psRect1 | is a pointer to the first rectangle. |
| psRect2 | is a pointer to the second rectangle. |
| psIntersect | is a pointer to a rectangle which will be written with the intersection of psRect1 and psRect2. |
This function determines if two rectangles overlap and, if they do, calculates the rectangle representing their intersection. If the rectangles do not overlap, 0 is returned and psIntersect is not written.
References GrRectOverlapCheck(), max, min, tRectangle::sXMax, tRectangle::sXMin, tRectangle::sYMax, and tRectangle::sYMin.