Functions
Line_api

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)
 

Detailed Description

Function Documentation

void GrLineDrawH ( const tContext pContext,
int32_t  lX1,
int32_t  lX2,
int32_t  lY 
)

Draws a horizontal line.

Parameters
pContextis a pointer to the drawing context to use.
lX1is the X coordinate of one end of the line.
lX2is the X coordinate of the other end of the line.
lYis 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.

Returns
None.

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.

Parameters
pContextis a pointer to the drawing context to use.
lXis the X coordinate of the line.
lY1is the Y coordinate of one end of the line.
lY2is 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.

Returns
None.

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.

Parameters
pContextis a pointer to the drawing context to use.
lX1is the X coordinate of the start of the line.
lY1is the Y coordinate of the start of the line.
lX2is the X coordinate of the end of the line.
lY2is 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.

Returns
None.

References DpyPixelDraw, GrLineDrawH(), GrLineDrawV(), tContext::pDisplay, and tContext::ulForeground.


Copyright 2014, Texas Instruments Incorporated