summaryrefslogtreecommitdiff
path: root/nuttx/graphics/nxbe/nxbe_fill.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/graphics/nxbe/nxbe_fill.c')
-rw-r--r--nuttx/graphics/nxbe/nxbe_fill.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/nuttx/graphics/nxbe/nxbe_fill.c b/nuttx/graphics/nxbe/nxbe_fill.c
index 6664d8e2d..e92b21b10 100644
--- a/nuttx/graphics/nxbe/nxbe_fill.c
+++ b/nuttx/graphics/nxbe/nxbe_fill.c
@@ -121,9 +121,13 @@ void nxbe_fill(FAR struct nxbe_window_s *wnd,
}
#endif
+ /* Offset the rectangle by the window origin to convert it into a bounding box */
+
+ nxgl_rectoffset(&remaining, rect, wnd->origin.x, wnd->origin.y);
+
/* Clip to the limits of the window and of the background screen */
- nxgl_rectintersect(&remaining, rect, &wnd->bounds);
+ nxgl_rectintersect(&remaining, &remaining, &wnd->bounds);
nxgl_rectintersect(&remaining, &remaining, &wnd->be->bkgd.bounds);
if (!nxgl_nullrect(&remaining))