diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-11-23 15:49:06 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-11-23 15:49:06 +0000 |
commit | 24b649553719312f79127bba841818a43a00fd8a (patch) | |
tree | 217f8115528194e63b6b681ed7e2b8746ec1c241 /nuttx/graphics/nxtk | |
parent | 99cc52c0763dea695fc740ed2dcfaed7468febd5 (diff) | |
download | px4-firmware-24b649553719312f79127bba841818a43a00fd8a.tar.gz px4-firmware-24b649553719312f79127bba841818a43a00fd8a.tar.bz2 px4-firmware-24b649553719312f79127bba841818a43a00fd8a.zip |
Several changes (mostly graphics related) from Petteri Aimonen
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5385 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics/nxtk')
-rw-r--r-- | nuttx/graphics/nxtk/nxtk_filltrapwindow.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/nuttx/graphics/nxtk/nxtk_filltrapwindow.c b/nuttx/graphics/nxtk/nxtk_filltrapwindow.c index c1032f1e7..55c051ffd 100644 --- a/nuttx/graphics/nxtk/nxtk_filltrapwindow.c +++ b/nuttx/graphics/nxtk/nxtk_filltrapwindow.c @@ -94,6 +94,7 @@ int nxtk_filltrapwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_trapezoid_s *tra { FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd; struct nxgl_rect_s relclip; + struct nxgl_trapezoid_s reltrap; #ifdef CONFIG_DEBUG if (!hfwnd || !trap || !color) @@ -103,8 +104,14 @@ int nxtk_filltrapwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_trapezoid_s *tra } #endif - /* Perform the fill, clipping to the client window */ + /* Move the trapezoid from window contents area to window area */ + nxgl_trapoffset(&reltrap, trap, + fwnd->fwrect.pt1.x - fwnd->wnd.bounds.pt1.x, + fwnd->fwrect.pt1.y - fwnd->wnd.bounds.pt1.y); + + /* Perform the fill, clipping to the client window */ nxgl_rectoffset(&relclip, &fwnd->fwrect, -fwnd->wnd.bounds.pt1.x, -fwnd->wnd.bounds.pt1.y); - return nx_filltrapezoid((NXWINDOW)hfwnd, &relclip, trap, color); + + return nx_filltrapezoid((NXWINDOW)hfwnd, &relclip, &reltrap, color); } |