summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-08-08 14:35:11 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-08-08 14:35:11 +0000
commit20e5614e3299d77e103ecef4d6b2bbac6b6375ee (patch)
tree4ab533819e295cee9d6c3db8c51c2366beac1fee /nuttx
parent5b2f479177d15e64b2ab6d07a3306ada6e60027c (diff)
downloadpx4-nuttx-20e5614e3299d77e103ecef4d6b2bbac6b6375ee.tar.gz
px4-nuttx-20e5614e3299d77e103ecef4d6b2bbac6b6375ee.tar.bz2
px4-nuttx-20e5614e3299d77e103ecef4d6b2bbac6b6375ee.zip
Fix case where rectangle is moved horizonatlly
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2832 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/graphics/nxglib/fb/nxglib_moverectangle.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nuttx/graphics/nxglib/fb/nxglib_moverectangle.c b/nuttx/graphics/nxglib/fb/nxglib_moverectangle.c
index 9f804c044..84e0654c8 100644
--- a/nuttx/graphics/nxglib/fb/nxglib_moverectangle.c
+++ b/nuttx/graphics/nxglib/fb/nxglib_moverectangle.c
@@ -192,7 +192,7 @@ void NXGL_FUNCNAME(nxgl_moverectangle,NXGLIB_SUFFIX)
* postion below (or to the right) in the source in framebuffer memory.
*/
- if (offset->y < 0)
+ if (offset->y < 0 || (offset->y == 0 && offset->x <= 0))
{
/* Yes.. Copy the rectangle from top down (i.e., adding the stride
* to move to the next, lower row) */
@@ -228,7 +228,8 @@ void NXGL_FUNCNAME(nxgl_moverectangle,NXGLIB_SUFFIX)
dline += hoffset;
/* Copy the rectangle from the bottom up (i.e., subtracting stride
- * to re-position to the previous, higher row) */
+ * to re-position to the previous, higher row)
+ */
while (rows--)
{