diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-04-05 08:50:01 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-04-05 08:50:01 -0600 |
commit | 0aa9b220495236e5ce855a2fd7565e3ccd94114a (patch) | |
tree | 53a6899895545101d71b84d18adef5c9ae19f0c1 /nuttx/include | |
parent | b49b2136f16a49b753e7824cb68f2294599179ac (diff) | |
download | px4-nuttx-0aa9b220495236e5ce855a2fd7565e3ccd94114a.tar.gz px4-nuttx-0aa9b220495236e5ce855a2fd7565e3ccd94114a.tar.bz2 px4-nuttx-0aa9b220495236e5ce855a2fd7565e3ccd94114a.zip |
Add a 'capped' boolean parameter to all drawline/drawLine functions/methods. The idea is that this will produce better joining between lines
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/nx/nx.h | 7 | ||||
-rw-r--r-- | nuttx/include/nuttx/nx/nxtk.h | 12 |
2 files changed, 14 insertions, 5 deletions
diff --git a/nuttx/include/nuttx/nx/nx.h b/nuttx/include/nuttx/nx/nx.h index 6093a0878..6f8077f61 100644 --- a/nuttx/include/nuttx/nx/nx.h +++ b/nuttx/include/nuttx/nx/nx.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/nuttx/nx/nx.h * - * Copyright (C) 2008-2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2011, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -776,6 +776,8 @@ int nx_filltrapezoid(NXWINDOW hwnd, FAR const struct nxgl_rect_s *clip, * vector - Describes the line to be drawn * width - The width of the line * color - The color to use to fill the line + * capped - Draw a circular cap both ends of the line to support better + * line joins * * Return: * OK on success; ERROR on failure with errno set appropriately @@ -783,7 +785,8 @@ int nx_filltrapezoid(NXWINDOW hwnd, FAR const struct nxgl_rect_s *clip, ****************************************************************************/ int nx_drawline(NXWINDOW hwnd, FAR struct nxgl_vector_s *vector, - nxgl_coord_t width, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); + nxgl_coord_t width, nxgl_mxpixel_t color[CONFIG_NX_NPLANES], + bool capped); /**************************************************************************** * Name: nx_drawcircle diff --git a/nuttx/include/nuttx/nx/nxtk.h b/nuttx/include/nuttx/nx/nxtk.h index eb0d9df6f..7b7d76212 100644 --- a/nuttx/include/nuttx/nx/nxtk.h +++ b/nuttx/include/nuttx/nx/nxtk.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/nuttx/nx/nxtk.h * - * Copyright (C) 2008-2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2012, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -354,6 +354,8 @@ EXTERN int nxtk_filltrapwindow(NXTKWINDOW hfwnd, * vector - Describes the line to be drawn * width - The width of the line * color - The color to use to fill the line + * capped - Draw a circular cap both ends of the line to support better + * line joins * * Return: * OK on success; ERROR on failure with errno set appropriately @@ -363,7 +365,8 @@ EXTERN int nxtk_filltrapwindow(NXTKWINDOW hfwnd, EXTERN int nxtk_drawlinewindow(NXTKWINDOW hfwnd, FAR struct nxgl_vector_s *vector, nxgl_coord_t width, - nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); + nxgl_mxpixel_t color[CONFIG_NX_NPLANES], + bool capped); /**************************************************************************** * Name: nxtk_drawcirclewindow @@ -598,6 +601,8 @@ EXTERN int nxtk_filltraptoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_trapezoi * vector - Describes the line to be drawn * width - The width of the line * color - The color to use to fill the line + * capped - Draw a circular cap both ends of the line to support better + * line joins * * Return: * OK on success; ERROR on failure with errno set appropriately @@ -607,7 +612,8 @@ EXTERN int nxtk_filltraptoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_trapezoi EXTERN int nxtk_drawlinetoolbar(NXTKWINDOW hfwnd, FAR struct nxgl_vector_s *vector, nxgl_coord_t width, - nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); + nxgl_mxpixel_t color[CONFIG_NX_NPLANES], + bool capped); /**************************************************************************** * Name: nxtk_drawcircletoolbar |