microui  4.1.0
microui
ui_drawing_stub.h
1 /*
2  * Copyright 2023-2024 MicroEJ Corp. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be found with this software.
4  */
5 
6 #ifndef UI_DRAWING_STUB_H
7 #define UI_DRAWING_STUB_H
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 /*
13  * @file
14  * @brief Implementation of all drawing functions of ui_drawing.h (MicroUI and Drawing libraries).
15  * These are stubbed implementations, there is no error but the drawings are not performed. Useful to
16  * stub a drawing on a custom destination (custom GraphicsContext format not supported by the Graphics
17  * Engine).
18  * @author MicroEJ Developer Team
19  * @version 4.1.0
20  */
21 
22 // --------------------------------------------------------------------------------
23 // Includes
24 // --------------------------------------------------------------------------------
25 
26 #include "ui_drawing.h"
27 
28 // --------------------------------------------------------------------------------
29 // Public API
30 // --------------------------------------------------------------------------------
31 
32 /*
33  * @brief Stubbed implementation of writePixel. See ui_drawing.h
34  */
35 DRAWING_Status UI_DRAWING_STUB_writePixel(MICROUI_GraphicsContext *gc, jint x, jint y);
36 
37 /*
38  * @brief Stubbed implementation of drawLine. See ui_drawing.h
39  */
40 DRAWING_Status UI_DRAWING_STUB_drawLine(MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX, jint endY);
41 
42 /*
43  * @brief Stubbed implementation of drawHorizontalLine. See ui_drawing.h
44  */
45 DRAWING_Status UI_DRAWING_STUB_drawHorizontalLine(MICROUI_GraphicsContext *gc, jint x1, jint x2, jint y);
46 
47 /*
48  * @brief Stubbed implementation of drawVerticalLine. See ui_drawing.h
49  */
50 DRAWING_Status UI_DRAWING_STUB_drawVerticalLine(MICROUI_GraphicsContext *gc, jint x, jint y1, jint y2);
51 
52 /*
53  * @brief Stubbed implementation of drawRectangle. See ui_drawing.h
54  */
55 DRAWING_Status UI_DRAWING_STUB_drawRectangle(MICROUI_GraphicsContext *gc, jint x1, jint y1, jint x2, jint y2);
56 
57 /*
58  * @brief Stubbed implementation of fillRectangle. See ui_drawing.h
59  */
60 DRAWING_Status UI_DRAWING_STUB_fillRectangle(MICROUI_GraphicsContext *gc, jint x1, jint y1, jint x2, jint y2);
61 
62 /*
63  * @brief Stubbed implementation of drawRoundedRectangle. See ui_drawing.h
64  */
65 DRAWING_Status UI_DRAWING_STUB_drawRoundedRectangle(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
66  jint height, jint cornerEllipseWidth, jint cornerEllipseHeight);
67 
68 /*
69  * @brief Stubbed implementation of fillRoundedRectangle. See ui_drawing.h
70  */
71 DRAWING_Status UI_DRAWING_STUB_fillRoundedRectangle(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
72  jint height, jint cornerEllipseWidth, jint cornerEllipseHeight);
73 
74 /*
75  * @brief Stubbed implementation of drawCircleArc. See ui_drawing.h
76  */
77 DRAWING_Status UI_DRAWING_STUB_drawCircleArc(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
78  jfloat startAngle, jfloat arcAngle);
79 
80 /*
81  * @brief Stubbed implementation of drawEllipseArc. See ui_drawing.h
82  */
83 DRAWING_Status UI_DRAWING_STUB_drawEllipseArc(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height,
84  jfloat startAngle, jfloat arcAngle);
85 
86 /*
87  * @brief Stubbed implementation of fillCircleArc. See ui_drawing.h
88  */
89 DRAWING_Status UI_DRAWING_STUB_fillCircleArc(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
90  jfloat startAngle, jfloat arcAngle);
91 
92 /*
93  * @brief Stubbed implementation of fillEllipseArc. See ui_drawing.h
94  */
95 DRAWING_Status UI_DRAWING_STUB_fillEllipseArc(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height,
96  jfloat startAngle, jfloat arcAngle);
97 
98 /*
99  * @brief Stubbed implementation of drawEllipse. See ui_drawing.h
100  */
101 DRAWING_Status UI_DRAWING_STUB_drawEllipse(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height);
102 
103 /*
104  * @brief Stubbed implementation of fillEllipse. See ui_drawing.h
105  */
106 DRAWING_Status UI_DRAWING_STUB_fillEllipse(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height);
107 
108 /*
109  * @brief Stubbed implementation of drawCircle. See ui_drawing.h
110  */
111 DRAWING_Status UI_DRAWING_STUB_drawCircle(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter);
112 
113 /*
114  * @brief Stubbed implementation of fillCircle. See ui_drawing.h
115  */
116 DRAWING_Status UI_DRAWING_STUB_fillCircle(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter);
117 
118 /*
119  * @brief Stubbed implementation of drawImage. See ui_drawing.h
120  */
121 DRAWING_Status UI_DRAWING_STUB_drawImage(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX, jint regionY,
122  jint width, jint height, jint x, jint y, jint alpha);
123 
124 /*
125  * @brief Stubbed implementation of copyImage. See ui_drawing.h
126  */
127 DRAWING_Status UI_DRAWING_STUB_copyImage(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX, jint regionY,
128  jint width, jint height, jint x, jint y);
129 
130 /*
131  * @brief Stubbed implementation of drawRegion. See ui_drawing.h
132  */
133 DRAWING_Status UI_DRAWING_STUB_drawRegion(MICROUI_GraphicsContext *gc, jint regionX, jint regionY, jint width,
134  jint height, jint x, jint y, jint alpha);
135 
136 /*
137  * @brief Stubbed implementation of drawThickFadedPoint. See ui_drawing.h
138  */
139 DRAWING_Status UI_DRAWING_STUB_drawThickFadedPoint(MICROUI_GraphicsContext *gc, jint x, jint y, jint thickness,
140  jint fade);
141 
142 /*
143  * @brief Stubbed implementation of drawThickFadedLine. See ui_drawing.h
144  */
145 DRAWING_Status UI_DRAWING_STUB_drawThickFadedLine(MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX,
146  jint endY, jint thickness, jint fade, DRAWING_Cap startCap,
147  DRAWING_Cap endCap);
148 
149 /*
150  * @brief Stubbed implementation of drawThickFadedCircle. See ui_drawing.h
151  */
152 DRAWING_Status UI_DRAWING_STUB_drawThickFadedCircle(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
153  jint thickness, jint fade);
154 
155 /*
156  * @brief Stubbed implementation of drawThickFadedCircleArc. See ui_drawing.h
157  */
158 DRAWING_Status UI_DRAWING_STUB_drawThickFadedCircleArc(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
159  jfloat startAngle, jfloat arcAngle, jint thickness, jint fade,
160  DRAWING_Cap start, DRAWING_Cap end);
161 
162 /*
163  * @brief Stubbed implementation of drawThickFadedEllipse. See ui_drawing.h
164  */
165 DRAWING_Status UI_DRAWING_STUB_drawThickFadedEllipse(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
166  jint height, jint thickness, jint fade);
167 
168 /*
169  * @brief Stubbed implementation of drawThickLine. See ui_drawing.h
170  */
171 DRAWING_Status UI_DRAWING_STUB_drawThickLine(MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX,
172  jint endY, jint thickness);
173 
174 /*
175  * @brief Stubbed implementation of drawThickCircle. See ui_drawing.h
176  */
177 DRAWING_Status UI_DRAWING_STUB_drawThickCircle(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
178  jint thickness);
179 
180 /*
181  * @brief Stubbed implementation of drawThickEllipse. See ui_drawing.h
182  */
183 DRAWING_Status UI_DRAWING_STUB_drawThickEllipse(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height,
184  jint thickness);
185 
186 /*
187  * @brief Stubbed implementation of drawThickCircleArc. See ui_drawing.h
188  */
189 DRAWING_Status UI_DRAWING_STUB_drawThickCircleArc(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
190  jfloat startAngle, jfloat arcAngle, jint thickness);
191 
192 /*
193  * @brief Stubbed implementation of drawFlippedImage. See ui_drawing.h
194  */
195 DRAWING_Status UI_DRAWING_STUB_drawFlippedImage(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
196  jint regionY, jint width, jint height, jint x, jint y,
197  DRAWING_Flip transformation, jint alpha);
198 
199 /*
200  * @brief Stubbed implementation of drawRotatedImageNearestNeighbor. See ui_drawing.h
201  */
202 DRAWING_Status UI_DRAWING_STUB_drawRotatedImageNearestNeighbor(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x,
203  jint y, jint rotationX, jint rotationY, jfloat angle,
204  jint alpha);
205 
206 /*
207  * @brief Stubbed implementation of drawRotatedImageBilinear. See ui_drawing.h
208  */
209 DRAWING_Status UI_DRAWING_STUB_drawRotatedImageBilinear(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x, jint y,
210  jint rotationX, jint rotationY, jfloat angle, jint alpha);
211 
212 /*
213  * @brief Stubbed implementation of drawScaledImageNearestNeighbor. See ui_drawing.h
214  */
215 DRAWING_Status UI_DRAWING_STUB_drawScaledImageNearestNeighbor(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x,
216  jint y, jfloat factorX, jfloat factorY, jint alpha);
217 
218 /*
219  * @brief Stubbed implementation of drawScaledImageBilinear. See ui_drawing.h
220  */
221 DRAWING_Status UI_DRAWING_STUB_drawScaledImageBilinear(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x, jint y,
222  jfloat factorX, jfloat factorY, jint alpha);
223 
224 // --------------------------------------------------------------------------------
225 // EOF
226 // --------------------------------------------------------------------------------
227 
228 #ifdef __cplusplus
229 }
230 #endif
231 #endif // UI_DRAWING_STUB_H