diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-11-28 01:33:18 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-11-28 01:33:18 +0000 |
commit | cb311769b6806d5eb0a0b976d062d3c1c3cad2d4 (patch) | |
tree | 5c867724b8d0f8996fe6e515b20772f0eb7ef217 /nuttx/graphics/nxbe/nxbe_move.c | |
parent | 0363cbbc1a111f650c8e6ec52d9a0719737511e3 (diff) | |
download | px4-nuttx-cb311769b6806d5eb0a0b976d062d3c1c3cad2d4.tar.gz px4-nuttx-cb311769b6806d5eb0a0b976d062d3c1c3cad2d4.tar.bz2 px4-nuttx-cb311769b6806d5eb0a0b976d062d3c1c3cad2d4.zip |
minor refactoring
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1322 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics/nxbe/nxbe_move.c')
-rw-r--r-- | nuttx/graphics/nxbe/nxbe_move.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nuttx/graphics/nxbe/nxbe_move.c b/nuttx/graphics/nxbe/nxbe_move.c index 872ed55eb..440a53016 100644 --- a/nuttx/graphics/nxbe/nxbe_move.c +++ b/nuttx/graphics/nxbe/nxbe_move.c @@ -209,9 +209,13 @@ void nxbe_move(FAR struct nxbe_window_s *wnd, FAR const struct nxgl_rect_s *rect } #endif + /* Offset the rectangle by the window origin to create 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)) |