Merge branch 'master' of https://bitbucket.org/Tectu/ugfx
This commit is contained in:
commit
df76759cd4
@ -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
|
||||
|
@ -56,8 +56,10 @@ static GTIMER_DECL(MouseTimer);
|
||||
#include <string.h> // 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;
|
||||
|
@ -124,7 +124,7 @@ void gwinLabelSetBorder(GHandle gh, bool_t border);
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
void gwinLabelDefaultDraw(GWidgetObject *gw, void *param)
|
||||
void gwinLabelDefaultDraw(GWidgetObject *gw, void *param);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user