Jump to content

µGFX Development

  • entries
  • comments
  • views

Contributors to this blog

New rendering function: Thick arcs

Joel Bodenmann


A new function has been added to the GDISP module that allows drawing thick arcs: gdispGDrawThickArc().

 * @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)



Recommended Comments

There are no comments to display.

You are commenting as a guest. If you have an account, please sign in.
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.