From 8c701eeda11098d28a00113c0b5e73be76ca4f03 Mon Sep 17 00:00:00 2001 From: Woody Hawthorne Date: Wed, 4 Nov 2015 15:29:52 +1100 Subject: Fixing bug created by commit [86aef59] --- src/gwin/gwin_label.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gwin/gwin_label.h b/src/gwin/gwin_label.h index 2b784b3a..84836bf2 100644 --- a/src/gwin/gwin_label.h +++ b/src/gwin/gwin_label.h @@ -124,7 +124,7 @@ void gwinLabelSetBorder(GHandle gh, bool_t border); * * @api */ -void gwinLabelDefaultDraw(GWidgetObject *gw, void *param) +void gwinLabelDefaultDraw(GWidgetObject *gw, void *param); /** @} */ -- cgit v1.2.3 From 1ed7559ef0a3a34799dcc8af301638312bda3cc7 Mon Sep 17 00:00:00 2001 From: inmarket Date: Wed, 4 Nov 2015 15:05:16 +1000 Subject: Handle antialiased font drawing when using word-wrap --- src/gdisp/gdisp.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c index ea9fcc7a..84215796 100644 --- a/src/gdisp/gdisp.c +++ b/src/gdisp/gdisp.c @@ -3169,7 +3169,15 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co /* Callback to render string boxes with word wrap. */ #if GDISP_NEED_TEXT_WORDWRAP - static bool mf_line_callback(mf_str line, uint16_t count, void *state) { + static bool mf_drawline_callback(mf_str line, uint16_t count, void *state) { + wrapParameters_t* wrapParameters = (wrapParameters_t*)state; + + mf_render_aligned(wrapParameters->font, wrapParameters->x, wrapParameters->y, wrapParameters->justify, line, count, drawcharglyph, wrapParameters->g); + + wrapParameters->y += wrapParameters->font->line_height; + return TRUE; + } + static bool mf_fillline_callback(mf_str line, uint16_t count, void *state) { wrapParameters_t* wrapParameters = (wrapParameters_t*)state; mf_render_aligned(wrapParameters->font, wrapParameters->x, wrapParameters->y, wrapParameters->justify, line, count, fillcharglyph, wrapParameters->g); @@ -3283,7 +3291,7 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co wrapParameters.justify = justify; wrapParameters.g = g; - mf_wordwrap(font, cx, str, mf_line_callback, &wrapParameters); + mf_wordwrap(font, cx, str, mf_drawline_callback, &wrapParameters); #else mf_render_aligned(font, x, y, justify, str, 0, drawcharglyph, g); #endif @@ -3336,7 +3344,7 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co wrapParameters.justify = justify; wrapParameters.g = g; - mf_wordwrap(font, cx, str, mf_line_callback, &wrapParameters); + mf_wordwrap(font, cx, str, mf_fillline_callback, &wrapParameters); #else mf_render_aligned(font, x, y, justify, str, 0, fillcharglyph, g); #endif -- cgit v1.2.3 From 583b314db2051636f1e8d988f6ce0447272f5140 Mon Sep 17 00:00:00 2001 From: inmarket Date: Wed, 4 Nov 2015 15:05:47 +1000 Subject: Fix compiler errors for non-gcc compilers. --- src/ginput/ginput_mouse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ginput/ginput_mouse.c b/src/ginput/ginput_mouse.c index 881d6339..f149217d 100644 --- a/src/ginput/ginput_mouse.c +++ b/src/ginput/ginput_mouse.c @@ -56,8 +56,10 @@ static GTIMER_DECL(MouseTimer); #include // Required for memcpy static GFXINLINE void CalibrationTransform(GMouseReading *pt, const GMouseCalibration *c) { - coord_t x = (coord_t) (c->ax * pt->x + c->bx * pt->y + c->cx); - coord_t y = (coord_t) (c->ay * pt->x + c->by * pt->y + c->cy); + coord_t x, y; + + x = (coord_t) (c->ax * pt->x + c->bx * pt->y + c->cx); + y = (coord_t) (c->ay * pt->x + c->by * pt->y + c->cy); pt->x = x; pt->y = y; -- cgit v1.2.3