summaryrefslogtreecommitdiff
path: root/nuttx/graphics/nxbe/nxbe_move.c
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/nxbe/nxbe_move.c
parentbee0dc42f7930b2f1fa1f5a30b767cd7b797a8f4 (diff)
downloadpx4-nuttx-1f003cf9e6a6318af036b8d1df70aa4d64ea6d05.tar.gz
px4-nuttx-1f003cf9e6a6318af036b8d1df70aa4d64ea6d05.tar.bz2
px4-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/nxbe/nxbe_move.c')
-rw-r--r--nuttx/graphics/nxbe/nxbe_move.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/nuttx/graphics/nxbe/nxbe_move.c b/nuttx/graphics/nxbe/nxbe_move.c
index c52151421..193b174c2 100644
--- a/nuttx/graphics/nxbe/nxbe_move.c
+++ b/nuttx/graphics/nxbe/nxbe_move.c
@@ -1,8 +1,8 @@
/****************************************************************************
* graphics/nxbe/nxbe_move.c
*
- * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2008-2009, 2011-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
@@ -93,6 +93,8 @@ static void nxbe_clipmovesrc(FAR struct nxbe_clipops_s *cops,
if (info->offset.x != 0 || info->offset.y != 0)
{
+ /* Offset is the destination position of the moved rectangle */
+
offset.x = rect->pt1.x + info->offset.x;
offset.y = rect->pt1.y + info->offset.y;
@@ -160,8 +162,7 @@ static void nxbe_clipmovedest(FAR struct nxbe_clipops_s *cops,
/* Clip to determine what is inside the bounds */
- nxgl_rectoffset(&tmprect1, rect, -offset.x, -offset.y);
- nxgl_rectintersect(&src, &tmprect1, &dstdata->srcrect);
+ nxgl_rectintersect(&src, rect, &dstdata->srcrect);
if (!nxgl_nullrect(&src))
{