diff --git a/ChangeLog b/ChangeLog index 1e2c2732ab..c4350e2440 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2019,5 +2019,6 @@ * arch/arm/src/kinetis/kinetis_sdhc.c: SDHC driver for Kinetis parts. Initially check-in is just a crude port of the STM32 SDIO driver. Much more is needed. - + * graphics/, include/nuttx/nx: Add new NX interfaces for drawing + circles -- both circular outlines and filled circles. diff --git a/Documentation/NXGraphicsSubsystem.html b/Documentation/NXGraphicsSubsystem.html index 9b8c84c341..121301030a 100644 --- a/Documentation/NXGraphicsSubsystem.html +++ b/Documentation/NXGraphicsSubsystem.html @@ -817,7 +817,7 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, FAR struct nxgl_trapezoid_s
nxgl_circlepts
#include <nuttx/nx/nxglib.h> -void nxgl_circlepts(FAR struct nxgl_point_s *center, nxgl_coord_t radius, +void nxgl_circlepts(FAR const struct nxgl_point_s *center, nxgl_coord_t radius, FAR struct nxgl_point_s *circle);
@@ -843,7 +843,7 @@ void nxgl_circlepts(FAR struct nxgl_point_s *center, nxgl_coord_t radius,
nxgl_circletraps
#include <nuttx/nx/nxglib.h> -oid nxgl_circletraps(FAR struct nxgl_point_s *center, nxgl_coord_t radius, +oid nxgl_circletraps(FAR const struct nxgl_point_s *center, nxgl_coord_t radius, FAR struct nxgl_trapezoid_s *circle);
@@ -1750,7 +1750,7 @@ int nx_drawline(NXWINDOW hwnd, FAR struct nxgl_vector_s *vector, #include <nuttx/nx/nxglib.h> #include <nuttx/nx/nx.h> -int nx_drawcircle(NXWINDOW hwnd, FAR struct nxgl_point_s *center, +int nx_drawcircle(NXWINDOW hwnd, FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_coord_t width, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); @@ -1786,7 +1786,7 @@ int nx_drawcircle(NXWINDOW hwnd, FAR struct nxgl_point_s *center, #include <nuttx/nx/nxglib.h> #include <nuttx/nx/nx.h> -int nx_fillcircle(NXWINDOW hwnd, FAR struct nxgl_point_s *center, +int nx_fillcircle(NXWINDOW hwnd, FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]);
@@ -2336,7 +2336,7 @@ int nxtk_drawlinewindow(NXTKWINDOW hfwnd, FAR struct nxgl_vector_s *vector, #include <nuttx/nx/nxglib.h> #include <nuttx/nx/nxtk.h> -int nxtk_drawcirclewindow(NXTKWINDOW hfwnd, FAR struct nxgl_point_s *center, +int nxtk_drawcirclewindow(NXTKWINDOW hfwnd, FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_coord_t width, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); @@ -2372,7 +2372,7 @@ int nxtk_drawcirclewindow(NXTKWINDOW hfwnd, FAR struct nxgl_point_s *center, #include <nuttx/nx/nxglib.h> #include <nuttx/nx/nxtk.h> -int nxtk_fillcirclewindow(NXWINDOW hfwnd, FAR struct nxgl_point_s *center, +int nxtk_fillcirclewindow(NXWINDOW hfwnd, FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]);
@@ -2648,7 +2648,7 @@ int nxtk_drawlinetoolbar(NXTKWINDOW hfwnd, FAR struct nxgl_vector_s *vector, #include <nuttx/nx/nxglib.h> #include <nuttx/nx/nxtk.h> -int nxtk_drawcircletoolbar(NXTKWINDOW hfwnd, FAR struct nxgl_point_s *center, +int nxtk_drawcircletoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_coord_t width, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); @@ -2684,7 +2684,7 @@ int nxtk_drawcircletoolbar(NXTKWINDOW hfwnd, FAR struct nxgl_point_s *center, #include <nuttx/nx/nxglib.h> #include <nuttx/nx/nxtk.h> -int nxtk_fillcircletoolbar(NXWINDOW hfwnd, FAR struct nxgl_point_s *center, +int nxtk_fillcircletoolbar(NXWINDOW hfwnd, FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]);
diff --git a/TODO b/TODO index 1c868f9b1a..acab46733f 100644 --- a/TODO +++ b/TODO @@ -1348,3 +1348,20 @@ o Other Applications & Tests (apps/examples/) the artifact is larger. Status: Open Priority: Medium. + + Description: examples/nxlines. There is an error in the line rendering + on the 24th step (270 degrees). At that point, the + calculated position is just a bit from being horizontal. + Using configuration configs/stm3210e-eval/nxlines, I see: + + sin: ffff0000 cos: ffffffed radius: 76 halfx: -76 halfy: -1 + + And the resulting almost horizontal line: + + vector: (44,159)->(196,161) + + is rendered incorrectly every time around. Looks like logic + in nxgl_splitlines malfunctioned. + + Status: Open + Priority: Medium/High \ No newline at end of file diff --git a/configs/sim/nx/defconfig b/configs/sim/nx/defconfig index 9859e74c5a..3dfd3e820f 100644 --- a/configs/sim/nx/defconfig +++ b/configs/sim/nx/defconfig @@ -537,8 +537,17 @@ CONFIG_EXAMPLES_NX_NOTIFYSIGNO=4 # depends on CONFIG_EXAMPLES_NXLINES_BPP. # CONFIG_EXAMPLES_NXLINES_LINEWIDTH - Selects the width of the lines in # pixels (default: 16) -# CONFIG_EXAMPLES_NXLINES_LINECOLOR -- The color of the lines drawn in the -# background window. Default depends on CONFIG_EXAMPLES_NXLINES_BPP. +# CONFIG_EXAMPLES_NXLINES_LINECOLOR -- The color of the central lines drawn +# in the background window. Default depends on CONFIG_EXAMPLES_NXLINES_BPP +# (there really is no meaningful default). +# CONFIG_EXAMPLES_NXLINES_BORDERWIDTH -- The width of the circular border +# drawn in the background window. (default: 4). +# CONFIG_EXAMPLES_NXLINES_BORDERCOLOR -- The color of the circular border +# drawn in the background window. Default depends on CONFIG_EXAMPLES_NXLINES_BPP +# (there really is no meaningful default). +# CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR -- The color of the circular region +# filled in the background window. Default depends on CONFIG_EXAMPLES_NXLINES_BPP +# (there really is no meaningful default). # CONFIG_EXAMPLES_NXLINES_BPP -- Pixels per pixel to use. Valid options # include 2, 4, 8, 16, 24, and 32. Default is 16. # CONFIG_EXAMPLES_NXLINES_EXTERNINIT - The driver for the graphics device on diff --git a/configs/stm3210e-eval/nsh2/defconfig b/configs/stm3210e-eval/nsh2/defconfig index 987127cfdd..d496698868 100644 --- a/configs/stm3210e-eval/nsh2/defconfig +++ b/configs/stm3210e-eval/nsh2/defconfig @@ -1145,8 +1145,17 @@ CONFIG_EXAMPLES_NXIMAGE_EXTERNINIT=n # depends on CONFIG_EXAMPLES_NXLINES_BPP. # CONFIG_EXAMPLES_NXLINES_LINEWIDTH - Selects the width of the lines in # pixels (default: 16) -# CONFIG_EXAMPLES_NXLINES_LINECOLOR -- The color of the lines drawn in the -# background window. Default depends on CONFIG_EXAMPLES_NXLINES_BPP. +# CONFIG_EXAMPLES_NXLINES_LINECOLOR -- The color of the central lines drawn +# in the background window. Default depends on CONFIG_EXAMPLES_NXLINES_BPP +# (there really is no meaningful default). +# CONFIG_EXAMPLES_NXLINES_BORDERWIDTH -- The width of the circular border +# drawn in the background window. (default: 4). +# CONFIG_EXAMPLES_NXLINES_BORDERCOLOR -- The color of the circular border +# drawn in the background window. Default depends on CONFIG_EXAMPLES_NXLINES_BPP +# (there really is no meaningful default). +# CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR -- The color of the circular region +# filled in the background window. Default depends on CONFIG_EXAMPLES_NXLINES_BPP +# (there really is no meaningful default). # CONFIG_EXAMPLES_NXLINES_BPP -- Pixels per pixel to use. Valid options # include 2, 4, 8, 16, 24, and 32. Default is 16. # CONFIG_EXAMPLES_NXLINES_EXTERNINIT - The driver for the graphics device on @@ -1161,6 +1170,9 @@ CONFIG_EXAMPLES_NXLINES_DEVNO=0 CONFIG_EXAMPLES_NXLINES_BGCOLOR=0x0320 CONFIG_EXAMPLES_NXLINES_LINEWIDTH=16 CONFIG_EXAMPLES_NXLINES_LINECOLOR=0xffe0 +CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=4 +CONFIG_EXAMPLES_NXLINES_BORDERCOLOR=0xffe0 +CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR=0xf7bb CONFIG_EXAMPLES_NXLINES_BPP=16 CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n diff --git a/configs/stm3210e-eval/nxlines/defconfig b/configs/stm3210e-eval/nxlines/defconfig index af7c1b7d00..6a9ea3979a 100644 --- a/configs/stm3210e-eval/nxlines/defconfig +++ b/configs/stm3210e-eval/nxlines/defconfig @@ -1156,8 +1156,17 @@ CONFIG_EXAMPLES_NXIMAGE_EXTERNINIT=n # depends on CONFIG_EXAMPLES_NXLINES_BPP. # CONFIG_EXAMPLES_NXLINES_LINEWIDTH - Selects the width of the lines in # pixels (default: 16) -# CONFIG_EXAMPLES_NXLINES_LINECOLOR -- The color of the lines drawn in the -# background window. Default depends on CONFIG_EXAMPLES_NXLINES_BPP. +# CONFIG_EXAMPLES_NXLINES_LINECOLOR -- The color of the central lines drawn +# in the background window. Default depends on CONFIG_EXAMPLES_NXLINES_BPP +# (there really is no meaningful default). +# CONFIG_EXAMPLES_NXLINES_BORDERWIDTH -- The width of the circular border +# drawn in the background window. (default: 4). +# CONFIG_EXAMPLES_NXLINES_BORDERCOLOR -- The color of the circular border +# drawn in the background window. Default depends on CONFIG_EXAMPLES_NXLINES_BPP +# (there really is no meaningful default). +# CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR -- The color of the circular region +# filled in the background window. Default depends on CONFIG_EXAMPLES_NXLINES_BPP +# (there really is no meaningful default). # CONFIG_EXAMPLES_NXLINES_BPP -- Pixels per pixel to use. Valid options # include 2, 4, 8, 16, 24, and 32. Default is 16. # CONFIG_EXAMPLES_NXLINES_EXTERNINIT - The driver for the graphics device on @@ -1172,6 +1181,9 @@ CONFIG_EXAMPLES_NXLINES_DEVNO=0 CONFIG_EXAMPLES_NXLINES_BGCOLOR=0x0320 CONFIG_EXAMPLES_NXLINES_LINEWIDTH=16 CONFIG_EXAMPLES_NXLINES_LINECOLOR=0xffe0 +CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=4 +CONFIG_EXAMPLES_NXLINES_BORDERCOLOR=0xffe0 +CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR=0xf7bb CONFIG_EXAMPLES_NXLINES_BPP=16 CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n diff --git a/configs/stm3210e-eval/nxtext/defconfig b/configs/stm3210e-eval/nxtext/defconfig index dc66b0fa8b..d48637a1b6 100644 --- a/configs/stm3210e-eval/nxtext/defconfig +++ b/configs/stm3210e-eval/nxtext/defconfig @@ -1156,8 +1156,17 @@ CONFIG_EXAMPLES_NXIMAGE_EXTERNINIT=n # depends on CONFIG_EXAMPLES_NXLINES_BPP. # CONFIG_EXAMPLES_NXLINES_LINEWIDTH - Selects the width of the lines in # pixels (default: 16) -# CONFIG_EXAMPLES_NXLINES_LINECOLOR -- The color of the lines drawn in the -# background window. Default depends on CONFIG_EXAMPLES_NXLINES_BPP. +# CONFIG_EXAMPLES_NXLINES_LINECOLOR -- The color of the central lines drawn +# in the background window. Default depends on CONFIG_EXAMPLES_NXLINES_BPP +# (there really is no meaningful default). +# CONFIG_EXAMPLES_NXLINES_BORDERWIDTH -- The width of the circular border +# drawn in the background window. (default: 4). +# CONFIG_EXAMPLES_NXLINES_BORDERCOLOR -- The color of the circular border +# drawn in the background window. Default depends on CONFIG_EXAMPLES_NXLINES_BPP +# (there really is no meaningful default). +# CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR -- The color of the circular region +# filled in the background window. Default depends on CONFIG_EXAMPLES_NXLINES_BPP +# (there really is no meaningful default). # CONFIG_EXAMPLES_NXLINES_BPP -- Pixels per pixel to use. Valid options # include 2, 4, 8, 16, 24, and 32. Default is 16. # CONFIG_EXAMPLES_NXLINES_EXTERNINIT - The driver for the graphics device on @@ -1172,6 +1181,9 @@ CONFIG_EXAMPLES_NXLINES_DEVNO=0 CONFIG_EXAMPLES_NXLINES_BGCOLOR=0x0320 CONFIG_EXAMPLES_NXLINES_LINEWIDTH=16 CONFIG_EXAMPLES_NXLINES_LINECOLOR=0xffe0 +CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=4 +CONFIG_EXAMPLES_NXLINES_BORDERCOLOR=0xffe0 +CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR=0xf7bb CONFIG_EXAMPLES_NXLINES_BPP=16 CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n diff --git a/graphics/nxglib/nxglib_circlepts.c b/graphics/nxglib/nxglib_circlepts.c index 46ebe32911..a6d59280d7 100644 --- a/graphics/nxglib/nxglib_circlepts.c +++ b/graphics/nxglib/nxglib_circlepts.c @@ -116,7 +116,7 @@ * ****************************************************************************/ -void nxgl_circlepts(FAR struct nxgl_point_s *center, nxgl_coord_t radius, +void nxgl_circlepts(FAR const struct nxgl_point_s *center, nxgl_coord_t radius, FAR struct nxgl_point_s *circle) { nxgl_coord_t xoffs; diff --git a/graphics/nxglib/nxglib_circletraps.c b/graphics/nxglib/nxglib_circletraps.c index 9c9a93cec9..7c2cd1d7b5 100644 --- a/graphics/nxglib/nxglib_circletraps.c +++ b/graphics/nxglib/nxglib_circletraps.c @@ -95,7 +95,7 @@ * ****************************************************************************/ -void nxgl_circletraps(FAR struct nxgl_point_s *center, nxgl_coord_t radius, +void nxgl_circletraps(FAR const struct nxgl_point_s *center, nxgl_coord_t radius, FAR struct nxgl_trapezoid_s *circle) { nxgl_coord_t xoffs; @@ -103,11 +103,11 @@ void nxgl_circletraps(FAR struct nxgl_point_s *center, nxgl_coord_t radius, circle[0].top.x1 = itob16(center->x); circle[0].top.x2 = circle[0].top.x1; - circle[0].top.y = center->y + radius; + circle[0].top.y = center->y - radius; circle[7].bot.x1 = circle[0].top.x1; circle[7].bot.x2 = circle[0].top.x1; - circle[7].bot.y = center->y - radius; + circle[7].bot.y = center->y + radius; circle[3].bot.x1 = itob16(center->x - radius); circle[3].bot.x2 = itob16(center->x + radius); @@ -124,7 +124,7 @@ void nxgl_circletraps(FAR struct nxgl_point_s *center, nxgl_coord_t radius, circle[2].bot.x1 = itob16(center->x - xoffs); circle[2].bot.x2 = itob16(center->x + xoffs); - circle[2].bot.y = center->y + yoffs; + circle[2].bot.y = center->y - yoffs; circle[3].top.x1 = circle[2].bot.x1; circle[3].top.x2 = circle[2].bot.x2; @@ -132,7 +132,7 @@ void nxgl_circletraps(FAR struct nxgl_point_s *center, nxgl_coord_t radius, circle[4].bot.x1 = circle[2].bot.x1; circle[4].bot.x2 = circle[2].bot.x2; - circle[4].bot.y = center->y - yoffs; + circle[4].bot.y = center->y + yoffs; circle[5].top.x1 = circle[4].bot.x1; circle[5].top.x2 = circle[4].bot.x2; @@ -140,7 +140,7 @@ void nxgl_circletraps(FAR struct nxgl_point_s *center, nxgl_coord_t radius, circle[0].bot.x1 = itob16(center->x - yoffs); circle[0].bot.x2 = itob16(center->x + yoffs); - circle[0].bot.y = center->y + xoffs; + circle[0].bot.y = center->y - xoffs; circle[1].top.x1 = circle[0].bot.x1; circle[1].top.x2 = circle[0].bot.x2; @@ -148,7 +148,7 @@ void nxgl_circletraps(FAR struct nxgl_point_s *center, nxgl_coord_t radius, circle[6].bot.x1 = circle[1].top.x1; circle[6].bot.x2 = circle[1].top.x2; - circle[6].bot.y = center->y - xoffs; + circle[6].bot.y = center->y + xoffs; circle[7].top.x1 = circle[6].bot.x1; circle[7].top.x2 = circle[6].bot.x2; @@ -160,7 +160,7 @@ void nxgl_circletraps(FAR struct nxgl_point_s *center, nxgl_coord_t radius, circle[1].bot.x1 = itob16(center->x - xoffs); circle[1].bot.x2 = itob16(center->x + xoffs); - circle[1].bot.y = center->y + xoffs; + circle[1].bot.y = center->y - xoffs; circle[2].top.x1 = circle[1].bot.x1; circle[2].top.x2 = circle[1].bot.x2; @@ -168,7 +168,7 @@ void nxgl_circletraps(FAR struct nxgl_point_s *center, nxgl_coord_t radius, circle[5].bot.x1 = circle[1].bot.x1; circle[5].bot.x2 = circle[1].bot.x2; - circle[5].bot.y = center->y - xoffs; + circle[5].bot.y = center->y + xoffs; circle[6].top.x1 = circle[5].bot.x1; circle[6].top.x2 = circle[5].bot.x2; diff --git a/graphics/nxmu/nx_drawcircle.c b/graphics/nxmu/nx_drawcircle.c index 5403ee9ef7..5a0780e1a0 100644 --- a/graphics/nxmu/nx_drawcircle.c +++ b/graphics/nxmu/nx_drawcircle.c @@ -107,7 +107,7 @@ * ****************************************************************************/ -int nx_drawcircle(NXWINDOW hwnd, FAR struct nxgl_point_s *center, +int nx_drawcircle(NXWINDOW hwnd, FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_coord_t width, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]) { diff --git a/graphics/nxmu/nx_fillcircle.c b/graphics/nxmu/nx_fillcircle.c index dc4115782a..bfc1dc9e39 100644 --- a/graphics/nxmu/nx_fillcircle.c +++ b/graphics/nxmu/nx_fillcircle.c @@ -89,7 +89,7 @@ * ****************************************************************************/ -int nx_fillcircle(NXWINDOW hwnd, FAR struct nxgl_point_s *center, +int nx_fillcircle(NXWINDOW hwnd, FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]) { FAR struct nxgl_trapezoid_s traps[NCIRCLE_TRAPS]; diff --git a/graphics/nxsu/nx_drawcircle.c b/graphics/nxsu/nx_drawcircle.c index 741886bc88..8d5c124549 100644 --- a/graphics/nxsu/nx_drawcircle.c +++ b/graphics/nxsu/nx_drawcircle.c @@ -107,7 +107,7 @@ * ****************************************************************************/ -int nx_drawcircle(NXWINDOW hwnd, FAR struct nxgl_point_s *center, +int nx_drawcircle(NXWINDOW hwnd, FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_coord_t width, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]) { diff --git a/graphics/nxsu/nx_fillcircle.c b/graphics/nxsu/nx_fillcircle.c index 9a89c332e4..12c47f80a1 100644 --- a/graphics/nxsu/nx_fillcircle.c +++ b/graphics/nxsu/nx_fillcircle.c @@ -89,7 +89,7 @@ * ****************************************************************************/ -int nx_fillcircle(NXWINDOW hwnd, FAR struct nxgl_point_s *center, +int nx_fillcircle(NXWINDOW hwnd, FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]) { FAR struct nxgl_trapezoid_s traps[NCIRCLE_TRAPS]; diff --git a/graphics/nxtk/nxtk_drawcircletoolbar.c b/graphics/nxtk/nxtk_drawcircletoolbar.c index 558b3413b3..e9d9ca8ffb 100644 --- a/graphics/nxtk/nxtk_drawcircletoolbar.c +++ b/graphics/nxtk/nxtk_drawcircletoolbar.c @@ -107,7 +107,7 @@ * ****************************************************************************/ -int nxtk_drawcircletoolbar(NXTKWINDOW hfwnd, FAR struct nxgl_point_s *center, +int nxtk_drawcircletoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_coord_t width, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]) { diff --git a/graphics/nxtk/nxtk_drawcirclewindow.c b/graphics/nxtk/nxtk_drawcirclewindow.c index d4bd79a301..f70c1c3515 100644 --- a/graphics/nxtk/nxtk_drawcirclewindow.c +++ b/graphics/nxtk/nxtk_drawcirclewindow.c @@ -107,7 +107,7 @@ * ****************************************************************************/ -int nxtk_drawcirclewindow(NXTKWINDOW hfwnd, FAR struct nxgl_point_s *center, +int nxtk_drawcirclewindow(NXTKWINDOW hfwnd, FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_coord_t width, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]) { diff --git a/graphics/nxtk/nxtk_fillcircletoolbar.c b/graphics/nxtk/nxtk_fillcircletoolbar.c index d2e7e5ecbe..d0bb09edd2 100644 --- a/graphics/nxtk/nxtk_fillcircletoolbar.c +++ b/graphics/nxtk/nxtk_fillcircletoolbar.c @@ -89,7 +89,7 @@ * ****************************************************************************/ -int nxtk_fillcircletoolbar(NXWINDOW hfwnd, FAR struct nxgl_point_s *center, +int nxtk_fillcircletoolbar(NXWINDOW hfwnd, FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]) { diff --git a/graphics/nxtk/nxtk_fillcirclewindow.c b/graphics/nxtk/nxtk_fillcirclewindow.c index 4fc7fef644..34c9458650 100644 --- a/graphics/nxtk/nxtk_fillcirclewindow.c +++ b/graphics/nxtk/nxtk_fillcirclewindow.c @@ -89,7 +89,7 @@ * ****************************************************************************/ -int nxtk_fillcirclewindow(NXWINDOW hfwnd, FAR struct nxgl_point_s *center, +int nxtk_fillcirclewindow(NXWINDOW hfwnd, FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]) { diff --git a/include/nuttx/nx/nx.h b/include/nuttx/nx/nx.h index 6912d5552f..1c705e5aa4 100644 --- a/include/nuttx/nx/nx.h +++ b/include/nuttx/nx/nx.h @@ -651,7 +651,7 @@ EXTERN int nx_drawline(NXWINDOW hwnd, FAR struct nxgl_vector_s *vector, * ****************************************************************************/ -EXTERN int nx_drawcircle(NXWINDOW hwnd, FAR struct nxgl_point_s *center, +EXTERN int nx_drawcircle(NXWINDOW hwnd, FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_coord_t width, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); @@ -672,7 +672,7 @@ EXTERN int nx_drawcircle(NXWINDOW hwnd, FAR struct nxgl_point_s *center, * ****************************************************************************/ -EXTERN int nx_fillcircle(NXWINDOW hwnd, FAR struct nxgl_point_s *center, +EXTERN int nx_fillcircle(NXWINDOW hwnd, FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); diff --git a/include/nuttx/nx/nxglib.h b/include/nuttx/nx/nxglib.h index 06c9eb383a..95b33772bd 100644 --- a/include/nuttx/nx/nxglib.h +++ b/include/nuttx/nx/nxglib.h @@ -650,7 +650,7 @@ EXTERN int nxgl_splitline(FAR struct nxgl_vector_s *vector, * ****************************************************************************/ -EXTERN void nxgl_circlepts(FAR struct nxgl_point_s *center, +EXTERN void nxgl_circlepts(FAR const struct nxgl_point_s *center, nxgl_coord_t radius, FAR struct nxgl_point_s *circle); @@ -672,7 +672,7 @@ EXTERN void nxgl_circlepts(FAR struct nxgl_point_s *center, * ****************************************************************************/ -EXTERN void nxgl_circletraps(FAR struct nxgl_point_s *center, +EXTERN void nxgl_circletraps(FAR const struct nxgl_point_s *center, nxgl_coord_t radius, FAR struct nxgl_trapezoid_s *circle); diff --git a/include/nuttx/nx/nxtk.h b/include/nuttx/nx/nxtk.h index 6a288c37a8..0e066359af 100644 --- a/include/nuttx/nx/nxtk.h +++ b/include/nuttx/nx/nxtk.h @@ -283,7 +283,7 @@ EXTERN int nxtk_drawlinewindow(NXTKWINDOW hfwnd, ****************************************************************************/ EXTERN int nxtk_drawcirclewindow(NXTKWINDOW hfwnd, - FAR struct nxgl_point_s *center, + FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_coord_t width, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); @@ -305,7 +305,7 @@ EXTERN int nxtk_drawcirclewindow(NXTKWINDOW hfwnd, ****************************************************************************/ EXTERN int nxtk_fillcirclewindow(NXWINDOW hfwnd, - FAR struct nxgl_point_s *center, + FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); @@ -478,7 +478,7 @@ EXTERN int nxtk_drawlinetoolbar(NXTKWINDOW hfwnd, ****************************************************************************/ EXTERN int nxtk_drawcircletoolbar(NXTKWINDOW hfwnd, - FAR struct nxgl_point_s *center, + FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_coord_t width, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); @@ -500,7 +500,7 @@ EXTERN int nxtk_drawcircletoolbar(NXTKWINDOW hfwnd, ****************************************************************************/ EXTERN int nxtk_fillcircletoolbar(NXWINDOW hfwnd, - FAR struct nxgl_point_s *center, + FAR const struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]);