diff options
author | Joel Bodenmann <joel@embedded.pro> | 2016-12-14 14:43:21 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@embedded.pro> | 2016-12-14 14:43:21 +0100 |
commit | 52c7f156737e7954fbbf50be1ebeedb564334ac6 (patch) | |
tree | b8a35de2285194e6eb43c4a495ea56644bd2c62e /src | |
parent | 8e629124462fd4a651dbc121ff83e82dde334722 (diff) | |
download | uGFX-52c7f156737e7954fbbf50be1ebeedb564334ac6.tar.gz uGFX-52c7f156737e7954fbbf50be1ebeedb564334ac6.tar.bz2 uGFX-52c7f156737e7954fbbf50be1ebeedb564334ac6.zip |
Adding gwinFillDualCircle() wrapper for gdispGFillDualCircle() function.
Fixes T16
Diffstat (limited to 'src')
-rw-r--r-- | src/gwin/gwin.c | 8 | ||||
-rw-r--r-- | src/gwin/gwin.h | 20 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c index 586636ec..d049e5b2 100644 --- a/src/gwin/gwin.c +++ b/src/gwin/gwin.c @@ -281,6 +281,14 @@ void gwinBlitArea(GHandle gh, coord_t x, coord_t y, coord_t cx, coord_t cy, coor } #endif +#if GDISP_NEED_DUALCIRCLE + void gwinFillDualCircle(GHandle gh, coord_t x, coord_t y, coord_t radius1, color_t color1, coord_t radius2, color_t color2) { + if (!_gwinDrawStart(gh)) return; + gdispGFillDualCircle(gh->display, gh->x+x, gh->y+y, radius1, gh->bgcolor, radius2, gh->color); + _gwinDrawEnd(gh); + } +#endif + #if GDISP_NEED_ELLIPSE void gwinDrawEllipse(GHandle gh, coord_t x, coord_t y, coord_t a, coord_t b) { if (!_gwinDrawStart(gh)) return; diff --git a/src/gwin/gwin.h b/src/gwin/gwin.h index 5912046b..98991150 100644 --- a/src/gwin/gwin.h +++ b/src/gwin/gwin.h @@ -718,6 +718,26 @@ extern "C" { void gwinFillCircle(GHandle gh, coord_t x, coord_t y, coord_t radius); #endif + #if GDISP_NEED_DUALCIRCLE || defined(__DOXYGEN__) + /** + * @brief Draw two filled circles with the same centre in the window. + * @note Uses the current foreground color to draw the inner circle + * @note Uses the current background color to draw the outer circle + * @note May leave GDISP clipping to this window's dimensions + * @pre GDISP_NEED_DUALCIRCLE must be TRUE in your gfxconf.h + * + * @param[in] gh The window handle + * @param[in] x,y The center of the circle + * @param[in] radius1 The radius of the larger circle + * @param[in] color1 The color to use for the larger circle + * @param[in] radius2 The radius of the smaller circle + * @param[in] color2 The color to use for the smaller circle + * + * @api + */ + void gwinFillDualCircle(GHandle gh, coord_t x, coord_t y, coord_t radius1, color_t color1, coord_t radius2, color_t color2); + #endif + #if GDISP_NEED_ELLIPSE || defined(__DOXYGEN__) /** * @brief Draw an ellipse. |