summaryrefslogtreecommitdiff
path: root/nuttx/graphics
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-04-23 03:29:51 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-04-23 03:29:51 +0000
commitc44875bf6618c6785ef58a734f47155ece14a30f (patch)
treefee9ac9d15177db27956eda28e54d36e7cd90f34 /nuttx/graphics
parent72c0c33d10e26f4ac9026c66cd3cf69478a31bc9 (diff)
downloadpx4-nuttx-c44875bf6618c6785ef58a734f47155ece14a30f.tar.gz
px4-nuttx-c44875bf6618c6785ef58a734f47155ece14a30f.tar.bz2
px4-nuttx-c44875bf6618c6785ef58a734f47155ece14a30f.zip
More NX LCD fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2624 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics')
-rwxr-xr-xnuttx/graphics/nxglib/lcd/nxglib_fillrectangle.c4
-rw-r--r--nuttx/graphics/nxtk/nxtk_events.c8
2 files changed, 5 insertions, 7 deletions
diff --git a/nuttx/graphics/nxglib/lcd/nxglib_fillrectangle.c b/nuttx/graphics/nxglib/lcd/nxglib_fillrectangle.c
index e3668c0ea..50ef7efbe 100755
--- a/nuttx/graphics/nxglib/lcd/nxglib_fillrectangle.c
+++ b/nuttx/graphics/nxglib/lcd/nxglib_fillrectangle.c
@@ -88,13 +88,11 @@ void NXGL_FUNCNAME(nxgl_fillrectangle,NXGLIB_SUFFIX)
(FAR struct lcd_planeinfo_s *pinfo, FAR const struct nxgl_rect_s *rect, nxgl_mxpixel_t color)
{
unsigned int ncols;
- unsigned int nrows;
unsigned int row;
/* Get the dimensions of the rectange to fill in pixels */
ncols = rect->pt2.x - rect->pt1.x + 1;
- nrows = rect->pt2.y - rect->pt1.y + 1;
/* Fill the run buffer with the selected color */
@@ -102,7 +100,7 @@ void NXGL_FUNCNAME(nxgl_fillrectangle,NXGLIB_SUFFIX)
/* Then fill the rectangle line-by-line */
- for (row = 0; row < nrows; row++)
+ for (row = rect->pt1.y; row <= rect->pt2.y; row++)
{
/* Draw the raster line at this row */
diff --git a/nuttx/graphics/nxtk/nxtk_events.c b/nuttx/graphics/nxtk/nxtk_events.c
index 45ab1e8a5..cbcbabe4b 100644
--- a/nuttx/graphics/nxtk/nxtk_events.c
+++ b/nuttx/graphics/nxtk/nxtk_events.c
@@ -113,7 +113,7 @@ static void nxtk_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
DEBUGASSERT(hwnd && rect && fwnd->fwcb);
- gvdbg("nxtk_redraw: hwnd=%p rect={(%d,%d),(%d,%d)} more=%d\n",
+ gvdbg("hwnd=%p rect={(%d,%d),(%d,%d)} more=%d\n",
hwnd, rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y, more);
/* The incoming rectangle (rect) is relative to the containing window
@@ -131,7 +131,7 @@ static void nxtk_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
nxtk_containerclip(fwnd, &intersection, rect, &fwnd->fwrect);
- gvdbg("nxtk_redraw: fwrect intersction={(%d,%d),(%d,%d)}\n",
+ gvdbg("fwrect intersction={(%d,%d),(%d,%d)}\n",
intersection.pt1.x, intersection.pt1.y,
intersection.pt2.x, intersection.pt2.y);
@@ -154,7 +154,7 @@ static void nxtk_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
nxtk_containerclip(fwnd, &intersection, rect, &fwnd->tbrect);
- gvdbg("nxtk_redraw: tbrect intersction={(%d,%d),(%d,%d)}\n",
+ gvdbg("tbrect intersction={(%d,%d),(%d,%d)}\n",
intersection.pt1.x, intersection.pt1.y,
intersection.pt2.x, intersection.pt2.y);
@@ -181,7 +181,7 @@ static void nxtk_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size,
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hwnd;
struct nxgl_size_s subwindowsize;
- gvdbg("nxtk_position: hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n",
+ gvdbg("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n",
hwnd, size->w, size->h, pos->x, pos->y,
bounds->pt1.x, bounds->pt1.y, bounds->pt2.x, bounds->pt2.y);