![]() |
![]() |
Functions | |
| void | GrLineDrawH (const tContext *pContext, int32_t lX1, int32_t lX2, int32_t lY) |
| void | GrLineDrawV (const tContext *pContext, int32_t lX, int32_t lY1, int32_t lY2) |
| void | GrLineDraw (const tContext *pContext, int32_t lX1, int32_t lY1, int32_t lX2, int32_t lY2) |
| void GrLineDrawH | ( | const tContext * | pContext, |
| int32_t | lX1, | ||
| int32_t | lX2, | ||
| int32_t | lY | ||
| ) |
Draws a horizontal line.
| pContext | is a pointer to the drawing context to use. |
| lX1 | is the X coordinate of one end of the line. |
| lX2 | is the X coordinate of the other end of the line. |
| lY | is the Y coordinate of the line. |
This function draws a horizontal line, taking advantage of the fact that the line is horizontal to draw it more efficiently. The clipping of the horizontal line to the clipping rectangle is performed within this routine; the display driver's horizontal line routine is used to perform the actual line drawing.
References DpyLineDrawH, tContext::pDisplay, tContext::sClipRegion, tRectangle::sXMax, tRectangle::sXMin, tRectangle::sYMax, and tContext::ulForeground.
Referenced by GrCircleFill(), GrLineDraw(), GrRectDraw(), and GrStringDraw().
| void GrLineDrawV | ( | const tContext * | pContext, |
| int32_t | lX, | ||
| int32_t | lY1, | ||
| int32_t | lY2 | ||
| ) |
Draws a vertical line.
| pContext | is a pointer to the drawing context to use. |
| lX | is the X coordinate of the line. |
| lY1 | is the Y coordinate of one end of the line. |
| lY2 | is the Y coordinate of the other end of the line. |
This function draws a vertical line, taking advantage of the fact that the line is vertical to draw it more efficiently. The clipping of the vertical line to the clipping rectangle is performed within this routine; the display driver's vertical line routine is used to perform the actual line drawing.
References DpyLineDrawV, tContext::pDisplay, tContext::sClipRegion, tRectangle::sXMax, tRectangle::sYMax, tRectangle::sYMin, and tContext::ulForeground.
Referenced by GrLineDraw(), and GrRectDraw().
| void GrLineDraw | ( | const tContext * | pContext, |
| int32_t | lX1, | ||
| int32_t | lY1, | ||
| int32_t | lX2, | ||
| int32_t | lY2 | ||
| ) |
Draws a line.
| pContext | is a pointer to the drawing context to use. |
| lX1 | is the X coordinate of the start of the line. |
| lY1 | is the Y coordinate of the start of the line. |
| lX2 | is the X coordinate of the end of the line. |
| lY2 | is the Y coordinate of the end of the line. |
This function draws a line, utilizing GrLineDrawH() and GrLineDrawV() to draw the line as efficiently as possible. The line is clipped to the clippping rectangle using the Cohen-Sutherland clipping algorithm, and then scan converted using Bresenham's line drawing algorithm.
References DpyPixelDraw, GrLineDrawH(), GrLineDrawV(), tContext::pDisplay, and tContext::ulForeground.