summaryrefslogtreecommitdiff
path: root/nuttx/graphics/nxtk/nxtk_setsize.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-12-02 20:02:59 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-12-02 20:02:59 +0000
commitaebaefc303f12beb92c4da219411bdb00aa4e03c (patch)
tree770fd1403c0aaf22a23220a4f95f689de9f8cf70 /nuttx/graphics/nxtk/nxtk_setsize.c
parent124c331605b174afc08f7ef498209952b4a1dbc5 (diff)
downloadpx4-nuttx-aebaefc303f12beb92c4da219411bdb00aa4e03c.tar.gz
px4-nuttx-aebaefc303f12beb92c4da219411bdb00aa4e03c.tar.bz2
px4-nuttx-aebaefc303f12beb92c4da219411bdb00aa4e03c.zip
Don't keep sizes in rectangles
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1392 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics/nxtk/nxtk_setsize.c')
-rw-r--r--nuttx/graphics/nxtk/nxtk_setsize.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/nuttx/graphics/nxtk/nxtk_setsize.c b/nuttx/graphics/nxtk/nxtk_setsize.c
index a72e8f883..e2917fc34 100644
--- a/nuttx/graphics/nxtk/nxtk_setsize.c
+++ b/nuttx/graphics/nxtk/nxtk_setsize.c
@@ -91,10 +91,10 @@
*
****************************************************************************/
-int nxtk_setsize(NXTKWINDOW hfwnd, FAR struct nxgl_rect_s *size)
+int nxtk_setsize(NXTKWINDOW hfwnd, FAR struct nxgl_size_s *size)
{
FAR struct nxtk_framedwindow_s *fwnd = (FAR struct nxtk_framedwindow_s *)hfwnd;
- struct nxgl_rect_s newsize;
+ struct nxgl_size_s newsize;
#ifdef CONFIG_DEBUG
if (!hfwnd || !size)
@@ -106,10 +106,8 @@ int nxtk_setsize(NXTKWINDOW hfwnd, FAR struct nxgl_rect_s *size)
/* Add the sizes need for the toolbar and the borders */
- newsize.pt1.x = 0;
- newsize.pt1.y = 0;
- newsize.pt2.x = size->pt2.x + 2 * CONFIG_NXTK_BORDERWIDTH;
- newsize.pt2.y = size->pt2.y + fwnd->tbheight + 2 * CONFIG_NXTK_BORDERWIDTH;
+ newsize.w = size->w + 2 * CONFIG_NXTK_BORDERWIDTH;
+ newsize.h = size->w + fwnd->tbheight + 2 * CONFIG_NXTK_BORDERWIDTH;
/* Then set the window size */