diff options
author | Corentin Barman <corentin.barman@hotmail.com> | 2016-11-27 19:06:53 +0100 |
---|---|---|
committer | Corentin Barman <corentin.barman@hotmail.com> | 2016-11-27 19:06:53 +0100 |
commit | 2bcb2155caba059ae184ff7725e2a26d7c012067 (patch) | |
tree | 208f57d745cee74dd7bd8c15cf87b0c8a8b8d0fe /src/gdisp/gdisp.h | |
parent | d477e620be7ef8fd84420977a5ec5c3ebafe2cf3 (diff) | |
download | uGFX-2bcb2155caba059ae184ff7725e2a26d7c012067.tar.gz uGFX-2bcb2155caba059ae184ff7725e2a26d7c012067.tar.bz2 uGFX-2bcb2155caba059ae184ff7725e2a26d7c012067.zip |
Added a function to draw thick arcs
Diffstat (limited to 'src/gdisp/gdisp.h')
-rw-r--r-- | src/gdisp/gdisp.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gdisp/gdisp.h b/src/gdisp/gdisp.h index 7878233e..3185f82f 100644 --- a/src/gdisp/gdisp.h +++ b/src/gdisp/gdisp.h @@ -712,6 +712,31 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co #define gdispDrawArc(x,y,r,s,e,c) gdispGDrawArc(GDISP,x,y,r,s,e,c) /* + * @brief Draw a thick arc. + * @pre GDISP_NEED_ARC must be TRUE in your gfxconf.h + * + * @param[in] g The display to use + * @param[in] xc,yc The center point + * @param[in] startradius The inner radius of the thick arc + * @param[in] endradius The outer radius of the thick arc + * @param[in] startangle The start angle (0 to 360) + * @param[in] endangle The end angle (0 to 360) + * @param[in] color The color of the arc + * + * @note This routine requires trig support. It can either come from your C runtime library + * cos() and sin() which requires floating point support (and is slow), or you can define GFX_USE_GMISC + * and either GMISC_NEED_FIXEDTRIG or GMISC_NEED_FASTTRIG. + * GMISC_NEED_FASTTRIG uses table based floating point trig operations. + * GMISC_NEED_FIXEDTRIG uses fixed point integer trig operations. + * Note accuracy on both the table based options are more than adequate for the one degree + * resolution provided by these arc routines. Both are much faster than your C runtime library. + * + * @api + */ + void gdispGDrawThickArc(GDisplay *g, coord_t xc, coord_t yc, coord_t startradius, coord_t endradius, coord_t startangle, coord_t endangle, color_t color); + #define gdispDrawThickArc(x,y,rs,re,s,e,c) gdispGDrawThickArc(GDISP,x,y,rs,re,s,e,c) + + /* * @brief Draw a filled arc. * @pre GDISP_NEED_ARC must be TRUE in your gfxconf.h * |