microui  4.1.0
microui
ui_drawing.c
1 /*
2  * C
3  *
4  * Copyright 2023-2024 MicroEJ Corp. All rights reserved.
5  * Use of this source code is governed by a BSD-style license that can be found with this software.
6  */
7 
8 /*
9  * @file
10  * @brief Redirection of all MicroUI and Drawing libraries drawing functions. This file
11  * is required (must be compiled in the C project) but should not be modified (except when
12  * the VEE port uses more than 3 destination formats, see below).
13  *
14  * According to the available number of destination formats, this file redirects all drawings
15  * to the Graphics Engine software algorithms or uses some tables to target the right drawer
16  * according to the destination format.
17  *
18  * When only one destination format is available and no hardware acceleration (GPU) is
19  * available, the C compiler must just include this file. The default weak implementations
20  * call the Graphics Engine sofware algorithms.
21  *
22  * When only one destination format is available and a hardware acceleration (GPU) is
23  * available, a custom implementation over the GPU must override a set of these default
24  * weak implementations (function UI_DRAWING_xxx()). This allows to override only a set
25  * of functions which are GPU compatible.
26  *
27  * When several destination formats are available, this file uses some tables to target
28  * the right drawer. Each drawer (that targets a specific destination format) has to
29  * specify the table index and has to override a maximum of drawing functions. When a
30  * function is not overridden for a given destination format, the default weak implementation
31  * is used. This implementation uses the stub implementation.
32  *
33  * The BSP should specify the define "LLUI_GC_SUPPORTED_FORMATS". When not set or smaller than
34  * "2", this file considers only one destination format is available: the same format than
35  * the buffer of the display.
36  *
37  * When this define is "2" or "3", this file uses the tables indirections. The format "0" is
38  * reserved for the display buffer format (and for the GraphicsContext that uses the same
39  * format). The formats "1" and "2" are specific to the VEE Port.
40  *
41  * This file does not manages more than 3 destination formats ("0" == display buffer format
42  * and custom formats "1" and "2"). However the file can be easily modified to target more
43  * than 3 destination formats. See format "2" support and apply same patterns to add the
44  * format "3".
45  *
46  * @author MicroEJ Developer Team
47  * @version 4.1.0
48  * @see ui_drawing.h
49  */
50 
51 // -----------------------------------------------------------------------------
52 // Includes
53 // -----------------------------------------------------------------------------
54 
55 #include <LLUI_DISPLAY.h>
56 
57 #include "ui_drawing.h"
58 #include "ui_drawing_stub.h"
59 #include "ui_drawing_soft.h"
60 #include "dw_drawing_soft.h"
61 #include "ui_image_drawing.h"
62 #include "bsp_util.h"
63 
64 // --------------------------------------------------------------------------------
65 // Defines
66 // --------------------------------------------------------------------------------
67 
68 #if !defined(LLUI_GC_SUPPORTED_FORMATS) || (LLUI_GC_SUPPORTED_FORMATS <= 1)
69 
70 /*
71  * The functions UI_DRAWING_DEFAULT_xxx() are directly called by LLUI_DISPLAY_impl.c,
72  * LLUI_PAINTER_impl.c and LLDW_PAINTER_impl.c. Other files can override each weak
73  * function independently to use a GPU.
74  */
75 
76 #define UI_DRAWING_DEFAULT_writePixel UI_DRAWING_writePixel
77 #define UI_DRAWING_DEFAULT_drawLine UI_DRAWING_drawLine
78 #define UI_DRAWING_DEFAULT_drawHorizontalLine UI_DRAWING_drawHorizontalLine
79 #define UI_DRAWING_DEFAULT_drawVerticalLine UI_DRAWING_drawVerticalLine
80 #define UI_DRAWING_DEFAULT_drawRectangle UI_DRAWING_drawRectangle
81 #define UI_DRAWING_DEFAULT_fillRectangle UI_DRAWING_fillRectangle
82 #define UI_DRAWING_DEFAULT_drawRoundedRectangle UI_DRAWING_drawRoundedRectangle
83 #define UI_DRAWING_DEFAULT_fillRoundedRectangle UI_DRAWING_fillRoundedRectangle
84 #define UI_DRAWING_DEFAULT_drawCircleArc UI_DRAWING_drawCircleArc
85 #define UI_DRAWING_DEFAULT_drawEllipseArc UI_DRAWING_drawEllipseArc
86 #define UI_DRAWING_DEFAULT_fillCircleArc UI_DRAWING_fillCircleArc
87 #define UI_DRAWING_DEFAULT_fillEllipseArc UI_DRAWING_fillEllipseArc
88 #define UI_DRAWING_DEFAULT_drawEllipse UI_DRAWING_drawEllipse
89 #define UI_DRAWING_DEFAULT_fillEllipse UI_DRAWING_fillEllipse
90 #define UI_DRAWING_DEFAULT_drawCircle UI_DRAWING_drawCircle
91 #define UI_DRAWING_DEFAULT_fillCircle UI_DRAWING_fillCircle
92 #define UI_DRAWING_DEFAULT_drawImage UI_DRAWING_drawImage
93 #define UI_DRAWING_DEFAULT_copyImage UI_DRAWING_copyImage
94 #define UI_DRAWING_DEFAULT_drawRegion UI_DRAWING_drawRegion
95 
96 #define UI_DRAWING_DEFAULT_drawThickFadedPoint UI_DRAWING_drawThickFadedPoint
97 #define UI_DRAWING_DEFAULT_drawThickFadedLine UI_DRAWING_drawThickFadedLine
98 #define UI_DRAWING_DEFAULT_drawThickFadedCircle UI_DRAWING_drawThickFadedCircle
99 #define UI_DRAWING_DEFAULT_drawThickFadedCircleArc UI_DRAWING_drawThickFadedCircleArc
100 #define UI_DRAWING_DEFAULT_drawThickFadedEllipse UI_DRAWING_drawThickFadedEllipse
101 #define UI_DRAWING_DEFAULT_drawThickLine UI_DRAWING_drawThickLine
102 #define UI_DRAWING_DEFAULT_drawThickCircle UI_DRAWING_drawThickCircle
103 #define UI_DRAWING_DEFAULT_drawThickEllipse UI_DRAWING_drawThickEllipse
104 #define UI_DRAWING_DEFAULT_drawThickCircleArc UI_DRAWING_drawThickCircleArc
105 #define UI_DRAWING_DEFAULT_drawFlippedImage UI_DRAWING_drawFlippedImage
106 #define UI_DRAWING_DEFAULT_drawRotatedImageNearestNeighbor UI_DRAWING_drawRotatedImageNearestNeighbor
107 #define UI_DRAWING_DEFAULT_drawRotatedImageBilinear UI_DRAWING_drawRotatedImageBilinear
108 #define UI_DRAWING_DEFAULT_drawScaledImageNearestNeighbor UI_DRAWING_drawScaledImageNearestNeighbor
109 #define UI_DRAWING_DEFAULT_drawScaledImageBilinear UI_DRAWING_drawScaledImageBilinear
110 
111 #else // !defined(LLUI_GC_SUPPORTED_FORMATS) || (LLUI_GC_SUPPORTED_FORMATS <= 1)
112 
113 /*
114  * The functions UI_DRAWING_DEFAULT_xxx() are indirectly called through some tables.
115  * The functions have got the identifier "0" as suffix. Another file can override
116  * each weak function independently to use a GPU.
117  */
118 
119 #define UI_DRAWING_DEFAULT_writePixel UI_DRAWING_writePixel_0
120 #define UI_DRAWING_DEFAULT_drawLine UI_DRAWING_drawLine_0
121 #define UI_DRAWING_DEFAULT_drawHorizontalLine UI_DRAWING_drawHorizontalLine_0
122 #define UI_DRAWING_DEFAULT_drawVerticalLine UI_DRAWING_drawVerticalLine_0
123 #define UI_DRAWING_DEFAULT_drawRectangle UI_DRAWING_drawRectangle_0
124 #define UI_DRAWING_DEFAULT_fillRectangle UI_DRAWING_fillRectangle_0
125 #define UI_DRAWING_DEFAULT_drawRoundedRectangle UI_DRAWING_drawRoundedRectangle_0
126 #define UI_DRAWING_DEFAULT_fillRoundedRectangle UI_DRAWING_fillRoundedRectangle_0
127 #define UI_DRAWING_DEFAULT_drawCircleArc UI_DRAWING_drawCircleArc_0
128 #define UI_DRAWING_DEFAULT_drawEllipseArc UI_DRAWING_drawEllipseArc_0
129 #define UI_DRAWING_DEFAULT_fillCircleArc UI_DRAWING_fillCircleArc_0
130 #define UI_DRAWING_DEFAULT_fillEllipseArc UI_DRAWING_fillEllipseArc_0
131 #define UI_DRAWING_DEFAULT_drawEllipse UI_DRAWING_drawEllipse_0
132 #define UI_DRAWING_DEFAULT_fillEllipse UI_DRAWING_fillEllipse_0
133 #define UI_DRAWING_DEFAULT_drawCircle UI_DRAWING_drawCircle_0
134 #define UI_DRAWING_DEFAULT_fillCircle UI_DRAWING_fillCircle_0
135 #define UI_DRAWING_DEFAULT_drawImage UI_DRAWING_drawImage_0
136 #define UI_DRAWING_DEFAULT_copyImage UI_DRAWING_copyImage_0
137 #define UI_DRAWING_DEFAULT_drawRegion UI_DRAWING_drawRegion_0
138 
139 #define UI_DRAWING_DEFAULT_drawThickFadedPoint UI_DRAWING_drawThickFadedPoint_0
140 #define UI_DRAWING_DEFAULT_drawThickFadedLine UI_DRAWING_drawThickFadedLine_0
141 #define UI_DRAWING_DEFAULT_drawThickFadedCircle UI_DRAWING_drawThickFadedCircle_0
142 #define UI_DRAWING_DEFAULT_drawThickFadedCircleArc UI_DRAWING_drawThickFadedCircleArc_0
143 #define UI_DRAWING_DEFAULT_drawThickFadedEllipse UI_DRAWING_drawThickFadedEllipse_0
144 #define UI_DRAWING_DEFAULT_drawThickLine UI_DRAWING_drawThickLine_0
145 #define UI_DRAWING_DEFAULT_drawThickCircle UI_DRAWING_drawThickCircle_0
146 #define UI_DRAWING_DEFAULT_drawThickEllipse UI_DRAWING_drawThickEllipse_0
147 #define UI_DRAWING_DEFAULT_drawThickCircleArc UI_DRAWING_drawThickCircleArc_0
148 #define UI_DRAWING_DEFAULT_drawFlippedImage UI_DRAWING_drawFlippedImage_0
149 #define UI_DRAWING_DEFAULT_drawRotatedImageNearestNeighbor UI_DRAWING_drawRotatedImageNearestNeighbor_0
150 #define UI_DRAWING_DEFAULT_drawRotatedImageBilinear UI_DRAWING_drawRotatedImageBilinear_0
151 #define UI_DRAWING_DEFAULT_drawScaledImageNearestNeighbor UI_DRAWING_drawScaledImageNearestNeighbor_0
152 #define UI_DRAWING_DEFAULT_drawScaledImageBilinear UI_DRAWING_drawScaledImageBilinear_0
153 
154 #endif // !defined(LLUI_GC_SUPPORTED_FORMATS) || (LLUI_GC_SUPPORTED_FORMATS <= 1)
155 
156 // --------------------------------------------------------------------------------
157 // Extern functions
158 // --------------------------------------------------------------------------------
159 
160 #if defined(LLUI_GC_SUPPORTED_FORMATS) && (LLUI_GC_SUPPORTED_FORMATS > 1)
161 
162 /*
163  * @brief Set of drawing functions according to the index of the destination format in
164  * the drawing tables ("0", "1" or "2").
165  *
166  * These functions must be declared in other H files.
167  */
168 
169 #if (LLUI_GC_SUPPORTED_FORMATS > 3)
170 #error "Increase the number of following functions and update the next tables"
171 #endif
172 
173 extern DRAWING_Status UI_DRAWING_writePixel_0(MICROUI_GraphicsContext *gc, jint x, jint y);
174 extern DRAWING_Status UI_DRAWING_drawLine_0(MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX,
175  jint endY);
176 extern DRAWING_Status UI_DRAWING_drawHorizontalLine_0(MICROUI_GraphicsContext *gc, jint x1, jint x2, jint y);
177 extern DRAWING_Status UI_DRAWING_drawVerticalLine_0(MICROUI_GraphicsContext *gc, jint x, jint y1, jint y2);
178 extern DRAWING_Status UI_DRAWING_drawRectangle_0(MICROUI_GraphicsContext *gc, jint x1, jint y1, jint x2, jint y2);
179 extern DRAWING_Status UI_DRAWING_fillRectangle_0(MICROUI_GraphicsContext *gc, jint x1, jint y1, jint x2, jint y2);
180 extern DRAWING_Status UI_DRAWING_drawRoundedRectangle_0(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
181  jint height, jint cornerEllipseWidth, jint cornerEllipseHeight);
182 extern DRAWING_Status UI_DRAWING_fillRoundedRectangle_0(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
183  jint height, jint cornerEllipseWidth, jint cornerEllipseHeight);
184 extern DRAWING_Status UI_DRAWING_drawCircleArc_0(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
185  jfloat startAngle, jfloat arcAngle);
186 extern DRAWING_Status UI_DRAWING_drawEllipseArc_0(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height,
187  jfloat startAngle, jfloat arcAngle);
188 extern DRAWING_Status UI_DRAWING_fillCircleArc_0(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
189  jfloat startAngle, jfloat arcAngle);
190 extern DRAWING_Status UI_DRAWING_fillEllipseArc_0(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height,
191  jfloat startAngle, jfloat arcAngle);
192 extern DRAWING_Status UI_DRAWING_drawEllipse_0(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height);
193 extern DRAWING_Status UI_DRAWING_fillEllipse_0(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height);
194 extern DRAWING_Status UI_DRAWING_drawCircle_0(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter);
195 extern DRAWING_Status UI_DRAWING_fillCircle_0(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter);
196 extern DRAWING_Status UI_DRAWING_drawImage_0(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
197  jint regionY, jint width, jint height, jint x, jint y, jint alpha);
198 extern DRAWING_Status UI_DRAWING_copyImage_0(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
199  jint regionY, jint width, jint height, jint x, jint y);
200 extern DRAWING_Status UI_DRAWING_drawRegion_0(MICROUI_GraphicsContext *gc, jint regionX, jint regionY, jint width,
201  jint height, jint x, jint y, jint alpha);
202 extern DRAWING_Status UI_DRAWING_drawThickFadedPoint_0(MICROUI_GraphicsContext *gc, jint x, jint y, jint thickness,
203  jint fade);
204 extern DRAWING_Status UI_DRAWING_drawThickFadedLine_0(MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX,
205  jint endY, jint thickness, jint fade, DRAWING_Cap startCap,
206  DRAWING_Cap endCap);
207 extern DRAWING_Status UI_DRAWING_drawThickFadedCircle_0(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
208  jint thickness, jint fade);
209 extern DRAWING_Status UI_DRAWING_drawThickFadedCircleArc_0(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
210  jfloat startAngle, jfloat arcAngle, jint thickness,
211  jint fade, DRAWING_Cap start, DRAWING_Cap end);
212 extern DRAWING_Status UI_DRAWING_drawThickFadedEllipse_0(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
213  jint height, jint thickness, jint fade);
214 extern DRAWING_Status UI_DRAWING_drawThickLine_0(MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX,
215  jint endY, jint thickness);
216 extern DRAWING_Status UI_DRAWING_drawThickCircle_0(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
217  jint thickness);
218 extern DRAWING_Status UI_DRAWING_drawThickEllipse_0(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
219  jint height, jint thickness);
220 extern DRAWING_Status UI_DRAWING_drawThickCircleArc_0(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
221  jfloat startAngle, jfloat arcAngle, jint thickness);
222 extern DRAWING_Status UI_DRAWING_drawFlippedImage_0(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
223  jint regionY, jint width, jint height, jint x, jint y,
224  DRAWING_Flip transformation, jint alpha);
225 extern DRAWING_Status UI_DRAWING_drawRotatedImageNearestNeighbor_0(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
226  jint x, jint y, jint rotationX, jint rotationY,
227  jfloat angle, jint alpha);
228 extern DRAWING_Status UI_DRAWING_drawRotatedImageBilinear_0(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x,
229  jint y, jint rotationX, jint rotationY, jfloat angle,
230  jint alpha);
231 extern DRAWING_Status UI_DRAWING_drawScaledImageNearestNeighbor_0(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
232  jint x, jint y, jfloat factorX, jfloat factorY,
233  jint alpha);
234 extern DRAWING_Status UI_DRAWING_drawScaledImageBilinear_0(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x,
235  jint y, jfloat factorX, jfloat factorY, jint alpha);
236 
237 extern uint32_t UI_DRAWING_getNewImageStrideInBytes_1(jbyte image_format, uint32_t width, uint32_t height,
238  uint32_t default_stride);
239 extern void UI_DRAWING_adjustNewImageCharacteristics_1(jbyte image_format, uint32_t width, uint32_t height,
240  uint32_t *data_size, uint32_t *data_alignment);
241 extern void UI_DRAWING_initializeNewImage_1(MICROUI_Image *image);
242 extern void UI_DRAWING_freeImageResources_1(MICROUI_Image *image);
243 extern DRAWING_Status UI_DRAWING_writePixel_1(MICROUI_GraphicsContext *gc, jint x, jint y);
244 extern DRAWING_Status UI_DRAWING_drawLine_1(MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX,
245  jint endY);
246 extern DRAWING_Status UI_DRAWING_drawHorizontalLine_1(MICROUI_GraphicsContext *gc, jint x1, jint x2, jint y);
247 extern DRAWING_Status UI_DRAWING_drawVerticalLine_1(MICROUI_GraphicsContext *gc, jint x, jint y1, jint y2);
248 extern DRAWING_Status UI_DRAWING_drawRectangle_1(MICROUI_GraphicsContext *gc, jint x1, jint y1, jint x2, jint y2);
249 extern DRAWING_Status UI_DRAWING_fillRectangle_1(MICROUI_GraphicsContext *gc, jint x1, jint y1, jint x2, jint y2);
250 extern DRAWING_Status UI_DRAWING_drawRoundedRectangle_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
251  jint height, jint cornerEllipseWidth, jint cornerEllipseHeight);
252 extern DRAWING_Status UI_DRAWING_fillRoundedRectangle_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
253  jint height, jint cornerEllipseWidth, jint cornerEllipseHeight);
254 extern DRAWING_Status UI_DRAWING_drawCircleArc_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
255  jfloat startAngle, jfloat arcAngle);
256 extern DRAWING_Status UI_DRAWING_drawEllipseArc_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height,
257  jfloat startAngle, jfloat arcAngle);
258 extern DRAWING_Status UI_DRAWING_fillCircleArc_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
259  jfloat startAngle, jfloat arcAngle);
260 extern DRAWING_Status UI_DRAWING_fillEllipseArc_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height,
261  jfloat startAngle, jfloat arcAngle);
262 extern DRAWING_Status UI_DRAWING_drawEllipse_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height);
263 extern DRAWING_Status UI_DRAWING_fillEllipse_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height);
264 extern DRAWING_Status UI_DRAWING_drawCircle_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter);
265 extern DRAWING_Status UI_DRAWING_fillCircle_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter);
266 extern DRAWING_Status UI_DRAWING_drawImage_1(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
267  jint regionY, jint width, jint height, jint x, jint y, jint alpha);
268 extern DRAWING_Status UI_DRAWING_copyImage_1(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
269  jint regionY, jint width, jint height, jint x, jint y);
270 extern DRAWING_Status UI_DRAWING_drawRegion_1(MICROUI_GraphicsContext *gc, jint regionX, jint regionY, jint width,
271  jint height, jint x, jint y, jint alpha);
272 extern DRAWING_Status UI_DRAWING_drawThickFadedPoint_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint thickness,
273  jint fade);
274 extern DRAWING_Status UI_DRAWING_drawThickFadedLine_1(MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX,
275  jint endY, jint thickness, jint fade, DRAWING_Cap startCap,
276  DRAWING_Cap endCap);
277 extern DRAWING_Status UI_DRAWING_drawThickFadedCircle_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
278  jint thickness, jint fade);
279 extern DRAWING_Status UI_DRAWING_drawThickFadedCircleArc_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
280  jfloat startAngle, jfloat arcAngle, jint thickness,
281  jint fade, DRAWING_Cap start, DRAWING_Cap end);
282 extern DRAWING_Status UI_DRAWING_drawThickFadedEllipse_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
283  jint height, jint thickness, jint fade);
284 extern DRAWING_Status UI_DRAWING_drawThickLine_1(MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX,
285  jint endY, jint thickness);
286 extern DRAWING_Status UI_DRAWING_drawThickCircle_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
287  jint thickness);
288 extern DRAWING_Status UI_DRAWING_drawThickEllipse_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
289  jint height, jint thickness);
290 extern DRAWING_Status UI_DRAWING_drawThickCircleArc_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
291  jfloat startAngle, jfloat arcAngle, jint thickness);
292 extern DRAWING_Status UI_DRAWING_drawFlippedImage_1(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
293  jint regionY, jint width, jint height, jint x, jint y,
294  DRAWING_Flip transformation, jint alpha);
295 extern DRAWING_Status UI_DRAWING_drawRotatedImageNearestNeighbor_1(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
296  jint x, jint y, jint rotationX, jint rotationY,
297  jfloat angle, jint alpha);
298 extern DRAWING_Status UI_DRAWING_drawRotatedImageBilinear_1(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x,
299  jint y, jint rotationX, jint rotationY, jfloat angle,
300  jint alpha);
301 extern DRAWING_Status UI_DRAWING_drawScaledImageNearestNeighbor_1(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
302  jint x, jint y, jfloat factorX, jfloat factorY,
303  jint alpha);
304 extern DRAWING_Status UI_DRAWING_drawScaledImageBilinear_1(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x,
305  jint y, jfloat factorX, jfloat factorY, jint alpha);
306 
307 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
308 extern uint32_t UI_DRAWING_getNewImageStrideInBytes_2(jbyte image_format, uint32_t width, uint32_t height,
309  uint32_t default_stride);
310 extern void UI_DRAWING_adjustNewImageCharacteristics_2(jbyte image_format, uint32_t width, uint32_t height,
311  uint32_t *data_size, uint32_t *data_alignment);
312 extern void UI_DRAWING_initializeNewImage_2(MICROUI_Image *image);
313 extern void UI_DRAWING_freeImageResources_2(MICROUI_Image *image);
314 extern DRAWING_Status UI_DRAWING_writePixel_2(MICROUI_GraphicsContext *gc, jint x, jint y);
315 extern DRAWING_Status UI_DRAWING_drawLine_2(MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX,
316  jint endY);
317 extern DRAWING_Status UI_DRAWING_drawHorizontalLine_2(MICROUI_GraphicsContext *gc, jint x1, jint x2, jint y);
318 extern DRAWING_Status UI_DRAWING_drawVerticalLine_2(MICROUI_GraphicsContext *gc, jint x, jint y1, jint y2);
319 extern DRAWING_Status UI_DRAWING_drawRectangle_2(MICROUI_GraphicsContext *gc, jint x1, jint y1, jint x2, jint y2);
320 extern DRAWING_Status UI_DRAWING_fillRectangle_2(MICROUI_GraphicsContext *gc, jint x1, jint y1, jint x2, jint y2);
321 extern DRAWING_Status UI_DRAWING_drawRoundedRectangle_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
322  jint height, jint cornerEllipseWidth, jint cornerEllipseHeight);
323 extern DRAWING_Status UI_DRAWING_fillRoundedRectangle_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
324  jint height, jint cornerEllipseWidth, jint cornerEllipseHeight);
325 extern DRAWING_Status UI_DRAWING_drawCircleArc_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
326  jfloat startAngle, jfloat arcAngle);
327 extern DRAWING_Status UI_DRAWING_drawEllipseArc_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height,
328  jfloat startAngle, jfloat arcAngle);
329 extern DRAWING_Status UI_DRAWING_fillCircleArc_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
330  jfloat startAngle, jfloat arcAngle);
331 extern DRAWING_Status UI_DRAWING_fillEllipseArc_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height,
332  jfloat startAngle, jfloat arcAngle);
333 extern DRAWING_Status UI_DRAWING_drawEllipse_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height);
334 extern DRAWING_Status UI_DRAWING_fillEllipse_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height);
335 extern DRAWING_Status UI_DRAWING_drawCircle_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter);
336 extern DRAWING_Status UI_DRAWING_fillCircle_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter);
337 extern DRAWING_Status UI_DRAWING_drawImage_2(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
338  jint regionY, jint width, jint height, jint x, jint y, jint alpha);
339 extern DRAWING_Status UI_DRAWING_copyImage_2(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
340  jint regionY, jint width, jint height, jint x, jint y);
341 extern DRAWING_Status UI_DRAWING_drawRegion_2(MICROUI_GraphicsContext *gc, jint regionX, jint regionY, jint width,
342  jint height, jint x, jint y, jint alpha);
343 extern DRAWING_Status UI_DRAWING_drawThickFadedPoint_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint thickness,
344  jint fade);
345 extern DRAWING_Status UI_DRAWING_drawThickFadedLine_2(MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX,
346  jint endY, jint thickness, jint fade, DRAWING_Cap startCap,
347  DRAWING_Cap endCap);
348 extern DRAWING_Status UI_DRAWING_drawThickFadedCircle_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
349  jint thickness, jint fade);
350 extern DRAWING_Status UI_DRAWING_drawThickFadedCircleArc_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
351  jfloat startAngle, jfloat arcAngle, jint thickness,
352  jint fade, DRAWING_Cap start, DRAWING_Cap end);
353 extern DRAWING_Status UI_DRAWING_drawThickFadedEllipse_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
354  jint height, jint thickness, jint fade);
355 extern DRAWING_Status UI_DRAWING_drawThickLine_2(MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX,
356  jint endY, jint thickness);
357 extern DRAWING_Status UI_DRAWING_drawThickCircle_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
358  jint thickness);
359 extern DRAWING_Status UI_DRAWING_drawThickEllipse_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
360  jint height, jint thickness);
361 extern DRAWING_Status UI_DRAWING_drawThickCircleArc_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
362  jfloat startAngle, jfloat arcAngle, jint thickness);
363 extern DRAWING_Status UI_DRAWING_drawFlippedImage_2(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
364  jint regionY, jint width, jint height, jint x, jint y,
365  DRAWING_Flip transformation, jint alpha);
366 extern DRAWING_Status UI_DRAWING_drawRotatedImageNearestNeighbor_2(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
367  jint x, jint y, jint rotationX, jint rotationY,
368  jfloat angle, jint alpha);
369 extern DRAWING_Status UI_DRAWING_drawRotatedImageBilinear_2(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x,
370  jint y, jint rotationX, jint rotationY, jfloat angle,
371  jint alpha);
372 extern DRAWING_Status UI_DRAWING_drawScaledImageNearestNeighbor_2(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
373  jint x, jint y, jfloat factorX, jfloat factorY,
374  jint alpha);
375 extern DRAWING_Status UI_DRAWING_drawScaledImageBilinear_2(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x,
376  jint y, jfloat factorX, jfloat factorY, jint alpha);
377 #endif // (LLUI_GC_SUPPORTED_FORMATS > 2)
378 
379 #endif // defined(LLUI_GC_SUPPORTED_FORMATS) && (LLUI_GC_SUPPORTED_FORMATS > 1)
380 
381 // --------------------------------------------------------------------------------
382 // Typedef of drawing functions
383 // --------------------------------------------------------------------------------
384 
385 #if defined(LLUI_GC_SUPPORTED_FORMATS) && (LLUI_GC_SUPPORTED_FORMATS > 1)
386 
387 /*
388  * @brief Typedef used by next tables. See the function comments in ui_drawing.h
389  */
390 
391 typedef uint32_t (* UI_DRAWING_getNewImageStrideInBytes_t) (jbyte image_format, uint32_t width, uint32_t height,
392  uint32_t default_stride);
393 typedef void (* UI_DRAWING_adjustNewImageCharacteristics_t) (jbyte image_format, uint32_t width, uint32_t height,
394  uint32_t *data_size, uint32_t *data_alignment);
395 typedef void (* UI_DRAWING_initializeNewImage_t) (MICROUI_Image *image);
396 typedef void (* UI_DRAWING_freeImageResources_t) (MICROUI_Image *image);
397 typedef DRAWING_Status (* UI_DRAWING_writePixel_t) (MICROUI_GraphicsContext *gc, jint x, jint y);
398 typedef DRAWING_Status (* UI_DRAWING_drawLine_t) (MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX,
399  jint endY);
400 typedef DRAWING_Status (* UI_DRAWING_drawHorizontalLine_t) (MICROUI_GraphicsContext *gc, jint x1, jint x2, jint y);
401 typedef DRAWING_Status (* UI_DRAWING_drawVerticalLine_t) (MICROUI_GraphicsContext *gc, jint x, jint y1, jint y2);
402 typedef DRAWING_Status (* UI_DRAWING_drawRectangle_t) (MICROUI_GraphicsContext *gc, jint x1, jint y1, jint x2, jint y2);
403 typedef DRAWING_Status (* UI_DRAWING_fillRectangle_t) (MICROUI_GraphicsContext *gc, jint x1, jint y1, jint x2, jint y2);
404 typedef DRAWING_Status (* UI_DRAWING_drawRoundedRectangle_t) (MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
405  jint height, jint cornerEllipseWidth,
406  jint cornerEllipseHeight);
407 typedef DRAWING_Status (* UI_DRAWING_fillRoundedRectangle_t) (MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
408  jint height, jint cornerEllipseWidth,
409  jint cornerEllipseHeight);
410 typedef DRAWING_Status (* UI_DRAWING_drawCircleArc_t) (MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
411  jfloat startAngle, jfloat arcAngle);
412 typedef DRAWING_Status (* UI_DRAWING_drawEllipseArc_t) (MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
413  jint height, jfloat startAngle, jfloat arcAngle);
414 typedef DRAWING_Status (* UI_DRAWING_fillCircleArc_t) (MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
415  jfloat startAngle, jfloat arcAngle);
416 typedef DRAWING_Status (* UI_DRAWING_fillEllipseArc_t) (MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
417  jint height, jfloat startAngle, jfloat arcAngle);
418 typedef DRAWING_Status (* UI_DRAWING_drawEllipse_t) (MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
419  jint height);
420 typedef DRAWING_Status (* UI_DRAWING_fillEllipse_t) (MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
421  jint height);
422 typedef DRAWING_Status (* UI_DRAWING_drawCircle_t) (MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter);
423 typedef DRAWING_Status (* UI_DRAWING_fillCircle_t) (MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter);
424 typedef DRAWING_Status (* UI_DRAWING_drawImage_t) (MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
425  jint regionY, jint width, jint height, jint x, jint y, jint alpha);
426 typedef DRAWING_Status (* UI_DRAWING_copyImage_t) (MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
427  jint regionY, jint width, jint height, jint x, jint y);
428 typedef DRAWING_Status (* UI_DRAWING_drawRegion_t) (MICROUI_GraphicsContext *gc, jint regionX, jint regionY, jint width,
429  jint height, jint x, jint y, jint alpha);
430 typedef DRAWING_Status (* UI_DRAWING_drawThickFadedPoint_t) (MICROUI_GraphicsContext *gc, jint x, jint y,
431  jint thickness, jint fade);
432 typedef DRAWING_Status (* UI_DRAWING_drawThickFadedLine_t) (MICROUI_GraphicsContext *gc, jint startX, jint startY,
433  jint endX, jint endY, jint thickness, jint fade,
434  DRAWING_Cap startCap, DRAWING_Cap endCap);
435 typedef DRAWING_Status (* UI_DRAWING_drawThickFadedCircle_t) (MICROUI_GraphicsContext *gc, jint x, jint y,
436  jint diameter, jint thickness, jint fade);
437 typedef DRAWING_Status (* UI_DRAWING_drawThickFadedCircleArc_t) (MICROUI_GraphicsContext *gc, jint x, jint y,
438  jint diameter, jfloat startAngle, jfloat arcAngle,
439  jint thickness, jint fade, DRAWING_Cap start,
440  DRAWING_Cap end);
441 typedef DRAWING_Status (* UI_DRAWING_drawThickFadedEllipse_t) (MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
442  jint height, jint thickness, jint fade);
443 typedef DRAWING_Status (* UI_DRAWING_drawThickLine_t) (MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX,
444  jint endY, jint thickness);
445 typedef DRAWING_Status (* UI_DRAWING_drawThickCircle_t) (MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
446  jint thickness);
447 typedef DRAWING_Status (* UI_DRAWING_drawThickEllipse_t) (MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
448  jint height, jint thickness);
449 typedef DRAWING_Status (* UI_DRAWING_drawThickCircleArc_t) (MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
450  jfloat startAngle, jfloat arcAngle, jint thickness);
451 typedef DRAWING_Status (* UI_DRAWING_drawFlippedImage_t) (MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
452  jint regionY, jint width, jint height, jint x, jint y,
453  DRAWING_Flip transformation, jint alpha);
454 typedef DRAWING_Status (* UI_DRAWING_drawRotatedImageNearestNeighbor_t) (MICROUI_GraphicsContext *gc,
455  MICROUI_Image *img, jint x, jint y,
456  jint rotationX, jint rotationY, jfloat angle,
457  jint alpha);
458 typedef DRAWING_Status (* UI_DRAWING_drawRotatedImageBilinear_t) (MICROUI_GraphicsContext *gc, MICROUI_Image *img,
459  jint x, jint y, jint rotationX, jint rotationY,
460  jfloat angle, jint alpha);
461 typedef DRAWING_Status (* UI_DRAWING_drawScaledImageNearestNeighbor_t) (MICROUI_GraphicsContext *gc, MICROUI_Image *img,
462  jint x, jint y, jfloat factorX, jfloat factorY,
463  jint alpha);
464 typedef DRAWING_Status (* UI_DRAWING_drawScaledImageBilinear_t) (MICROUI_GraphicsContext *gc, MICROUI_Image *img,
465  jint x, jint y, jfloat factorX, jfloat factorY,
466  jint alpha);
467 
468 #endif // #if defined(LLUI_GC_SUPPORTED_FORMATS) && (LLUI_GC_SUPPORTED_FORMATS > 1)
469 
470 // --------------------------------------------------------------------------------
471 // Tables according to the destination format.
472 // --------------------------------------------------------------------------------
473 
474 #if defined(LLUI_GC_SUPPORTED_FORMATS) && (LLUI_GC_SUPPORTED_FORMATS > 1)
475 
476 static const UI_DRAWING_getNewImageStrideInBytes_t UI_DRAWER_getNewImageStrideInBytes[] = {
477  &UI_DRAWING_getNewImageStrideInBytes,
478  &UI_DRAWING_getNewImageStrideInBytes_1,
479 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
480  &UI_DRAWING_getNewImageStrideInBytes_2,
481 #endif
482 };
483 
484 static const UI_DRAWING_adjustNewImageCharacteristics_t UI_DRAWER_adjustNewImageCharacteristics[] = {
485  &UI_DRAWING_adjustNewImageCharacteristics,
486  &UI_DRAWING_adjustNewImageCharacteristics_1,
487 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
488  &UI_DRAWING_adjustNewImageCharacteristics_2,
489 #endif
490 };
491 
492 static const UI_DRAWING_initializeNewImage_t UI_DRAWER_initializeNewImage[] = {
493  &UI_DRAWING_initializeNewImage,
494  &UI_DRAWING_initializeNewImage_1,
495 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
496  &UI_DRAWING_initializeNewImage_2,
497 #endif
498 };
499 
500 static const UI_DRAWING_freeImageResources_t UI_DRAWER_freeImageResources[] = {
501  &UI_DRAWING_freeImageResources,
502  &UI_DRAWING_freeImageResources_1,
503 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
504  &UI_DRAWING_freeImageResources_2,
505 #endif
506 };
507 
508 static const UI_DRAWING_writePixel_t UI_DRAWER_writePixel[] = {
509  &UI_DRAWING_writePixel_0,
510  &UI_DRAWING_writePixel_1,
511 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
512  &UI_DRAWING_writePixel_2,
513 #endif
514 };
515 
516 static const UI_DRAWING_drawLine_t UI_DRAWER_drawLine[] = {
517  &UI_DRAWING_drawLine_0,
518  &UI_DRAWING_drawLine_1,
519 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
520  &UI_DRAWING_drawLine_2,
521 #endif
522 };
523 
524 static const UI_DRAWING_drawHorizontalLine_t UI_DRAWER_drawHorizontalLine[] = {
525  &UI_DRAWING_drawHorizontalLine_0,
526  &UI_DRAWING_drawHorizontalLine_1,
527 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
528  &UI_DRAWING_drawHorizontalLine_2,
529 #endif
530 };
531 
532 static const UI_DRAWING_drawVerticalLine_t UI_DRAWER_drawVerticalLine[] = {
533  &UI_DRAWING_drawVerticalLine_0,
534  &UI_DRAWING_drawVerticalLine_1,
535 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
536  &UI_DRAWING_drawVerticalLine_2,
537 #endif
538 };
539 
540 static const UI_DRAWING_drawRectangle_t UI_DRAWER_drawRectangle[] = {
541  &UI_DRAWING_drawRectangle_0,
542  &UI_DRAWING_drawRectangle_1,
543 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
544  &UI_DRAWING_drawRectangle_2,
545 #endif
546 };
547 
548 static const UI_DRAWING_fillRectangle_t UI_DRAWER_fillRectangle[] = {
549  &UI_DRAWING_fillRectangle_0,
550  &UI_DRAWING_fillRectangle_1,
551 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
552  &UI_DRAWING_fillRectangle_2,
553 #endif
554 };
555 
556 static const UI_DRAWING_drawRoundedRectangle_t UI_DRAWER_drawRoundedRectangle[] = {
557  &UI_DRAWING_drawRoundedRectangle_0,
558  &UI_DRAWING_drawRoundedRectangle_1,
559 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
560  &UI_DRAWING_drawRoundedRectangle_2,
561 #endif
562 };
563 
564 static const UI_DRAWING_fillRoundedRectangle_t UI_DRAWER_fillRoundedRectangle[] = {
565  &UI_DRAWING_fillRoundedRectangle_0,
566  &UI_DRAWING_fillRoundedRectangle_1,
567 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
568  &UI_DRAWING_fillRoundedRectangle_2,
569 #endif
570 };
571 
572 static const UI_DRAWING_drawCircleArc_t UI_DRAWER_drawCircleArc[] = {
573  &UI_DRAWING_drawCircleArc_0,
574  &UI_DRAWING_drawCircleArc_1,
575 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
576  &UI_DRAWING_drawCircleArc_2,
577 #endif
578 };
579 
580 static const UI_DRAWING_drawEllipseArc_t UI_DRAWER_drawEllipseArc[] = {
581  &UI_DRAWING_drawEllipseArc_0,
582  &UI_DRAWING_drawEllipseArc_1,
583 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
584  &UI_DRAWING_drawEllipseArc_2,
585 #endif
586 };
587 
588 static const UI_DRAWING_fillCircleArc_t UI_DRAWER_fillCircleArc[] = {
589  &UI_DRAWING_fillCircleArc_0,
590  &UI_DRAWING_fillCircleArc_1,
591 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
592  &UI_DRAWING_fillCircleArc_2,
593 #endif
594 };
595 
596 static const UI_DRAWING_fillEllipseArc_t UI_DRAWER_fillEllipseArc[] = {
597  &UI_DRAWING_fillEllipseArc_0,
598  &UI_DRAWING_fillEllipseArc_1,
599 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
600  &UI_DRAWING_fillEllipseArc_2,
601 #endif
602 };
603 
604 static const UI_DRAWING_drawEllipse_t UI_DRAWER_drawEllipse[] = {
605  &UI_DRAWING_drawEllipse_0,
606  &UI_DRAWING_drawEllipse_1,
607 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
608  &UI_DRAWING_drawEllipse_2,
609 #endif
610 };
611 
612 static const UI_DRAWING_fillEllipse_t UI_DRAWER_fillEllipse[] = {
613  &UI_DRAWING_fillEllipse_0,
614  &UI_DRAWING_fillEllipse_1,
615 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
616  &UI_DRAWING_fillEllipse_2,
617 #endif
618 };
619 
620 static const UI_DRAWING_drawCircle_t UI_DRAWER_drawCircle[] = {
621  &UI_DRAWING_drawCircle_0,
622  &UI_DRAWING_drawCircle_1,
623 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
624  &UI_DRAWING_drawCircle_2,
625 #endif
626 };
627 
628 static const UI_DRAWING_fillCircle_t UI_DRAWER_fillCircle[] = {
629  &UI_DRAWING_fillCircle_0,
630  &UI_DRAWING_fillCircle_1,
631 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
632  &UI_DRAWING_fillCircle_2,
633 #endif
634 };
635 
636 static const UI_DRAWING_drawImage_t UI_DRAWER_drawImage[] = {
637  &UI_DRAWING_drawImage_0,
638  &UI_DRAWING_drawImage_1,
639 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
640  &UI_DRAWING_drawImage_2,
641 #endif
642 };
643 
644 static const UI_DRAWING_copyImage_t UI_DRAWER_copyImage[] = {
645  &UI_DRAWING_copyImage_0,
646  &UI_DRAWING_copyImage_1,
647 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
648  &UI_DRAWING_copyImage_2,
649 #endif
650 };
651 
652 static const UI_DRAWING_drawRegion_t UI_DRAWER_drawRegion[] = {
653  &UI_DRAWING_drawRegion_0,
654  &UI_DRAWING_drawRegion_1,
655 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
656  &UI_DRAWING_drawRegion_2,
657 #endif
658 };
659 
660 static const UI_DRAWING_drawThickFadedPoint_t UI_DRAWER_drawThickFadedPoint[] = {
661  &UI_DRAWING_drawThickFadedPoint_0,
662  &UI_DRAWING_drawThickFadedPoint_1,
663 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
664  &UI_DRAWING_drawThickFadedPoint_2,
665 #endif
666 };
667 
668 static const UI_DRAWING_drawThickFadedLine_t UI_DRAWER_drawThickFadedLine[] = {
669  &UI_DRAWING_drawThickFadedLine_0,
670  &UI_DRAWING_drawThickFadedLine_1,
671 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
672  &UI_DRAWING_drawThickFadedLine_2,
673 #endif
674 };
675 
676 static const UI_DRAWING_drawThickFadedCircle_t UI_DRAWER_drawThickFadedCircle[] = {
677  &UI_DRAWING_drawThickFadedCircle_0,
678  &UI_DRAWING_drawThickFadedCircle_1,
679 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
680  &UI_DRAWING_drawThickFadedCircle_2,
681 #endif
682 };
683 
684 static const UI_DRAWING_drawThickFadedCircleArc_t UI_DRAWER_drawThickFadedCircleArc[] = {
685  &UI_DRAWING_drawThickFadedCircleArc_0,
686  &UI_DRAWING_drawThickFadedCircleArc_1,
687 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
688  &UI_DRAWING_drawThickFadedCircleArc_2,
689 #endif
690 };
691 
692 static const UI_DRAWING_drawThickFadedEllipse_t UI_DRAWER_drawThickFadedEllipse[] = {
693  &UI_DRAWING_drawThickFadedEllipse_0,
694  &UI_DRAWING_drawThickFadedEllipse_1,
695 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
696  &UI_DRAWING_drawThickFadedEllipse_2,
697 #endif
698 };
699 
700 static const UI_DRAWING_drawThickLine_t UI_DRAWER_drawThickLine[] = {
701  &UI_DRAWING_drawThickLine_0,
702  &UI_DRAWING_drawThickLine_1,
703 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
704  &UI_DRAWING_drawThickLine_2,
705 #endif
706 };
707 
708 static const UI_DRAWING_drawThickCircle_t UI_DRAWER_drawThickCircle[] = {
709  &UI_DRAWING_drawThickCircle_0,
710  &UI_DRAWING_drawThickCircle_1,
711 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
712  &UI_DRAWING_drawThickCircle_2,
713 #endif
714 };
715 
716 static const UI_DRAWING_drawThickEllipse_t UI_DRAWER_drawThickEllipse[] = {
717  &UI_DRAWING_drawThickEllipse_0,
718  &UI_DRAWING_drawThickEllipse_1,
719 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
720  &UI_DRAWING_drawThickEllipse_2,
721 #endif
722 };
723 
724 static const UI_DRAWING_drawThickCircleArc_t UI_DRAWER_drawThickCircleArc[] = {
725  &UI_DRAWING_drawThickCircleArc_0,
726  &UI_DRAWING_drawThickCircleArc_1,
727 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
728  &UI_DRAWING_drawThickCircleArc_2,
729 #endif
730 };
731 
732 static const UI_DRAWING_drawFlippedImage_t UI_DRAWER_drawFlippedImage[] = {
733  &UI_DRAWING_drawFlippedImage_0,
734  &UI_DRAWING_drawFlippedImage_1,
735 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
736  &UI_DRAWING_drawFlippedImage_2,
737 #endif
738 };
739 
740 static const UI_DRAWING_drawRotatedImageNearestNeighbor_t UI_DRAWER_drawRotatedImageNearestNeighbor[] = {
741  &UI_DRAWING_drawRotatedImageNearestNeighbor_0,
742  &UI_DRAWING_drawRotatedImageNearestNeighbor_1,
743 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
744  &UI_DRAWING_drawRotatedImageNearestNeighbor_2,
745 #endif
746 };
747 
748 static const UI_DRAWING_drawRotatedImageBilinear_t UI_DRAWER_drawRotatedImageBilinear[] = {
749  &UI_DRAWING_drawRotatedImageBilinear_0,
750  &UI_DRAWING_drawRotatedImageBilinear_1,
751 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
752  &UI_DRAWING_drawRotatedImageBilinear_2,
753 #endif
754 };
755 
756 static const UI_DRAWING_drawScaledImageNearestNeighbor_t UI_DRAWER_drawScaledImageNearestNeighbor[] = {
757  &UI_DRAWING_drawScaledImageNearestNeighbor_0,
758  &UI_DRAWING_drawScaledImageNearestNeighbor_1,
759 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
760  &UI_DRAWING_drawScaledImageNearestNeighbor_2,
761 #endif
762 };
763 
764 static const UI_DRAWING_drawScaledImageBilinear_t UI_DRAWER_drawScaledImageBilinear[] = {
765  &UI_DRAWING_drawScaledImageBilinear_0,
766  &UI_DRAWING_drawScaledImageBilinear_1,
767 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
768  &UI_DRAWING_drawScaledImageBilinear_2,
769 #endif
770 };
771 
772 #endif // defined(LLUI_GC_SUPPORTED_FORMATS) && (LLUI_GC_SUPPORTED_FORMATS > 1)
773 
774 // --------------------------------------------------------------------------------
775 // LLUI_DISPLAY_impl.h functions that depend on image format
776 // (the functions are redirected to ui_drawing.h)
777 // --------------------------------------------------------------------------------
778 
779 #if !defined(LLUI_GC_SUPPORTED_FORMATS) || (LLUI_GC_SUPPORTED_FORMATS <= 1)
780 
781 /*
782  * The VEE port supports only one destination format: the display buffer format. The
783  * application mutable images have the same format as the display buffer.
784  */
785 
786 // See the header file for the function documentation
787 int32_t LLUI_DISPLAY_IMPL_getDrawerIdentifier(jbyte image_format) {
788  return LLUI_DISPLAY_isDisplayFormat(image_format) ? 0 /* no error */ : -1 /* means invalid */;
789 }
790 
791 // See the header file for the function documentation
792 uint32_t LLUI_DISPLAY_IMPL_getNewImageStrideInBytes(jbyte image_format, uint32_t width, uint32_t height,
793  uint32_t default_stride) {
794  // just make an indirection (useful for multi destination formats)
795  return UI_DRAWING_getNewImageStrideInBytes(image_format, width, height, default_stride);
796 }
797 
798 // See the header file for the function documentation
799 void LLUI_DISPLAY_IMPL_adjustNewImageCharacteristics(jbyte image_format, uint32_t width, uint32_t height,
800  uint32_t *data_size, uint32_t *data_alignment) {
801  // just make an indirection (useful for multi destination formats)
802  UI_DRAWING_adjustNewImageCharacteristics(image_format, width, height, data_size, data_alignment);
803 }
804 
805 // See the header file for the function documentation
806 void LLUI_DISPLAY_IMPL_initializeNewImage(MICROUI_Image *image) {
807  // just make an indirection (useful for multi destination formats)
808  UI_DRAWING_initializeNewImage(image);
809 }
810 
811 // See the header file for the function documentation
812 void LLUI_DISPLAY_IMPL_freeImageResources(MICROUI_Image *image) {
813  // just make an indirection (useful for multi destination formats)
814  UI_DRAWING_freeImageResources(image);
815 }
816 
817 #else // #if !defined(LLUI_GC_SUPPORTED_FORMATS) || (LLUI_GC_SUPPORTED_FORMATS <= 1)
818 
819 /*
820  * The VEE port supports several destination formats. All drawing functions use a
821  * dedicated table to redirect to the right implementation. The VEE Port must implement
822  * the functions UI_DRAWING_is_drawer_X() to identify the right drawer according to
823  * the destination format.
824  *
825  * The "DEFAULT" functions (see below) are used as element "0" of the tables (this is the
826  * display buffer format).
827  */
828 
829 int32_t LLUI_DISPLAY_IMPL_getDrawerIdentifier(jbyte image_format) {
830  int32_t index;
831 
832  if (LLUI_DISPLAY_isDisplayFormat(image_format)) {
833  index = 0;
834  } else if (UI_DRAWING_is_drawer_1(image_format)) {
835  index = 1;
836 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
837  } else if (UI_DRAWING_is_drawer_2(image_format)) {
838  index = 2;
839 #endif
840  } else {
841  // unknown format
842  index = -1;
843  }
844 
845  return index;
846 }
847 
848 /*
849  * @brief See the header file for the function documentation
850  *
851  * Implementation details: The new image to create is an immutable image or a mutable image.
852  *
853  * - If it is a mutable image, that means a drawer is able to draw into it (see
854  * LLUI_DISPLAY_IMPL_getDrawerIdentifier()). In this case, this function redirects the
855  * implementation to the drawer (that should be able to adjust image characteristics if
856  * required).
857  *
858  * - If it is an immutable image (PNG decoder, automatic image format convert, etc.), that
859  * means (most of the time) no drawer can manage this image format. In such case, this function
860  * redirects the implementation to the default implementation (the indirection table
861  * UI_DRAWER_getNewImageStrideInBytes points to the default function at index 0).
862  *
863  * - In the case a drawer is available for this new immutable image, this function redirects
864  * to the drawer.
865  */
866 uint32_t LLUI_DISPLAY_IMPL_getNewImageStrideInBytes(jbyte image_format, uint32_t width, uint32_t height,
867  uint32_t default_stride) {
868  int32_t drawer = LLUI_DISPLAY_IMPL_getDrawerIdentifier(image_format);
869  drawer = (drawer >= 0) ? drawer : 0;
870  return (*UI_DRAWER_getNewImageStrideInBytes[drawer])(image_format, width, height, default_stride);
871 }
872 
873 // See the header file foar the function documentation and implementation of
874 // LLUI_DISPLAY_IMPL_getNewImageStrideInBytes
875 void LLUI_DISPLAY_IMPL_adjustNewImageCharacteristics(jbyte image_format, uint32_t width, uint32_t height,
876  uint32_t *data_size, uint32_t *data_alignment) {
877  int32_t drawer = LLUI_DISPLAY_IMPL_getDrawerIdentifier(image_format);
878  drawer = (drawer >= 0) ? drawer : 0;
879  (*UI_DRAWER_adjustNewImageCharacteristics[drawer])(image_format, width, height, data_size, data_alignment);
880 }
881 
882 // See the header file for the function documentation and implementation of
883 // LLUI_DISPLAY_IMPL_getNewImageStrideInBytes
884 void LLUI_DISPLAY_IMPL_initializeNewImage(MICROUI_Image *image) {
885  int32_t drawer = LLUI_DISPLAY_IMPL_getDrawerIdentifier(image->format);
886  drawer = (drawer >= 0) ? drawer : 0;
887  (*UI_DRAWER_initializeNewImage[drawer])(image);
888 }
889 
890 // See the header file for the function documentation and implementation of
891 // LLUI_DISPLAY_IMPL_getNewImageStrideInBytes
892 void LLUI_DISPLAY_IMPL_freeImageResources(MICROUI_Image *image) {
893  int32_t drawer = LLUI_DISPLAY_IMPL_getDrawerIdentifier(image->format);
894  drawer = (drawer >= 0) ? drawer : 0;
895  (*UI_DRAWER_freeImageResources[drawer])(image);
896 }
897 
898 #endif // #if !defined(LLUI_GC_SUPPORTED_FORMATS) || (LLUI_GC_SUPPORTED_FORMATS <= 1)
899 
900 // --------------------------------------------------------------------------------
901 // ui_drawing.h functions
902 // (the function names don't differ regardless of the available number of destination formats)
903 // --------------------------------------------------------------------------------
904 
905 // See the header file for the function documentation
906 BSP_DECLARE_WEAK_FCNT uint32_t UI_DRAWING_getNewImageStrideInBytes(jbyte image_format, uint32_t width, uint32_t height,
907  uint32_t default_stride) {
908  (void)image_format;
909  (void)width;
910  (void)height;
911  // no specific stride by default
912  return default_stride;
913 }
914 
915 // See the header file for the function documentation
916 BSP_DECLARE_WEAK_FCNT void UI_DRAWING_adjustNewImageCharacteristics(jbyte image_format, uint32_t width, uint32_t height,
917  uint32_t *data_size, uint32_t *data_alignment) {
918  (void)image_format;
919  (void)width;
920  (void)height;
921  (void)data_size;
922  (void)data_alignment;
923  // nothing to adjust by default
924 }
925 
926 // See the header file for the function documentation
927 BSP_DECLARE_WEAK_FCNT void UI_DRAWING_initializeNewImage(MICROUI_Image *image) {
928  (void)image;
929  // nothing to initialize by default
930 }
931 
932 // See the header file for the function documentation
933 BSP_DECLARE_WEAK_FCNT void UI_DRAWING_freeImageResources(MICROUI_Image *image) {
934  (void)image;
935  // nothing to initialize by default
936 }
937 
938 // --------------------------------------------------------------------------------
939 // ui_drawing.h functions
940 // (the function names differ according to the available number of destination formats)
941 // --------------------------------------------------------------------------------
942 
943 // See the header file for the function documentation
944 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_writePixel(MICROUI_GraphicsContext *gc, jint x, jint y) {
945  return UI_DRAWING_SOFT_writePixel(gc, x, y);
946 }
947 
948 // See the header file for the function documentation
949 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawLine(MICROUI_GraphicsContext *gc, jint startX, jint startY,
950  jint endX, jint endY) {
951  return UI_DRAWING_SOFT_drawLine(gc, startX, startY, endX, endY);
952 }
953 
954 // See the header file for the function documentation
955 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawHorizontalLine(MICROUI_GraphicsContext *gc, jint x1,
956  jint x2, jint y) {
957  return UI_DRAWING_SOFT_drawHorizontalLine(gc, x1, x2, y);
958 }
959 
960 // See the header file for the function documentation
961 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawVerticalLine(MICROUI_GraphicsContext *gc, jint x, jint y1,
962  jint y2) {
963  return UI_DRAWING_SOFT_drawVerticalLine(gc, x, y1, y2);
964 }
965 
966 // See the header file for the function documentation
967 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawRectangle(MICROUI_GraphicsContext *gc, jint x1, jint y1,
968  jint x2, jint y2) {
969  return UI_DRAWING_SOFT_drawRectangle(gc, x1, y1, x2, y2);
970 }
971 
972 // See the header file for the function documentation
973 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_fillRectangle(MICROUI_GraphicsContext *gc, jint x1, jint y1,
974  jint x2, jint y2) {
975  return UI_DRAWING_SOFT_fillRectangle(gc, x1, y1, x2, y2);
976 }
977 
978 // See the header file for the function documentation
979 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawRoundedRectangle(MICROUI_GraphicsContext *gc, jint x,
980  jint y, jint width, jint height,
981  jint cornerEllipseWidth,
982  jint cornerEllipseHeight) {
983  return UI_DRAWING_SOFT_drawRoundedRectangle(gc, x, y, width, height, cornerEllipseWidth, cornerEllipseHeight);
984 }
985 
986 // See the header file for the function documentation
987 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_fillRoundedRectangle(MICROUI_GraphicsContext *gc, jint x,
988  jint y, jint width, jint height,
989  jint cornerEllipseWidth,
990  jint cornerEllipseHeight) {
991  return UI_DRAWING_SOFT_fillRoundedRectangle(gc, x, y, width, height, cornerEllipseWidth, cornerEllipseHeight);
992 }
993 
994 // See the header file for the function documentation
995 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawCircleArc(MICROUI_GraphicsContext *gc, jint x, jint y,
996  jint diameter, jfloat startAngle,
997  jfloat arcAngle) {
998  return UI_DRAWING_SOFT_drawCircleArc(gc, x, y, diameter, startAngle, arcAngle);
999 }
1000 
1001 // See the header file for the function documentation
1002 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawEllipseArc(MICROUI_GraphicsContext *gc, jint x, jint y,
1003  jint width, jint height, jfloat startAngle,
1004  jfloat arcAngle) {
1005  return UI_DRAWING_SOFT_drawEllipseArc(gc, x, y, width, height, startAngle, arcAngle);
1006 }
1007 
1008 // See the header file for the function documentation
1009 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_fillCircleArc(MICROUI_GraphicsContext *gc, jint x, jint y,
1010  jint diameter, jfloat startAngle,
1011  jfloat arcAngle) {
1012  return UI_DRAWING_SOFT_fillCircleArc(gc, x, y, diameter, startAngle, arcAngle);
1013 }
1014 
1015 // See the header file for the function documentation
1016 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_fillEllipseArc(MICROUI_GraphicsContext *gc, jint x, jint y,
1017  jint width, jint height, jfloat startAngle,
1018  jfloat arcAngle) {
1019  return UI_DRAWING_SOFT_fillEllipseArc(gc, x, y, width, height, startAngle, arcAngle);
1020 }
1021 
1022 // See the header file for the function documentation
1023 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawEllipse(MICROUI_GraphicsContext *gc, jint x, jint y,
1024  jint width, jint height) {
1025  return UI_DRAWING_SOFT_drawEllipse(gc, x, y, width, height);
1026 }
1027 
1028 // See the header file for the function documentation
1029 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_fillEllipse(MICROUI_GraphicsContext *gc, jint x, jint y,
1030  jint width, jint height) {
1031  return UI_DRAWING_SOFT_fillEllipse(gc, x, y, width, height);
1032 }
1033 
1034 // See the header file for the function documentation
1035 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawCircle(MICROUI_GraphicsContext *gc, jint x, jint y,
1036  jint diameter) {
1037  return UI_DRAWING_SOFT_drawCircle(gc, x, y, diameter);
1038 }
1039 
1040 // See the header file for the function documentation
1041 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_fillCircle(MICROUI_GraphicsContext *gc, jint x, jint y,
1042  jint diameter) {
1043  return UI_DRAWING_SOFT_fillCircle(gc, x, y, diameter);
1044 }
1045 
1046 // See the header file for the function documentation
1047 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawImage(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
1048  jint regionX, jint regionY, jint width, jint height,
1049  jint x, jint y, jint alpha) {
1050 #if !defined(LLUI_IMAGE_CUSTOM_FORMATS)
1051  return UI_DRAWING_SOFT_drawImage(gc, img, regionX, regionY, width, height, x, y, alpha);
1052 #else
1053  return UI_IMAGE_DRAWING_draw(gc, img, regionX, regionY, width, height, x, y, alpha);
1054 #endif
1055 }
1056 
1057 // See the header file for the function documentation
1058 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_copyImage(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
1059  jint regionX, jint regionY, jint width, jint height,
1060  jint x, jint y) {
1061 #if !defined(LLUI_IMAGE_CUSTOM_FORMATS)
1062  return UI_DRAWING_SOFT_copyImage(gc, img, regionX, regionY, width, height, x, y);
1063 #else
1064  return UI_IMAGE_DRAWING_copy(gc, img, regionX, regionY, width, height, x, y);
1065 #endif
1066 }
1067 
1068 // See the header file for the function documentation
1069 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawRegion(MICROUI_GraphicsContext *gc, jint regionX,
1070  jint regionY, jint width, jint height, jint x,
1071  jint y, jint alpha) {
1072 #if !defined(LLUI_IMAGE_CUSTOM_FORMATS)
1073  return UI_DRAWING_SOFT_drawRegion(gc, regionX, regionY, width, height, x, y, alpha);
1074 #else
1075  return UI_IMAGE_DRAWING_drawRegion(gc, regionX, regionY, width, height, x, y, alpha);
1076 #endif
1077 }
1078 
1079 // See the header file for the function documentation
1080 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawThickFadedPoint(MICROUI_GraphicsContext *gc, jint x, jint y,
1081  jint thickness, jint fade) {
1082  return DW_DRAWING_SOFT_drawThickFadedPoint(gc, x, y, thickness, fade);
1083 }
1084 
1085 // See the header file for the function documentation
1086 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawThickFadedLine(MICROUI_GraphicsContext *gc, jint startX,
1087  jint startY, jint endX, jint endY,
1088  jint thickness, jint fade,
1089  DRAWING_Cap startCap, DRAWING_Cap endCap) {
1090  return DW_DRAWING_SOFT_drawThickFadedLine(gc, startX, startY, endX, endY, thickness, fade, startCap, endCap);
1091 }
1092 
1093 // See the header file for the function documentation
1094 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawThickFadedCircle(MICROUI_GraphicsContext *gc, jint x,
1095  jint y, jint diameter, jint thickness,
1096  jint fade) {
1097  return DW_DRAWING_SOFT_drawThickFadedCircle(gc, x, y, diameter, thickness, fade);
1098 }
1099 
1100 // See the header file for the function documentation
1101 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawThickFadedCircleArc(MICROUI_GraphicsContext *gc, jint x,
1102  jint y, jint diameter,
1103  jfloat startAngle, jfloat arcAngle,
1104  jint thickness, jint fade,
1105  DRAWING_Cap start, DRAWING_Cap end) {
1106  return DW_DRAWING_SOFT_drawThickFadedCircleArc(gc, x, y, diameter, startAngle, arcAngle, thickness, fade, start,
1107  end);
1108 }
1109 
1110 // See the header file for the function documentation
1111 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawThickFadedEllipse(MICROUI_GraphicsContext *gc, jint x,
1112  jint y, jint width, jint height,
1113  jint thickness, jint fade) {
1114  return DW_DRAWING_SOFT_drawThickFadedEllipse(gc, x, y, width, height, thickness, fade);
1115 }
1116 
1117 // See the header file for the function documentation
1118 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawThickLine(MICROUI_GraphicsContext *gc, jint startX,
1119  jint startY, jint endX, jint endY,
1120  jint thickness) {
1121  return DW_DRAWING_SOFT_drawThickLine(gc, startX, startY, endX, endY, thickness);
1122 }
1123 
1124 // See the header file for the function documentation
1125 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawThickCircle(MICROUI_GraphicsContext *gc, jint x, jint y,
1126  jint diameter, jint thickness) {
1127  return DW_DRAWING_SOFT_drawThickCircle(gc, x, y, diameter, thickness);
1128 }
1129 
1130 // See the header file for the function documentation
1131 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawThickEllipse(MICROUI_GraphicsContext *gc, jint x, jint y,
1132  jint width, jint height, jint thickness) {
1133  return DW_DRAWING_SOFT_drawThickEllipse(gc, x, y, width, height, thickness);
1134 }
1135 
1136 // See the header file for the function documentation
1137 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawThickCircleArc(MICROUI_GraphicsContext *gc, jint x, jint y,
1138  jint diameter, jfloat startAngle,
1139  jfloat arcAngle, jint thickness) {
1140  return DW_DRAWING_SOFT_drawThickCircleArc(gc, x, y, diameter, startAngle, arcAngle, thickness);
1141 }
1142 
1143 // See the header file for the function documentation
1144 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawFlippedImage(MICROUI_GraphicsContext *gc,
1145  MICROUI_Image *img, jint regionX, jint regionY,
1146  jint width, jint height, jint x, jint y,
1147  DRAWING_Flip transformation, jint alpha) {
1148 #if !defined(LLUI_IMAGE_CUSTOM_FORMATS)
1149  return DW_DRAWING_SOFT_drawFlippedImage(gc, img, regionX, regionY, width, height, x, y, transformation, alpha);
1150 #else
1151  return UI_IMAGE_DRAWING_drawFlipped(gc, img, regionX, regionY, width, height, x, y, transformation, alpha);
1152 #endif
1153 }
1154 
1155 // See the header file for the function documentation
1156 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawRotatedImageNearestNeighbor(MICROUI_GraphicsContext *gc,
1157  MICROUI_Image *img, jint x,
1158  jint y, jint rotationX,
1159  jint rotationY, jfloat angle,
1160  jint alpha) {
1161 #if !defined(LLUI_IMAGE_CUSTOM_FORMATS)
1162  return DW_DRAWING_SOFT_drawRotatedImageNearestNeighbor(gc, img, x, y, rotationX, rotationY, angle, alpha);
1163 #else
1164  return UI_IMAGE_DRAWING_drawRotatedNearestNeighbor(gc, img, x, y, rotationX, rotationY, angle, alpha);
1165 #endif
1166 }
1167 
1168 // See the header file for the function documentation
1169 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawRotatedImageBilinear(MICROUI_GraphicsContext *gc,
1170  MICROUI_Image *img, jint x, jint y,
1171  jint rotationX, jint rotationY,
1172  jfloat angle, jint alpha) {
1173 #if !defined(LLUI_IMAGE_CUSTOM_FORMATS)
1174  return DW_DRAWING_SOFT_drawRotatedImageBilinear(gc, img, x, y, rotationX, rotationY, angle, alpha);
1175 #else
1176  return UI_IMAGE_DRAWING_drawRotatedBilinear(gc, img, x, y, rotationX, rotationY, angle, alpha);
1177 #endif
1178 }
1179 
1180 // See the header file for the function documentation
1181 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawScaledImageNearestNeighbor(MICROUI_GraphicsContext *gc,
1182  MICROUI_Image *img, jint x,
1183  jint y, jfloat factorX,
1184  jfloat factorY, jint alpha) {
1185 #if !defined(LLUI_IMAGE_CUSTOM_FORMATS)
1186  return DW_DRAWING_SOFT_drawScaledImageNearestNeighbor(gc, img, x, y, factorX, factorY, alpha);
1187 #else
1188  return UI_IMAGE_DRAWING_drawScaledNearestNeighbor(gc, img, x, y, factorX, factorY, alpha);
1189 #endif
1190 }
1191 
1192 // See the header file for the function documentation
1193 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_DEFAULT_drawScaledImageBilinear(MICROUI_GraphicsContext *gc,
1194  MICROUI_Image *img, jint x, jint y,
1195  jfloat factorX, jfloat factorY,
1196  jint alpha) {
1197 #if !defined(LLUI_IMAGE_CUSTOM_FORMATS)
1198  return DW_DRAWING_SOFT_drawScaledImageBilinear(gc, img, x, y, factorX, factorY, alpha);
1199 #else
1200  return UI_IMAGE_DRAWING_drawScaledBilinear(gc, img, x, y, factorX, factorY, alpha);
1201 #endif
1202 }
1203 
1204 #if defined(LLUI_GC_SUPPORTED_FORMATS) && (LLUI_GC_SUPPORTED_FORMATS > 1)
1205 
1206 /*
1207  * The VEE port supports several destination formats. All drawing functions use a
1208  * dedicated table to redirect to the right implementation. The VEE Port must implement
1209  * the functions UI_DRAWING_is_drawer_X() to identify the right drawer according to
1210  * the destination format.
1211  *
1212  * The "DEFAULT" functions (see above) are used as element "0" of the tables (== display
1213  * buffer format).
1214  */
1215 
1216 // See the header file for the function documentation
1217 DRAWING_Status UI_DRAWING_writePixel(MICROUI_GraphicsContext *gc, jint x, jint y) {
1218  return (*UI_DRAWER_writePixel[gc->drawer])(gc, x, y);
1219 }
1220 
1221 // See the header file for the function documentation
1222 DRAWING_Status UI_DRAWING_drawLine(MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX, jint endY) {
1223  return (*UI_DRAWER_drawLine[gc->drawer])(gc, startX, startY, endX, endY);
1224 }
1225 
1226 // See the header file for the function documentation
1227 DRAWING_Status UI_DRAWING_drawHorizontalLine(MICROUI_GraphicsContext *gc, jint x1, jint x2, jint y) {
1228  return (*UI_DRAWER_drawHorizontalLine[gc->drawer])(gc, x1, x2, y);
1229 }
1230 
1231 // See the header file for the function documentation
1232 DRAWING_Status UI_DRAWING_drawVerticalLine(MICROUI_GraphicsContext *gc, jint x, jint y1, jint y2) {
1233  return (*UI_DRAWER_drawVerticalLine[gc->drawer])(gc, x, y1, y2);
1234 }
1235 
1236 // See the header file for the function documentation
1237 DRAWING_Status UI_DRAWING_drawRectangle(MICROUI_GraphicsContext *gc, jint x1, jint y1, jint x2, jint y2) {
1238  return (*UI_DRAWER_drawRectangle[gc->drawer])(gc, x1, y1, x2, y2);
1239 }
1240 
1241 // See the header file for the function documentation
1242 DRAWING_Status UI_DRAWING_fillRectangle(MICROUI_GraphicsContext *gc, jint x1, jint y1, jint x2, jint y2) {
1243  return (*UI_DRAWER_fillRectangle[gc->drawer])(gc, x1, y1, x2, y2);
1244 }
1245 
1246 // See the header file for the function documentation
1247 DRAWING_Status UI_DRAWING_drawRoundedRectangle(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height,
1248  jint cornerEllipseWidth, jint cornerEllipseHeight) {
1249  return (*UI_DRAWER_drawRoundedRectangle[gc->drawer])(gc, x, y, width, height, cornerEllipseWidth,
1250  cornerEllipseHeight);
1251 }
1252 
1253 // See the header file for the function documentation
1254 DRAWING_Status UI_DRAWING_fillRoundedRectangle(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height,
1255  jint cornerEllipseWidth, jint cornerEllipseHeight) {
1256  return (*UI_DRAWER_fillRoundedRectangle[gc->drawer])(gc, x, y, width, height, cornerEllipseWidth,
1257  cornerEllipseHeight);
1258 }
1259 
1260 // See the header file for the function documentation
1261 DRAWING_Status UI_DRAWING_drawCircleArc(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter, jfloat startAngle,
1262  jfloat arcAngle) {
1263  return (*UI_DRAWER_drawCircleArc[gc->drawer])(gc, x, y, diameter, startAngle, arcAngle);
1264 }
1265 
1266 // See the header file for the function documentation
1267 DRAWING_Status UI_DRAWING_drawEllipseArc(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height,
1268  jfloat startAngle, jfloat arcAngle) {
1269  return (*UI_DRAWER_drawEllipseArc[gc->drawer])(gc, x, y, width, height, startAngle, arcAngle);
1270 }
1271 
1272 // See the header file for the function documentation
1273 DRAWING_Status UI_DRAWING_fillCircleArc(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter, jfloat startAngle,
1274  jfloat arcAngle) {
1275  return (*UI_DRAWER_fillCircleArc[gc->drawer])(gc, x, y, diameter, startAngle, arcAngle);
1276 }
1277 
1278 // See the header file for the function documentation
1279 DRAWING_Status UI_DRAWING_fillEllipseArc(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height,
1280  jfloat startAngle, jfloat arcAngle) {
1281  return (*UI_DRAWER_fillEllipseArc[gc->drawer])(gc, x, y, width, height, startAngle, arcAngle);
1282 }
1283 
1284 // See the header file for the function documentation
1285 DRAWING_Status UI_DRAWING_drawEllipse(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height) {
1286  return (*UI_DRAWER_drawEllipse[gc->drawer])(gc, x, y, width, height);
1287 }
1288 
1289 // See the header file for the function documentation
1290 DRAWING_Status UI_DRAWING_fillEllipse(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height) {
1291  return (*UI_DRAWER_fillEllipse[gc->drawer])(gc, x, y, width, height);
1292 }
1293 
1294 // See the header file for the function documentation
1295 DRAWING_Status UI_DRAWING_drawCircle(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter) {
1296  return (*UI_DRAWER_drawCircle[gc->drawer])(gc, x, y, diameter);
1297 }
1298 
1299 // See the header file for the function documentation
1300 DRAWING_Status UI_DRAWING_fillCircle(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter) {
1301  return (*UI_DRAWER_fillCircle[gc->drawer])(gc, x, y, diameter);
1302 }
1303 
1304 // See the header file for the function documentation
1305 DRAWING_Status UI_DRAWING_drawImage(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX, jint regionY,
1306  jint width, jint height, jint x, jint y, jint alpha) {
1307  return (*UI_DRAWER_drawImage[gc->drawer])(gc, img, regionX, regionY, width, height, x, y, alpha);
1308 }
1309 
1310 // See the header file for the function documentation
1311 DRAWING_Status UI_DRAWING_copyImage(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX, jint regionY,
1312  jint width, jint height, jint x, jint y) {
1313  return (*UI_DRAWER_copyImage[gc->drawer])(gc, img, regionX, regionY, width, height, x, y);
1314 }
1315 
1316 // See the header file for the function documentation
1317 DRAWING_Status UI_DRAWING_drawRegion(MICROUI_GraphicsContext *gc, jint regionX, jint regionY, jint width, jint height,
1318  jint x, jint y, jint alpha) {
1319  return (*UI_DRAWER_drawRegion[gc->drawer])(gc, regionX, regionY, width, height, x, y, alpha);
1320 }
1321 
1322 // See the header file for the function documentation
1323 DRAWING_Status UI_DRAWING_drawThickFadedPoint(MICROUI_GraphicsContext *gc, jint x, jint y, jint thickness, jint fade) {
1324  return (*UI_DRAWER_drawThickFadedPoint[gc->drawer])(gc, x, y, thickness, fade);
1325 }
1326 
1327 // See the header file for the function documentation
1328 DRAWING_Status UI_DRAWING_drawThickFadedLine(MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX,
1329  jint endY, jint thickness, jint fade, DRAWING_Cap startCap,
1330  DRAWING_Cap endCap) {
1331  return (*UI_DRAWER_drawThickFadedLine[gc->drawer])(gc, startX, startY, endX, endY, thickness, fade, startCap,
1332  endCap);
1333 }
1334 
1335 // See the header file for the function documentation
1336 DRAWING_Status UI_DRAWING_drawThickFadedCircle(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
1337  jint thickness, jint fade) {
1338  return (*UI_DRAWER_drawThickFadedCircle[gc->drawer])(gc, x, y, diameter, thickness, fade);
1339 }
1340 
1341 // See the header file for the function documentation
1342 DRAWING_Status UI_DRAWING_drawThickFadedCircleArc(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
1343  jfloat startAngle, jfloat arcAngle, jint thickness, jint fade,
1344  DRAWING_Cap start, DRAWING_Cap end) {
1345  return (*UI_DRAWER_drawThickFadedCircleArc[gc->drawer])(gc, x, y, diameter, startAngle, arcAngle, thickness, fade,
1346  start, end);
1347 }
1348 
1349 // See the header file for the function documentation
1350 DRAWING_Status UI_DRAWING_drawThickFadedEllipse(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height,
1351  jint thickness, jint fade) {
1352  return (*UI_DRAWER_drawThickFadedEllipse[gc->drawer])(gc, x, y, width, height, thickness, fade);
1353 }
1354 
1355 // See the header file for the function documentation
1356 DRAWING_Status UI_DRAWING_drawThickLine(MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX, jint endY,
1357  jint thickness) {
1358  return (*UI_DRAWER_drawThickLine[gc->drawer])(gc, startX, startY, endX, endY, thickness);
1359 }
1360 
1361 // See the header file for the function documentation
1362 DRAWING_Status UI_DRAWING_drawThickCircle(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter, jint thickness) {
1363  return (*UI_DRAWER_drawThickCircle[gc->drawer])(gc, x, y, diameter, thickness);
1364 }
1365 
1366 // See the header file for the function documentation
1367 DRAWING_Status UI_DRAWING_drawThickEllipse(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height,
1368  jint thickness) {
1369  return (*UI_DRAWER_drawThickEllipse[gc->drawer])(gc, x, y, width, height, thickness);
1370 }
1371 
1372 // See the header file for the function documentation
1373 DRAWING_Status UI_DRAWING_drawThickCircleArc(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
1374  jfloat startAngle, jfloat arcAngle, jint thickness) {
1375  return (*UI_DRAWER_drawThickCircleArc[gc->drawer])(gc, x, y, diameter, startAngle, arcAngle, thickness);
1376 }
1377 
1378 // See the header file for the function documentation
1379 DRAWING_Status UI_DRAWING_drawFlippedImage(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX, jint regionY,
1380  jint width, jint height, jint x, jint y, DRAWING_Flip transformation,
1381  jint alpha) {
1382  return (*UI_DRAWER_drawFlippedImage[gc->drawer])(gc, img, regionX, regionY, width, height, x, y, transformation,
1383  alpha);
1384 }
1385 
1386 // See the header file for the function documentation
1387 DRAWING_Status UI_DRAWING_drawRotatedImageNearestNeighbor(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x,
1388  jint y, jint rotationX, jint rotationY, jfloat angle,
1389  jint alpha) {
1390  return (*UI_DRAWER_drawRotatedImageNearestNeighbor[gc->drawer])(gc, img, x, y, rotationX, rotationY, angle, alpha);
1391 }
1392 
1393 // See the header file for the function documentation
1394 DRAWING_Status UI_DRAWING_drawRotatedImageBilinear(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x, jint y,
1395  jint rotationX, jint rotationY, jfloat angle, jint alpha) {
1396  return (*UI_DRAWER_drawRotatedImageBilinear[gc->drawer])(gc, img, x, y, rotationX, rotationY, angle, alpha);
1397 }
1398 
1399 // See the header file for the function documentation
1400 DRAWING_Status UI_DRAWING_drawScaledImageNearestNeighbor(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x,
1401  jint y, jfloat factorX, jfloat factorY, jint alpha) {
1402  return (*UI_DRAWER_drawScaledImageNearestNeighbor[gc->drawer])(gc, img, x, y, factorX, factorY, alpha);
1403 }
1404 
1405 // See the header file for the function documentation
1406 DRAWING_Status UI_DRAWING_drawScaledImageBilinear(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x, jint y,
1407  jfloat factorX, jfloat factorY, jint alpha) {
1408  return (*UI_DRAWER_drawScaledImageBilinear[gc->drawer])(gc, img, x, y, factorX, factorY, alpha);
1409 }
1410 
1411 /*
1412  * The next functions are used as elements "1" of the tables. They call STUB functions and should be
1413  * overridden by the drawer that manages the format identified by the index "1".
1414  *
1415  * Only the functions UI_DRAWING_adjustNewImageCharacteristics_1() and UI_DRAWING_initializeNewImage_1()
1416  * are mandatory. If the drawing engine (for the format identified by the index "1") does not override these
1417  * functions, the application will not be able to open an image with the associated format (the default functions
1418  * are implemented as weak functions in case there is no drawing engine for this format).
1419  *
1420  * If no engine supports the format identified by the index "1", the application will not be able to open
1421  * an image with the associated format.
1422  */
1423 
1424 BSP_DECLARE_WEAK_FCNT bool UI_DRAWING_is_drawer_1(jbyte image_format) {
1425  (void)image_format;
1426  // default behavior: format is not supported
1427  return false;
1428 }
1429 
1430 // See the header file for the function documentation
1431 BSP_DECLARE_WEAK_FCNT uint32_t UI_DRAWING_getNewImageStrideInBytes_1(jbyte image_format, uint32_t width,
1432  uint32_t height, uint32_t default_stride) {
1433  (void)image_format;
1434  (void)width;
1435  (void)height;
1436  // does nothing and will throw an error if the application tries to open this kind of image.
1437  // see above.
1438  return default_stride;
1439 }
1440 
1441 // See the header file for the function documentation
1442 BSP_DECLARE_WEAK_FCNT void UI_DRAWING_adjustNewImageCharacteristics_1(jbyte image_format, uint32_t width,
1443  uint32_t height, uint32_t *data_size,
1444  uint32_t *data_alignment) {
1445  (void)image_format;
1446  (void)width;
1447  (void)height;
1448  (void)data_size;
1449  (void)data_alignment;
1450  // does nothing and will throw an error if the application tries to open this kind of image.
1451  // see above.
1452 }
1453 
1454 // See the header file for the function documentation
1455 BSP_DECLARE_WEAK_FCNT void UI_DRAWING_initializeNewImage_1(MICROUI_Image *image) {
1456  (void)image;
1457  // nothing to do
1458 }
1459 
1460 // See the header file for the function documentation
1461 BSP_DECLARE_WEAK_FCNT void UI_DRAWING_freeImageResources_1(MICROUI_Image *image) {
1462  (void)image;
1463  // nothing to do
1464 }
1465 
1466 // See the header file for the function documentation
1467 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_writePixel_1(MICROUI_GraphicsContext *gc, jint x, jint y) {
1468  return UI_DRAWING_STUB_writePixel(gc, x, y);
1469 }
1470 
1471 // See the header file for the function documentation
1472 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawLine_1(MICROUI_GraphicsContext *gc, jint startX, jint startY,
1473  jint endX, jint endY) {
1474  return UI_DRAWING_STUB_drawLine(gc, startX, startY, endX, endY);
1475 }
1476 
1477 // See the header file for the function documentation
1478 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawHorizontalLine_1(MICROUI_GraphicsContext *gc, jint x1, jint x2,
1479  jint y) {
1480  return UI_DRAWING_STUB_drawHorizontalLine(gc, x1, x2, y);
1481 }
1482 
1483 // See the header file for the function documentation
1484 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawVerticalLine_1(MICROUI_GraphicsContext *gc, jint x, jint y1,
1485  jint y2) {
1486  return UI_DRAWING_STUB_drawVerticalLine(gc, x, y1, y2);
1487 }
1488 
1489 // See the header file for the function documentation
1490 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawRectangle_1(MICROUI_GraphicsContext *gc, jint x1, jint y1, jint x2,
1491  jint y2) {
1492  return UI_DRAWING_STUB_drawRectangle(gc, x1, y1, x2, y2);
1493 }
1494 
1495 // See the header file for the function documentation
1496 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_fillRectangle_1(MICROUI_GraphicsContext *gc, jint x1, jint y1, jint x2,
1497  jint y2) {
1498  return UI_DRAWING_STUB_fillRectangle(gc, x1, y1, x2, y2);
1499 }
1500 
1501 // See the header file for the function documentation
1502 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawRoundedRectangle_1(MICROUI_GraphicsContext *gc, jint x, jint y,
1503  jint width, jint height, jint cornerEllipseWidth,
1504  jint cornerEllipseHeight) {
1505  return UI_DRAWING_STUB_drawRoundedRectangle(gc, x, y, width, height, cornerEllipseWidth, cornerEllipseHeight);
1506 }
1507 
1508 // See the header file for the function documentation
1509 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_fillRoundedRectangle_1(MICROUI_GraphicsContext *gc, jint x, jint y,
1510  jint width, jint height, jint cornerEllipseWidth,
1511  jint cornerEllipseHeight) {
1512  return UI_DRAWING_STUB_fillRoundedRectangle(gc, x, y, width, height, cornerEllipseWidth, cornerEllipseHeight);
1513 }
1514 
1515 // See the header file for the function documentation
1516 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawCircleArc_1(MICROUI_GraphicsContext *gc, jint x, jint y,
1517  jint diameter, jfloat startAngle, jfloat arcAngle) {
1518  return UI_DRAWING_STUB_drawCircleArc(gc, x, y, diameter, startAngle, arcAngle);
1519 }
1520 
1521 // See the header file for the function documentation
1522 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawEllipseArc_1(MICROUI_GraphicsContext *gc, jint x, jint y,
1523  jint width, jint height, jfloat startAngle,
1524  jfloat arcAngle) {
1525  return UI_DRAWING_STUB_drawEllipseArc(gc, x, y, width, height, startAngle, arcAngle);
1526 }
1527 
1528 // See the header file for the function documentation
1529 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_fillCircleArc_1(MICROUI_GraphicsContext *gc, jint x, jint y,
1530  jint diameter, jfloat startAngle, jfloat arcAngle) {
1531  return UI_DRAWING_STUB_fillCircleArc(gc, x, y, diameter, startAngle, arcAngle);
1532 }
1533 
1534 // See the header file for the function documentation
1535 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_fillEllipseArc_1(MICROUI_GraphicsContext *gc, jint x, jint y,
1536  jint width, jint height, jfloat startAngle,
1537  jfloat arcAngle) {
1538  return UI_DRAWING_STUB_fillEllipseArc(gc, x, y, width, height, startAngle, arcAngle);
1539 }
1540 
1541 // See the header file for the function documentation
1542 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawEllipse_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
1543  jint height) {
1544  return UI_DRAWING_STUB_drawEllipse(gc, x, y, width, height);
1545 }
1546 
1547 // See the header file for the function documentation
1548 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_fillEllipse_1(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
1549  jint height) {
1550  return UI_DRAWING_STUB_fillEllipse(gc, x, y, width, height);
1551 }
1552 
1553 // See the header file for the function documentation
1554 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawCircle_1(MICROUI_GraphicsContext *gc, jint x, jint y,
1555  jint diameter) {
1556  return UI_DRAWING_STUB_drawCircle(gc, x, y, diameter);
1557 }
1558 
1559 // See the header file for the function documentation
1560 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_fillCircle_1(MICROUI_GraphicsContext *gc, jint x, jint y,
1561  jint diameter) {
1562  return UI_DRAWING_STUB_fillCircle(gc, x, y, diameter);
1563 }
1564 
1565 // See the header file for the function documentation
1566 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawImage_1(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
1567  jint regionX, jint regionY, jint width, jint height, jint x,
1568  jint y, jint alpha) {
1569  return UI_IMAGE_DRAWING_draw(gc, img, regionX, regionY, width, height, x, y, alpha);
1570 }
1571 
1572 // See the header file for the function documentation
1573 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_copyImage_1(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
1574  jint regionX, jint regionY, jint width, jint height, jint x,
1575  jint y) {
1576  return UI_IMAGE_DRAWING_copy(gc, img, regionX, regionY, width, height, x, y);
1577 }
1578 
1579 // See the header file for the function documentation
1580 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawRegion_1(MICROUI_GraphicsContext *gc, jint regionX, jint regionY,
1581  jint width, jint height, jint x, jint y, jint alpha) {
1582  return UI_IMAGE_DRAWING_drawRegion(gc, regionX, regionY, width, height, x, y, alpha);
1583 }
1584 
1585 // See the header file for the function documentation
1586 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawThickFadedPoint_1(MICROUI_GraphicsContext *gc, jint x, jint y,
1587  jint thickness, jint fade) {
1588  return UI_DRAWING_STUB_drawThickFadedPoint(gc, x, y, thickness, fade);
1589 }
1590 
1591 // See the header file for the function documentation
1592 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawThickFadedLine_1(MICROUI_GraphicsContext *gc, jint startX,
1593  jint startY, jint endX, jint endY, jint thickness,
1594  jint fade, DRAWING_Cap startCap,
1595  DRAWING_Cap endCap) {
1596  return UI_DRAWING_STUB_drawThickFadedLine(gc, startX, startY, endX, endY, thickness, fade, startCap, endCap);
1597 }
1598 
1599 // See the header file for the function documentation
1600 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawThickFadedCircle_1(MICROUI_GraphicsContext *gc, jint x, jint y,
1601  jint diameter, jint thickness, jint fade) {
1602  return UI_DRAWING_STUB_drawThickFadedCircle(gc, x, y, diameter, thickness, fade);
1603 }
1604 
1605 // See the header file for the function documentation
1606 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawThickFadedCircleArc_1(MICROUI_GraphicsContext *gc, jint x, jint y,
1607  jint diameter, jfloat startAngle,
1608  jfloat arcAngle, jint thickness, jint fade,
1609  DRAWING_Cap start, DRAWING_Cap end) {
1610  return UI_DRAWING_STUB_drawThickFadedCircleArc(gc, x, y, diameter, startAngle, arcAngle, thickness, fade, start,
1611  end);
1612 }
1613 
1614 // See the header file for the function documentation
1615 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawThickFadedEllipse_1(MICROUI_GraphicsContext *gc, jint x, jint y,
1616  jint width, jint height, jint thickness,
1617  jint fade) {
1618  return UI_DRAWING_STUB_drawThickFadedEllipse(gc, x, y, width, height, thickness, fade);
1619 }
1620 
1621 // See the header file for the function documentation
1622 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawThickLine_1(MICROUI_GraphicsContext *gc, jint startX, jint startY,
1623  jint endX, jint endY, jint thickness) {
1624  return UI_DRAWING_STUB_drawThickLine(gc, startX, startY, endX, endY, thickness);
1625 }
1626 
1627 // See the header file for the function documentation
1628 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawThickCircle_1(MICROUI_GraphicsContext *gc, jint x, jint y,
1629  jint diameter, jint thickness) {
1630  return UI_DRAWING_STUB_drawThickCircle(gc, x, y, diameter, thickness);
1631 }
1632 
1633 // See the header file for the function documentation
1634 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawThickEllipse_1(MICROUI_GraphicsContext *gc, jint x, jint y,
1635  jint width, jint height, jint thickness) {
1636  return UI_DRAWING_STUB_drawThickEllipse(gc, x, y, width, height, thickness);
1637 }
1638 
1639 // See the header file for the function documentation
1640 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawThickCircleArc_1(MICROUI_GraphicsContext *gc, jint x, jint y,
1641  jint diameter, jfloat startAngle, jfloat arcAngle,
1642  jint thickness) {
1643  return UI_DRAWING_STUB_drawThickCircleArc(gc, x, y, diameter, startAngle, arcAngle, thickness);
1644 }
1645 
1646 // See the header file for the function documentation
1647 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawFlippedImage_1(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
1648  jint regionX, jint regionY, jint width, jint height,
1649  jint x, jint y, DRAWING_Flip transformation,
1650  jint alpha) {
1651  return UI_IMAGE_DRAWING_drawFlipped(gc, img, regionX, regionY, width, height, x, y, transformation, alpha);
1652 }
1653 
1654 // See the header file for the function documentation
1655 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawRotatedImageNearestNeighbor_1(MICROUI_GraphicsContext *gc,
1656  MICROUI_Image *img, jint x, jint y,
1657  jint rotationX, jint rotationY,
1658  jfloat angle, jint alpha) {
1659  return UI_IMAGE_DRAWING_drawRotatedNearestNeighbor(gc, img, x, y, rotationX, rotationY, angle, alpha);
1660 }
1661 
1662 // See the header file for the function documentation
1663 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawRotatedImageBilinear_1(MICROUI_GraphicsContext *gc,
1664  MICROUI_Image *img, jint x, jint y,
1665  jint rotationX, jint rotationY, jfloat angle,
1666  jint alpha) {
1667  return UI_IMAGE_DRAWING_drawRotatedBilinear(gc, img, x, y, rotationX, rotationY, angle, alpha);
1668 }
1669 
1670 // See the header file for the function documentation
1671 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawScaledImageNearestNeighbor_1(MICROUI_GraphicsContext *gc,
1672  MICROUI_Image *img, jint x, jint y,
1673  jfloat factorX, jfloat factorY,
1674  jint alpha) {
1675  return UI_IMAGE_DRAWING_drawScaledNearestNeighbor(gc, img, x, y, factorX, factorY, alpha);
1676 }
1677 
1678 // See the header file for the function documentation
1679 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawScaledImageBilinear_1(MICROUI_GraphicsContext *gc,
1680  MICROUI_Image *img, jint x, jint y,
1681  jfloat factorX, jfloat factorY, jint alpha) {
1682  return UI_IMAGE_DRAWING_drawScaledBilinear(gc, img, x, y, factorX, factorY, alpha);
1683 }
1684 
1685 #if (LLUI_GC_SUPPORTED_FORMATS > 2)
1686 
1687 /*
1688  * The next functions are used as elements "2" of the tables. They call STUB functions and should be
1689  * overridden by the drawer that manages the format identified by the index "2".
1690  *
1691  * Only the functions UI_DRAWING_adjustNewImageCharacteristics_2() and UI_DRAWING_initializeNewImage_2()
1692  * are mandatory. If the drawing engine (for the format identified by the index "2") does not override these
1693  * functions, the application will not be able to open an image with the associated format (the default functions
1694  * are implemented as weak functions in case there is no drawing engine for this format).
1695  *
1696  * If no engine supports the format identified by the index "2", the application will not be able to open
1697  * an image with the associated format.
1698  */
1699 
1700 BSP_DECLARE_WEAK_FCNT bool UI_DRAWING_is_drawer_2(jbyte image_format) {
1701  (void)image_format;
1702  // default behavior: format is not supported
1703  return false;
1704 }
1705 
1706 // See the header file for the function documentation
1707 BSP_DECLARE_WEAK_FCNT uint32_t UI_DRAWING_getNewImageStrideInBytes_2(jbyte image_format, uint32_t width,
1708  uint32_t height, uint32_t default_stride) {
1709  (void)image_format;
1710  (void)width;
1711  (void)height;
1712  // does nothing and will throw an error if the application tries to open this kind of image.
1713  // see above.
1714  return default_stride;
1715 }
1716 
1717 // See the header file for the function documentation
1718 BSP_DECLARE_WEAK_FCNT void UI_DRAWING_adjustNewImageCharacteristics_2(jbyte image_format, uint32_t width,
1719  uint32_t height, uint32_t *data_size,
1720  uint32_t *data_alignment) {
1721  (void)image_format;
1722  (void)width;
1723  (void)height;
1724  (void)data_size;
1725  (void)data_alignment;
1726  // does nothing and will throw an error if the application tries to open this kind of image.
1727  // see above.
1728 }
1729 
1730 // See the header file for the function documentation
1731 BSP_DECLARE_WEAK_FCNT void UI_DRAWING_initializeNewImage_2(MICROUI_Image *image) {
1732  (void)image;
1733  // nothing to do
1734 }
1735 
1736 // See the header file for the function documentation
1737 BSP_DECLARE_WEAK_FCNT void UI_DRAWING_freeImageResources_2(MICROUI_Image *image) {
1738  (void)image;
1739  // nothing to do
1740 }
1741 
1742 // See the header file for the function documentation
1743 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_writePixel_2(MICROUI_GraphicsContext *gc, jint x, jint y) {
1744  return UI_DRAWING_STUB_writePixel(gc, x, y);
1745 }
1746 
1747 // See the header file for the function documentation
1748 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawLine_2(MICROUI_GraphicsContext *gc, jint startX, jint startY,
1749  jint endX, jint endY) {
1750  return UI_DRAWING_STUB_drawLine(gc, startX, startY, endX, endY);
1751 }
1752 
1753 // See the header file for the function documentation
1754 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawHorizontalLine_2(MICROUI_GraphicsContext *gc, jint x1, jint x2,
1755  jint y) {
1756  return UI_DRAWING_STUB_drawHorizontalLine(gc, x1, x2, y);
1757 }
1758 
1759 // See the header file for the function documentation
1760 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawVerticalLine_2(MICROUI_GraphicsContext *gc, jint x, jint y1,
1761  jint y2) {
1762  return UI_DRAWING_STUB_drawVerticalLine(gc, x, y1, y2);
1763 }
1764 
1765 // See the header file for the function documentation
1766 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawRectangle_2(MICROUI_GraphicsContext *gc, jint x1, jint y1, jint x2,
1767  jint y2) {
1768  return UI_DRAWING_STUB_drawRectangle(gc, x1, y1, x2, y2);
1769 }
1770 
1771 // See the header file for the function documentation
1772 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_fillRectangle_2(MICROUI_GraphicsContext *gc, jint x1, jint y1, jint x2,
1773  jint y2) {
1774  return UI_DRAWING_STUB_fillRectangle(gc, x1, y1, x2, y2);
1775 }
1776 
1777 // See the header file for the function documentation
1778 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawRoundedRectangle_2(MICROUI_GraphicsContext *gc, jint x, jint y,
1779  jint width, jint height, jint cornerEllipseWidth,
1780  jint cornerEllipseHeight) {
1781  return UI_DRAWING_STUB_drawRoundedRectangle(gc, x, y, width, height, cornerEllipseWidth, cornerEllipseHeight);
1782 }
1783 
1784 // See the header file for the function documentation
1785 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_fillRoundedRectangle_2(MICROUI_GraphicsContext *gc, jint x, jint y,
1786  jint width, jint height, jint cornerEllipseWidth,
1787  jint cornerEllipseHeight) {
1788  return UI_DRAWING_STUB_fillRoundedRectangle(gc, x, y, width, height, cornerEllipseWidth, cornerEllipseHeight);
1789 }
1790 
1791 // See the header file for the function documentation
1792 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawCircleArc_2(MICROUI_GraphicsContext *gc, jint x, jint y,
1793  jint diameter, jfloat startAngle, jfloat arcAngle) {
1794  return UI_DRAWING_STUB_drawCircleArc(gc, x, y, diameter, startAngle, arcAngle);
1795 }
1796 
1797 // See the header file for the function documentation
1798 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawEllipseArc_2(MICROUI_GraphicsContext *gc, jint x, jint y,
1799  jint width, jint height, jfloat startAngle,
1800  jfloat arcAngle) {
1801  return UI_DRAWING_STUB_drawEllipseArc(gc, x, y, width, height, startAngle, arcAngle);
1802 }
1803 
1804 // See the header file for the function documentation
1805 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_fillCircleArc_2(MICROUI_GraphicsContext *gc, jint x, jint y,
1806  jint diameter, jfloat startAngle, jfloat arcAngle) {
1807  return UI_DRAWING_STUB_fillCircleArc(gc, x, y, diameter, startAngle, arcAngle);
1808 }
1809 
1810 // See the header file for the function documentation
1811 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_fillEllipseArc_2(MICROUI_GraphicsContext *gc, jint x, jint y,
1812  jint width, jint height, jfloat startAngle,
1813  jfloat arcAngle) {
1814  return UI_DRAWING_STUB_fillEllipseArc(gc, x, y, width, height, startAngle, arcAngle);
1815 }
1816 
1817 // See the header file for the function documentation
1818 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawEllipse_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
1819  jint height) {
1820  return UI_DRAWING_STUB_drawEllipse(gc, x, y, width, height);
1821 }
1822 
1823 // See the header file for the function documentation
1824 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_fillEllipse_2(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
1825  jint height) {
1826  return UI_DRAWING_STUB_fillEllipse(gc, x, y, width, height);
1827 }
1828 
1829 // See the header file for the function documentation
1830 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawCircle_2(MICROUI_GraphicsContext *gc, jint x, jint y,
1831  jint diameter) {
1832  return UI_DRAWING_STUB_drawCircle(gc, x, y, diameter);
1833 }
1834 
1835 // See the header file for the function documentation
1836 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_fillCircle_2(MICROUI_GraphicsContext *gc, jint x, jint y,
1837  jint diameter) {
1838  return UI_DRAWING_STUB_fillCircle(gc, x, y, diameter);
1839 }
1840 
1841 // See the header file for the function documentation
1842 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawImage_2(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
1843  jint regionX, jint regionY, jint width, jint height, jint x,
1844  jint y, jint alpha) {
1845  return UI_IMAGE_DRAWING_draw(gc, img, regionX, regionY, width, height, x, y, alpha);
1846 }
1847 
1848 // See the header file for the function documentation
1849 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_copyImage_2(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
1850  jint regionX, jint regionY, jint width, jint height, jint x,
1851  jint y) {
1852  return UI_IMAGE_DRAWING_copy(gc, img, regionX, regionY, width, height, x, y);
1853 }
1854 
1855 // See the header file for the function documentation
1856 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawRegion_2(MICROUI_GraphicsContext *gc, jint regionX, jint regionY,
1857  jint width, jint height, jint x, jint y, jint alpha) {
1858  return UI_IMAGE_DRAWING_drawRegion(gc, regionX, regionY, width, height, x, y, alpha);
1859 }
1860 
1861 // See the header file for the function documentation
1862 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawThickFadedPoint_2(MICROUI_GraphicsContext *gc, jint x, jint y,
1863  jint thickness, jint fade) {
1864  return UI_DRAWING_STUB_drawThickFadedPoint(gc, x, y, thickness, fade);
1865 }
1866 
1867 // See the header file for the function documentation
1868 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawThickFadedLine_2(MICROUI_GraphicsContext *gc, jint startX,
1869  jint startY, jint endX, jint endY, jint thickness,
1870  jint fade, DRAWING_Cap startCap,
1871  DRAWING_Cap endCap) {
1872  return UI_DRAWING_STUB_drawThickFadedLine(gc, startX, startY, endX, endY, thickness, fade, startCap, endCap);
1873 }
1874 
1875 // See the header file for the function documentation
1876 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawThickFadedCircle_2(MICROUI_GraphicsContext *gc, jint x, jint y,
1877  jint diameter, jint thickness, jint fade) {
1878  return UI_DRAWING_STUB_drawThickFadedCircle(gc, x, y, diameter, thickness, fade);
1879 }
1880 
1881 // See the header file for the function documentation
1882 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawThickFadedCircleArc_2(MICROUI_GraphicsContext *gc, jint x, jint y,
1883  jint diameter, jfloat startAngle,
1884  jfloat arcAngle, jint thickness, jint fade,
1885  DRAWING_Cap start, DRAWING_Cap end) {
1886  return UI_DRAWING_STUB_drawThickFadedCircleArc(gc, x, y, diameter, startAngle, arcAngle, thickness, fade, start,
1887  end);
1888 }
1889 
1890 // See the header file for the function documentation
1891 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawThickFadedEllipse_2(MICROUI_GraphicsContext *gc, jint x, jint y,
1892  jint width, jint height, jint thickness,
1893  jint fade) {
1894  return UI_DRAWING_STUB_drawThickFadedEllipse(gc, x, y, width, height, thickness, fade);
1895 }
1896 
1897 // See the header file for the function documentation
1898 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawThickLine_2(MICROUI_GraphicsContext *gc, jint startX, jint startY,
1899  jint endX, jint endY, jint thickness) {
1900  return UI_DRAWING_STUB_drawThickLine(gc, startX, startY, endX, endY, thickness);
1901 }
1902 
1903 // See the header file for the function documentation
1904 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawThickCircle_2(MICROUI_GraphicsContext *gc, jint x, jint y,
1905  jint diameter, jint thickness) {
1906  return UI_DRAWING_STUB_drawThickCircle(gc, x, y, diameter, thickness);
1907 }
1908 
1909 // See the header file for the function documentation
1910 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawThickEllipse_2(MICROUI_GraphicsContext *gc, jint x, jint y,
1911  jint width, jint height, jint thickness) {
1912  return UI_DRAWING_STUB_drawThickEllipse(gc, x, y, width, height, thickness);
1913 }
1914 
1915 // See the header file for the function documentation
1916 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawThickCircleArc_2(MICROUI_GraphicsContext *gc, jint x, jint y,
1917  jint diameter, jfloat startAngle, jfloat arcAngle,
1918  jint thickness) {
1919  return UI_DRAWING_STUB_drawThickCircleArc(gc, x, y, diameter, startAngle, arcAngle, thickness);
1920 }
1921 
1922 // See the header file for the function documentation
1923 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawFlippedImage_2(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
1924  jint regionX, jint regionY, jint width, jint height,
1925  jint x, jint y, DRAWING_Flip transformation,
1926  jint alpha) {
1927  return UI_IMAGE_DRAWING_drawFlipped(gc, img, regionX, regionY, width, height, x, y, transformation, alpha);
1928 }
1929 
1930 // See the header file for the function documentation
1931 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawRotatedImageNearestNeighbor_2(MICROUI_GraphicsContext *gc,
1932  MICROUI_Image *img, jint x, jint y,
1933  jint rotationX, jint rotationY,
1934  jfloat angle, jint alpha) {
1935  return UI_IMAGE_DRAWING_drawRotatedNearestNeighbor(gc, img, x, y, rotationX, rotationY, angle, alpha);
1936 }
1937 
1938 // See the header file for the function documentation
1939 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawRotatedImageBilinear_2(MICROUI_GraphicsContext *gc,
1940  MICROUI_Image *img, jint x, jint y,
1941  jint rotationX, jint rotationY, jfloat angle,
1942  jint alpha) {
1943  return UI_IMAGE_DRAWING_drawRotatedBilinear(gc, img, x, y, rotationX, rotationY, angle, alpha);
1944 }
1945 
1946 // See the header file for the function documentation
1947 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawScaledImageNearestNeighbor_2(MICROUI_GraphicsContext *gc,
1948  MICROUI_Image *img, jint x, jint y,
1949  jfloat factorX, jfloat factorY,
1950  jint alpha) {
1951  return UI_IMAGE_DRAWING_drawScaledNearestNeighbor(gc, img, x, y, factorX, factorY, alpha);
1952 }
1953 
1954 // See the header file for the function documentation
1955 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_DRAWING_drawScaledImageBilinear_2(MICROUI_GraphicsContext *gc,
1956  MICROUI_Image *img, jint x, jint y,
1957  jfloat factorX, jfloat factorY, jint alpha) {
1958  return UI_IMAGE_DRAWING_drawScaledBilinear(gc, img, x, y, factorX, factorY, alpha);
1959 }
1960 
1961 #endif // (LLUI_GC_SUPPORTED_FORMATS > 2)
1962 
1963 #else // #if defined(LLUI_GC_SUPPORTED_FORMATS) && (LLUI_GC_SUPPORTED_FORMATS > 1)
1964 
1965 /*
1966  * The VEE port supports only one destination format: the display buffer format. The
1967  * application can only create immutable images or mutable images with the same format as
1968  * the display buffer. All drawing functions are redirected to the software implementation
1969  * by default. A third party implementation (often on a GPU) can replace each weak function
1970  * independently.
1971  *
1972  * The VEE Port can tune the new image characteristics to add a header before the pixel
1973  * array for instance.
1974  */
1975 
1976 #endif // #if defined(LLUI_GC_SUPPORTED_FORMATS) && (LLUI_GC_SUPPORTED_FORMATS > 1)
1977 
1978 // -----------------------------------------------------------------------------
1979 // EOF
1980 // -----------------------------------------------------------------------------