summaryrefslogtreecommitdiff
path: root/apps/examples/nxtext/nxtext_putc.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-07-09 21:11:00 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-07-09 21:11:00 +0000
commit8f49596dcc5ab93470d7053f9f84aa822eb5d4fc (patch)
tree01712c8abf0522bd94f976d0b59c48d364597903 /apps/examples/nxtext/nxtext_putc.c
parent5956e64bad49ffd72892ecc34ccfbbc8779a8871 (diff)
downloadnuttx-8f49596dcc5ab93470d7053f9f84aa822eb5d4fc.tar.gz
nuttx-8f49596dcc5ab93470d7053f9f84aa822eb5d4fc.tar.bz2
nuttx-8f49596dcc5ab93470d7053f9f84aa822eb5d4fc.zip
Fix an error in a bounding box calculation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3763 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/nxtext/nxtext_putc.c')
-rw-r--r--apps/examples/nxtext/nxtext_putc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/examples/nxtext/nxtext_putc.c b/apps/examples/nxtext/nxtext_putc.c
index 6745b3c87..14b889edf 100644
--- a/apps/examples/nxtext/nxtext_putc.c
+++ b/apps/examples/nxtext/nxtext_putc.c
@@ -522,8 +522,8 @@ void nxtext_fillchar(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
bounds.pt1.x = bm->pos.x;
bounds.pt1.y = bm->pos.y;
- bounds.pt1.x = bm->pos.x + glyph->width - 1;
- bounds.pt1.y = bm->pos.y + glyph->height - 1;
+ bounds.pt2.x = bm->pos.x + glyph->width - 1;
+ bounds.pt2.y = bm->pos.y + glyph->height - 1;
/* Should this also be clipped to a region in the window? */
@@ -545,6 +545,7 @@ void nxtext_fillchar(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
if (!nxgl_nullrect(&intersection))
{
FAR const void *src = (FAR const void *)glyph->bitmap;
+
ret = nx_bitmap((NXWINDOW)hwnd, &intersection, &src,
&bm->pos, (unsigned int)glyph->stride);
if (ret < 0)