summaryrefslogtreecommitdiff
path: root/nuttx/graphics
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-07-10 18:54:54 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-07-10 18:54:54 +0000
commit33d6714215d70933d95c82a8396ceafde0c20ffe (patch)
tree3ed06182fbddb2cb7bb9faee058e2eb814c2fb48 /nuttx/graphics
parent4b40e8314b015f07618e88b7c5e7c00b55679a82 (diff)
downloadpx4-nuttx-33d6714215d70933d95c82a8396ceafde0c20ffe.tar.gz
px4-nuttx-33d6714215d70933d95c82a8396ceafde0c20ffe.tar.bz2
px4-nuttx-33d6714215d70933d95c82a8396ceafde0c20ffe.zip
Fix an error in the NX move logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3766 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics')
-rw-r--r--nuttx/graphics/nxbe/nxbe_move.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/nuttx/graphics/nxbe/nxbe_move.c b/nuttx/graphics/nxbe/nxbe_move.c
index d5bbe8403..b5c5cc6b7 100644
--- a/nuttx/graphics/nxbe/nxbe_move.c
+++ b/nuttx/graphics/nxbe/nxbe_move.c
@@ -89,12 +89,14 @@ static void nxbe_clipmovesrc(FAR struct nxbe_clipops_s *cops,
FAR const struct nxgl_rect_s *rect)
{
struct nxbe_move_s *info = (struct nxbe_move_s *)cops;
+ struct nxgl_point_s offset;
if (info->offset.x != 0 || info->offset.y != 0)
{
- struct nxgl_rect_s dest;
- nxgl_rectoffset(&dest, rect, info->offset.x, info->offset.y);
- plane->moverectangle(&plane->pinfo, &dest, &info->offset);
+ offset.x = rect->pt1.x + info->offset.x;
+ offset.y = rect->pt1.y + info->offset.y;
+
+ plane->moverectangle(&plane->pinfo, rect, &offset);
}
}
@@ -156,7 +158,7 @@ static void nxbe_clipmovedest(FAR struct nxbe_clipops_s *cops,
}
}
- /* Cip to determine what is inside the bounds */
+ /* Clip to determine what is inside the bounds */
nxgl_rectoffset(&tmprect1, rect, -offset.x, -offset.y);
nxgl_rectintersect(&src, &tmprect1, &dstdata->srcrect);