aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrew Hannam <andrewh@inmarket.com.au>2013-03-18 18:27:52 +1000
committerAndrew Hannam <andrewh@inmarket.com.au>2013-03-18 18:27:52 +1000
commitcc5729dedd3dc84043703b22b498dcb0f2729f5b (patch)
treed3398e5f90b05bfd4d320cda7c1ae8d46c256a2d /include
parente7b54696f6e406c892307302a0bd442aa11e2bfa (diff)
downloaduGFX-cc5729dedd3dc84043703b22b498dcb0f2729f5b.tar.gz
uGFX-cc5729dedd3dc84043703b22b498dcb0f2729f5b.tar.bz2
uGFX-cc5729dedd3dc84043703b22b498dcb0f2729f5b.zip
Change GDISP poly fns to support translation
Change GDISP poly fns to support translation - required for adding poly functions to GWIN
Diffstat (limited to 'include')
-rw-r--r--include/gdisp/gdisp.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/gdisp/gdisp.h b/include/gdisp/gdisp.h
index 962e5ed4..9e408578 100644
--- a/include/gdisp/gdisp.h
+++ b/include/gdisp/gdisp.h
@@ -658,30 +658,35 @@ void gdispDrawBox(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color);
/**
* @brief Draw an enclosed polygon (convex, non-convex or complex).
*
+ * @param[in] tx, ty Transform all points in pntarray by tx, ty
* @param[in] pntarray An array of points
* @param[in] cnt The number of points in the array
* @param[in] color The color to use
*
* @api
*/
- void gdispDrawPoly(const point *pntarray, unsigned cnt, color_t color);
+ void gdispDrawPoly(coord_t tx, coord_t ty, const point *pntarray, unsigned cnt, color_t color);
/**
* @brief Fill a convex polygon
* @details Doesn't handle non-convex or complex polygons.
*
+ * @param[in] tx, ty Transform all points in pntarray by tx, ty
* @param[in] pntarray An array of points
* @param[in] cnt The number of points in the array
* @param[in] color The color to use
*
* @note Convex polygons are those that have no internal angles. That is;
* you can draw a line from any point on the polygon to any other point
- * on the polygon without it going outside the polygon.
+ * on the polygon without it going outside the polygon. In our case we generalise
+ * this a little by saying that an infinite horizontal line (at any y value) will cross
+ * no more than two edges on the polygon. Some non-convex polygons do fit this criteria
+ * and can therefore be drawn.
* @note This routine is designed to be very efficient with even simple display hardware.
*
* @api
*/
- void gdispFillConvexPoly(const point *pntarray, unsigned cnt, color_t color);
+ void gdispFillConvexPoly(coord_t tx, coord_t ty, const point *pntarray, unsigned cnt, color_t color);
#endif
/* Extra Text Functions */