diff options
Diffstat (limited to 'nuttx/graphics/nxbe/nxbe_move.c')
-rw-r--r-- | nuttx/graphics/nxbe/nxbe_move.c | 10 |
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); |