aboutsummaryrefslogtreecommitdiffstats
path: root/src/gdisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gdisp')
-rw-r--r--src/gdisp/gdisp.c12
-rw-r--r--src/gdisp/gdisp.h14
2 files changed, 15 insertions, 11 deletions
diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c
index e394568b..23e9061f 100644
--- a/src/gdisp/gdisp.c
+++ b/src/gdisp/gdisp.c
@@ -2985,8 +2985,8 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co
}
#if GDISP_NEED_CONVEX_POLYGON
- void gdispGDrawPoly(GDisplay *g, coord_t tx, coord_t ty, const point *pntarray, unsigned cnt, color_t color) {
- const point *epnt, *p;
+ void gdispGDrawPoly(GDisplay *g, coord_t tx, coord_t ty, const gPoint *pntarray, unsigned cnt, color_t color) {
+ const gPoint *epnt, *p;
epnt = &pntarray[cnt-1];
@@ -3001,8 +3001,8 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co
MUTEX_EXIT(g);
}
- void gdispGFillConvexPoly(GDisplay *g, coord_t tx, coord_t ty, const point *pntarray, unsigned cnt, color_t color) {
- const point *lpnt, *rpnt, *epnts;
+ void gdispGFillConvexPoly(GDisplay *g, coord_t tx, coord_t ty, const gPoint *pntarray, unsigned cnt, color_t color) {
+ const gPoint *lpnt, *rpnt, *epnts;
fixed lx, rx, lk, rk;
coord_t y, ymax, lxc, rxc;
@@ -3187,7 +3187,7 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co
* (0,0) ----------------------------------- (d)
* pt0 pt3
*/
- point pntarray[4];
+ gPoint pntarray[4];
pntarray[0].x = 0;
pntarray[0].y = 0;
@@ -3210,7 +3210,7 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co
* \ /
* pt0 -------------------pt7
*/
- point pntarray[8];
+ gPoint pntarray[8];
coord_t nx2, ny2;
/* Magic numbers:
diff --git a/src/gdisp/gdisp.h b/src/gdisp/gdisp.h
index 587c3115..33ac5468 100644
--- a/src/gdisp/gdisp.h
+++ b/src/gdisp/gdisp.h
@@ -45,13 +45,13 @@ typedef int16_t coord_t;
/*===========================================================================*/
/**
- * @struct point
+ * @struct gPoint
* @brief Type for a 2D point on the screen.
*/
-typedef struct point {
+typedef struct gPoint {
coord_t x; /**< The x coordinate of the point. */
coord_t y; /**< The y coordinate of the point. */
-} point, point_t;
+} gPoint;
/**
* @enum justify
@@ -855,7 +855,7 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co
*
* @api
*/
- void gdispGDrawPoly(GDisplay *g, coord_t tx, coord_t ty, const point *pntarray, unsigned cnt, color_t color);
+ void gdispGDrawPoly(GDisplay *g, coord_t tx, coord_t ty, const gPoint *pntarray, unsigned cnt, color_t color);
#define gdispDrawPoly(x,y,p,i,c) gdispGDrawPoly(GDISP,x,y,p,i,c)
/**
@@ -879,7 +879,7 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co
*
* @api
*/
- void gdispGFillConvexPoly(GDisplay *g, coord_t tx, coord_t ty, const point *pntarray, unsigned cnt, color_t color);
+ void gdispGFillConvexPoly(GDisplay *g, coord_t tx, coord_t ty, const gPoint *pntarray, unsigned cnt, color_t color);
#define gdispFillConvexPoly(x,y,p,i,c) gdispGFillConvexPoly(GDISP,x,y,p,i,c)
/**
@@ -1228,6 +1228,10 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co
#include "gdisp_pixmap.h"
#endif
+/* V2 compatibility */
+#if GFX_COMPAT_V2
+ typedef gPoint point, point_t;
+#endif
#endif /* GFX_USE_GDISP */