Added gwinDrawThickLine() wrapper for corresponding GDISP call

ugfx_release_2.6
Joel Bodenmann 2014-07-11 20:41:50 +02:00
parent 6bf79fdc18
commit 1fe4bcde39
3 changed files with 25 additions and 0 deletions

View File

@ -10,6 +10,7 @@ FEATURE: Added Linux-Framebuffer board definition
FEATURE: Added FatFS support for GFILE
FEATURE: Added gfileMount() and gfileUnmount()
FEATURE: Added gfileSync()
FEATURE: Added gwinDrawThickLine()
*** Release 2.1 ***

View File

@ -226,6 +226,12 @@ void gwinDrawLine(GHandle gh, coord_t x0, coord_t y0, coord_t x1, coord_t y1) {
_gwinDrawEnd(gh);
}
void gwinDrawThickLine(GHandle gh, coord_t x0, coord_t y0, coord_t x1, coord_t y1, coord_t width, bool_t round) {
if (!_gwinDrawStart(gh)) return;
gdispGDrawThickLine(gh->display, gh->x+x0, gh->y+y0, gh->x+x1, gh->y+y1, gh->color, width, round);
_gwinDrawEnd(gh);
}
void gwinDrawBox(GHandle gh, coord_t x, coord_t y, coord_t cx, coord_t cy) {
if (!_gwinDrawStart(gh)) return;
gdispGDrawBox(gh->display, gh->x+x, gh->y+y, cx, cy, gh->color);

View File

@ -600,6 +600,24 @@ extern "C" {
*/
void gwinDrawLine(GHandle gh, coord_t x0, coord_t y0, coord_t x1, coord_t y1);
/**
* @brief Draw a thick line in the window
* @details The line thickness is specified in pixels. The line ends can
* be selected to be either flat or round.
* @note Uses gdispGFillConvexPoly() internally to perform the drawing.
* @note Uses the current foreground color to draw the line
*
* @param[in] gh The window handle
* @param[in] x0,y0 The start position
* @param[in] x1,y1 The end position
* @param[in] color The color to use
* @param[in] width The width of the line
* @param[in] round Use round ends for the line
*
* @api
*/
void gwinDrawThickLine(GHandle gh, coord_t x0, coord_t y0, coord_t x1, coord_t y1, coord_t width, bool_t round);
/**
* @brief Draw a box in the window
* @note Uses the current foreground color to draw the box