Functions | |
void | Graphics_drawLineH (const Graphics_Context *context, int32_t x1, int32_t x2, int32_t y) |
void | Graphics_drawLineV (const Graphics_Context *context, int32_t x, int32_t y1, int32_t y2) |
void | Graphics_drawLine (const Graphics_Context *context, int32_t x1, int32_t y1, int32_t x2, int32_t y2) |
void Graphics_drawLineH | ( | const Graphics_Context * | context, |
int32_t | x1, | ||
int32_t | x2, | ||
int32_t | y | ||
) |
Draws a horizontal line.
context | is a pointer to the drawing context to use. |
x1 | is the X coordinate of one end of the line. |
x2 | is the X coordinate of the other end of the line. |
y | 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 Graphics_Context::clipRegion, Graphics_Context::display, Graphics_Context::foreground, Graphics_drawHorizontalLineOnDisplay(), Graphics_Rectangle::xMax, Graphics_Rectangle::xMin, and Graphics_Rectangle::yMax.
Referenced by Graphics_drawLine(), Graphics_drawRectangle(), Graphics_drawString(), and Graphics_fillCircle().
void Graphics_drawLineV | ( | const Graphics_Context * | context, |
int32_t | x, | ||
int32_t | y1, | ||
int32_t | y2 | ||
) |
Draws a vertical line.
context | is a pointer to the drawing context to use. |
x | is the X coordinate of the line. |
y1 | is the Y coordinate of one end of the line. |
y2 | 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 Graphics_Context::clipRegion, Graphics_Context::display, Graphics_Context::foreground, Graphics_drawVerticalLineOnDisplay(), Graphics_Rectangle::xMax, Graphics_Rectangle::yMax, and Graphics_Rectangle::yMin.
Referenced by Graphics_drawLine(), and Graphics_drawRectangle().
void Graphics_drawLine | ( | const Graphics_Context * | context, |
int32_t | x1, | ||
int32_t | y1, | ||
int32_t | x2, | ||
int32_t | y2 | ||
) |
Draws a line.
context | is a pointer to the drawing context to use. |
x1 | is the X coordinate of the start of the line. |
y1 | is the Y coordinate of the start of the line. |
x2 | is the X coordinate of the end of the line. |
y2 | is the Y coordinate of the end of the line. |
This function draws a line, utilizing Graphics_drawLineH() and Graphics_drawLineV() 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 Graphics_Context::display, Graphics_Context::foreground, Graphics_drawLineH(), Graphics_drawLineV(), and Graphics_drawPixelOnDisplay().
Referenced by Graphics_drawCheckBox(), and Graphics_drawSelectedCheckBox().