diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-03-28 01:52:00 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-03-28 01:52:00 +0000 |
commit | 6402e6269bd2f9619b7a7b21bab9a1fedc6f360b (patch) | |
tree | 798ae3360b28c3da16566c60b714d17107557c5d /nuttx/graphics | |
parent | c2853cbc580b343ff45c3befc1b484ffc2a2ecfe (diff) | |
download | px4-nuttx-6402e6269bd2f9619b7a7b21bab9a1fedc6f360b.tar.gz px4-nuttx-6402e6269bd2f9619b7a7b21bab9a1fedc6f360b.tar.bz2 px4-nuttx-6402e6269bd2f9619b7a7b21bab9a1fedc6f360b.zip |
More NX Console fixes... good progress but still not ready for prime time
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4533 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics')
-rw-r--r-- | nuttx/graphics/nxbe/nxbe_bitmap.c | 14 | ||||
-rw-r--r-- | nuttx/graphics/nxconsole/nxcon_internal.h | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/nuttx/graphics/nxbe/nxbe_bitmap.c b/nuttx/graphics/nxbe/nxbe_bitmap.c index 75692ecb5..991b91d82 100644 --- a/nuttx/graphics/nxbe/nxbe_bitmap.c +++ b/nuttx/graphics/nxbe/nxbe_bitmap.c @@ -135,16 +135,11 @@ void nxbe_bitmap(FAR struct nxbe_window_s *wnd, FAR const struct nxgl_rect_s *de } #endif - /* Offset the rectangle and image origin by the window origin */ - - nxgl_rectoffset(&bounds, dest, wnd->bounds.pt1.x, wnd->bounds.pt1.y); - nxgl_vectoradd(&offset, origin, &wnd->bounds.pt1); - /* Verify that the destination rectangle begins "below" and to the "right" * of the origin */ - if (bounds.pt1.x < origin->x || bounds.pt1.y < origin->y) + if (dest->pt1.x < origin->x || dest->pt1.y < origin->y) { gdbg("Bad dest start position\n"); return; @@ -154,13 +149,18 @@ void nxbe_bitmap(FAR struct nxbe_window_s *wnd, FAR const struct nxgl_rect_s *de * width of the source bitmap data (taking into account the bitmap origin) */ - deststride = (((bounds.pt2.x - origin->x + 1) * wnd->be->plane[0].pinfo.bpp + 7) >> 3); + deststride = (((dest->pt2.x - origin->x + 1) * wnd->be->plane[0].pinfo.bpp + 7) >> 3); if (deststride > stride) { gdbg("Bad dest width\n"); return; } + /* Offset the rectangle and image origin by the window origin */ + + nxgl_rectoffset(&bounds, dest, wnd->bounds.pt1.x, wnd->bounds.pt1.y); + nxgl_vectoradd(&offset, origin, &wnd->bounds.pt1); + /* Clip to the limits of the window and of the background screen */ nxgl_rectintersect(&remaining, &bounds, &wnd->bounds); diff --git a/nuttx/graphics/nxconsole/nxcon_internal.h b/nuttx/graphics/nxconsole/nxcon_internal.h index 27b963d73..f5cbc9c6d 100644 --- a/nuttx/graphics/nxconsole/nxcon_internal.h +++ b/nuttx/graphics/nxconsole/nxcon_internal.h @@ -149,7 +149,9 @@ struct nxcon_glyph_s uint8_t height; /* Height of this glyph (in rows) */ uint8_t width; /* Width of this glyph (in pixels) */ uint8_t stride; /* Width of the glyph row (in bytes) */ +#ifdef CONFIG_NXCONSOLE_FONTCACHE uint8_t usecnt; /* Use count */ +#endif FAR uint8_t *bitmap; /* Allocated bitmap memory */ }; |