diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-07-10 13:22:13 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-07-10 13:22:13 +0000 |
commit | a359bbe91a6fd0ec5e31b4808735f34310edb67e (patch) | |
tree | 9c6d6f0468714c0f7881861f72a349cfe02ba46e /apps/examples | |
parent | 8f49596dcc5ab93470d7053f9f84aa822eb5d4fc (diff) | |
download | px4-nuttx-a359bbe91a6fd0ec5e31b4808735f34310edb67e.tar.gz px4-nuttx-a359bbe91a6fd0ec5e31b4808735f34310edb67e.tar.bz2 px4-nuttx-a359bbe91a6fd0ec5e31b4808735f34310edb67e.zip |
Fix some NXTEXT bkgd redraw errors
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3764 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples')
-rw-r--r-- | apps/examples/nxtext/nxtext_bkgd.c | 6 | ||||
-rw-r--r-- | apps/examples/nxtext/nxtext_putc.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/apps/examples/nxtext/nxtext_bkgd.c b/apps/examples/nxtext/nxtext_bkgd.c index abf170a75..9c1ccf41f 100644 --- a/apps/examples/nxtext/nxtext_bkgd.c +++ b/apps/examples/nxtext/nxtext_bkgd.c @@ -202,6 +202,7 @@ static void nxbg_kbdin(NXWINDOW hwnd, uint8_t nch, FAR const uint8_t *ch, static void nxbg_scroll(NXWINDOW hwnd, int lineheight) { + struct nxgl_rect_s rect; int i; int j; @@ -256,6 +257,10 @@ static void nxbg_scroll(NXWINDOW hwnd, int lineheight) /* Then re-draw the entire display */ + rect.pt1.x = 0; + rect.pt1.y = 0; + rect.pt2.x = g_bgstate.wsize.w - 1; + rect.pt2.y = g_bgstate.wsize.h - 1; nxbg_redrawrect(hwnd, NULL); } @@ -366,7 +371,6 @@ void nxbg_redrawrect(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect) * will actually be redrawn). */ - nxtext_home(&g_bgstate); for (i = 0; i < g_bgstate.nchars; i++) { nxtext_fillchar(hwnd, rect, &g_bgstate, &g_bgstate.bm[i]); diff --git a/apps/examples/nxtext/nxtext_putc.c b/apps/examples/nxtext/nxtext_putc.c index 14b889edf..f1125f17d 100644 --- a/apps/examples/nxtext/nxtext_putc.c +++ b/apps/examples/nxtext/nxtext_putc.c @@ -443,7 +443,7 @@ void nxtext_newline(FAR struct nxtext_state_s *st) st->fpos.x = st->spwidth; - /* Linefeed: Done the max font height + 2 */ + /* Linefeed: Down the max font height + 2 */ st->fpos.y += (st->fheight + 2); } |