aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-07-15 12:40:43 +1000
committerinmarket <andrewh@inmarket.com.au>2014-07-15 12:40:43 +1000
commitfdb3b86ee088ed4b263664f388742099c1210edb (patch)
tree61207960827b3ddf3cbbc30ee9067be23c5ae9fa /src
parent2f1af41b2759711c748a5d00c4161fec1ec668c2 (diff)
downloaduGFX-fdb3b86ee088ed4b263664f388742099c1210edb.tar.gz
uGFX-fdb3b86ee088ed4b263664f388742099c1210edb.tar.bz2
uGFX-fdb3b86ee088ed4b263664f388742099c1210edb.zip
Thick line support is only available if Polygon drawing is available
Diffstat (limited to 'src')
-rw-r--r--src/gwin/gwin.c11
-rw-r--r--src/gwin/sys_defs.h35
2 files changed, 22 insertions, 24 deletions
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c
index ab2e2981..ee0a7222 100644
--- a/src/gwin/gwin.c
+++ b/src/gwin/gwin.c
@@ -226,12 +226,6 @@ 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);
@@ -350,6 +344,11 @@ void gwinBlitArea(GHandle gh, coord_t x, coord_t y, coord_t cx, coord_t cy, coor
gdispGFillConvexPoly(gh->display, tx+gh->x, ty+gh->y, pntarray, cnt, gh->color);
_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);
+ }
#endif
#if GDISP_NEED_IMAGE
diff --git a/src/gwin/sys_defs.h b/src/gwin/sys_defs.h
index 169b4498..4b103d11 100644
--- a/src/gwin/sys_defs.h
+++ b/src/gwin/sys_defs.h
@@ -601,24 +601,6 @@ 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
* @note May leave GDISP clipping to this window's dimensions
@@ -910,6 +892,23 @@ extern "C" {
* @api
*/
void gwinFillConvexPoly(GHandle gh, coord_t tx, coord_t ty, const point *pntarray, unsigned cnt);
+
+ /**
+ * @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] 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);
#endif
/*-------------------------------------------------