summaryrefslogtreecommitdiff
path: root/apps/examples/nxtext/nxtext_bkgd.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-07-27 14:43:45 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-07-27 14:43:45 +0000
commit99ffb319c5af373ef135c2a3e73bf1171e55559e (patch)
tree7aa08fa81a006d354469de2652043ab969d8a3c4 /apps/examples/nxtext/nxtext_bkgd.c
parentce09509ff8c3127b4cc07ebcaae78229d5b2d90a (diff)
downloadnuttx-99ffb319c5af373ef135c2a3e73bf1171e55559e.tar.gz
nuttx-99ffb319c5af373ef135c2a3e73bf1171e55559e.tar.bz2
nuttx-99ffb319c5af373ef135c2a3e73bf1171e55559e.zip
Incorporated new fonts into examples; fix glyph allocation bug in nxhello
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3822 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/nxtext/nxtext_bkgd.c')
-rw-r--r--apps/examples/nxtext/nxtext_bkgd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/examples/nxtext/nxtext_bkgd.c b/apps/examples/nxtext/nxtext_bkgd.c
index a87425112..90cc19165 100644
--- a/apps/examples/nxtext/nxtext_bkgd.c
+++ b/apps/examples/nxtext/nxtext_bkgd.c
@@ -136,7 +136,7 @@ static void nxbg_redrawrect(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect)
for (i = 0; i < g_bgstate.nchars; i++)
{
- nxtext_fillchar(hwnd, rect, &g_bgstate, &g_bgstate.bm[i]);
+ nxtext_fillchar(hwnd, rect, &g_bgstate, g_bghfont, &g_bgstate.bm[i]);
}
}
@@ -271,7 +271,7 @@ static inline void nxbg_movedisplay(NXWINDOW hwnd, int bottom, int lineheight)
bm = &g_bgstate.bm[i];
if (bm->pos.y <= rect.pt2.y && bm->pos.y + g_bgstate.fheight >= rect.pt1.y)
{
- nxtext_fillchar(hwnd, &rect, &g_bgstate, bm);
+ nxtext_fillchar(hwnd, &rect, &g_bgstate, g_bghfont, bm);
}
}
}
@@ -402,7 +402,7 @@ FAR struct nxtext_state_s *nxbg_getstate(void)
* state structure
*/
- fontset = nxf_getfontset(g_fonthandle);
+ fontset = nxf_getfontset(g_bghfont);
g_bgstate.fheight = fontset->mxheight;
g_bgstate.fwidth = fontset->mxwidth;
g_bgstate.spwidth = fontset->spwidth;
@@ -462,6 +462,6 @@ void nxbg_write(NXWINDOW hwnd, FAR const uint8_t *buffer, size_t buflen)
/* Finally, we can output the character */
- nxtext_putc(hwnd, &g_bgstate, (uint8_t)*buffer++);
+ nxtext_putc(hwnd, &g_bgstate, g_bghfont, (uint8_t)*buffer++);
}
}