summaryrefslogtreecommitdiff
path: root/nuttx/graphics/nxglib
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-04 20:48:52 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-04 20:48:52 +0000
commit1f003cf9e6a6318af036b8d1df70aa4d64ea6d05 (patch)
treea7dac5cb2ba7ff75c73f1559a3cab61495f45c76 /nuttx/graphics/nxglib
parentbee0dc42f7930b2f1fa1f5a30b767cd7b797a8f4 (diff)
downloadnuttx-1f003cf9e6a6318af036b8d1df70aa4d64ea6d05.tar.gz
nuttx-1f003cf9e6a6318af036b8d1df70aa4d64ea6d05.tar.bz2
nuttx-1f003cf9e6a6318af036b8d1df70aa4d64ea6d05.zip
Updated NxWM widgets, several NX, NxWidgets, and NxWM bug fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4699 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics/nxglib')
-rw-r--r--nuttx/graphics/nxglib/fb/nxglib_moverectangle.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/nuttx/graphics/nxglib/fb/nxglib_moverectangle.c b/nuttx/graphics/nxglib/fb/nxglib_moverectangle.c
index d1bcbe7c9..d8e52250c 100644
--- a/nuttx/graphics/nxglib/fb/nxglib_moverectangle.c
+++ b/nuttx/graphics/nxglib/fb/nxglib_moverectangle.c
@@ -1,8 +1,8 @@
/****************************************************************************
* graphics/nxglib/fb/nxglib_moverectangle.c
*
- * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2008-2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -185,14 +185,16 @@ void NXGL_FUNCNAME(nxgl_moverectangle,NXGLIB_SUFFIX)
* source position.
*/
- dline = (FAR uint8_t*)sline - offset->y * stride - NXGL_SCALEX(offset->x);
+ dline = pinfo->fbmem + offset->y * stride + NXGL_SCALEX(offset->x);
/* Case 1: Is the destination position above the displayed position?
- * If the Y offset is negative, then the destination is offset to a
- * postion below (or to the right) in the source in framebuffer memory.
+ * If the destination position is less then then the src address, then the
+ * destination is offset to a postion below (and or to the left) of the
+ * source in framebuffer memory.
*/
- if (offset->y < 0 || (offset->y == 0 && offset->x <= 0))
+ if (offset->y < rect->pt1.y ||
+ (offset->y < rect->pt1.y && offset->x <= rect->pt1.x))
{
/* Yes.. Copy the rectangle from top down (i.e., adding the stride
* to move to the next, lower row) */