aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Shamray <pashamray@gmail.com>2014-07-12 11:04:08 +0300
committerPaul Shamray <pashamray@gmail.com>2014-07-12 11:04:08 +0300
commit1cda0bc1810f3d89ff38572abdf8cdf00a4ef91b (patch)
treea6d12287acddd8c7f427bde4e0ad06c4a280b420
parent94bc703fe24996b063d8f800a485a26a04f0d234 (diff)
parentcae7b197b38ec33b92bab5554ce2156867ae45d5 (diff)
downloaduGFX-1cda0bc1810f3d89ff38572abdf8cdf00a4ef91b.tar.gz
uGFX-1cda0bc1810f3d89ff38572abdf8cdf00a4ef91b.tar.bz2
uGFX-1cda0bc1810f3d89ff38572abdf8cdf00a4ef91b.zip
Merged master into pcf8812
-rw-r--r--boards/base/FireBull-STM32F103-FB/board_SSD1289.h2
-rw-r--r--docs/releases.txt1
-rw-r--r--src/gos/ecos.h2
-rw-r--r--src/gos/sys_make.mk1
-rw-r--r--src/gwin/gwin.c6
-rw-r--r--src/gwin/sys_defs.h18
6 files changed, 29 insertions, 1 deletions
diff --git a/boards/base/FireBull-STM32F103-FB/board_SSD1289.h b/boards/base/FireBull-STM32F103-FB/board_SSD1289.h
index 99001e07..e7c07c70 100644
--- a/boards/base/FireBull-STM32F103-FB/board_SSD1289.h
+++ b/boards/base/FireBull-STM32F103-FB/board_SSD1289.h
@@ -113,6 +113,8 @@ static inline void setwritemode(GDisplay *g)
}
static inline uint16_t read_data(GDisplay *g) {
+ (void) g;
+
return palReadPort(GPIOE);
}
diff --git a/docs/releases.txt b/docs/releases.txt
index e0c47c4a..31fe2843 100644
--- a/docs/releases.txt
+++ b/docs/releases.txt
@@ -10,6 +10,7 @@ FEATURE: Added Linux-Framebuffer board definition
FEATURE: Added FatFS support for GFILE
FEATURE: Added gfileMount() and gfileUnmount()
FEATURE: Added gfileSync()
+FEATURE: Added gwinDrawThickLine()
*** Release 2.1 ***
diff --git a/src/gos/ecos.h b/src/gos/ecos.h
index c24f3824..be9037b6 100644
--- a/src/gos/ecos.h
+++ b/src/gos/ecos.h
@@ -73,7 +73,7 @@ void gfxSleepMilliseconds(delaytime_t ms);
void gfxSleepMicroseconds(delaytime_t ms);
#define gfxAlloc(sz) malloc(sz)
-#define gfxFree(ptr) free(sz)
+#define gfxFree(ptr) free(ptr)
#define gfxRealloc(ptr, oldsz, newsz) realloc(ptr, newsz)
#define gfxSystemLock() cyg_scheduler_lock()
diff --git a/src/gos/sys_make.mk b/src/gos/sys_make.mk
index 8ef22121..9e24f875 100644
--- a/src/gos/sys_make.mk
+++ b/src/gos/sys_make.mk
@@ -4,4 +4,5 @@ GFXSRC += $(GFXLIB)/src/gos/chibios.c \
$(GFXLIB)/src/gos/linux.c \
$(GFXLIB)/src/gos/osx.c \
$(GFXLIB)/src/gos/raw32.c \
+ $(GFXLIB)/src/gos/ecos.c
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c
index e1625b13..ab2e2981 100644
--- a/src/gwin/gwin.c
+++ b/src/gwin/gwin.c
@@ -226,6 +226,12 @@ 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);
diff --git a/src/gwin/sys_defs.h b/src/gwin/sys_defs.h
index 830827b2..169b4498 100644
--- a/src/gwin/sys_defs.h
+++ b/src/gwin/sys_defs.h
@@ -601,6 +601,24 @@ 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