20 #include <LLUI_DISPLAY.h>
22 #include "ui_image_drawing.h"
23 #include "ui_drawing_soft.h"
24 #include "dw_drawing_soft.h"
25 #include "ui_drawing_stub.h"
29 #if defined(UI_FEATURE_IMAGE_CUSTOM_FORMATS)
50 #define TABLE_INDEX_STUB 0
51 #define TABLE_INDEX_SOFT 1
52 #define TABLE_INDEX_CUSTOM_OFFSET 2
54 #define GET_CUSTOM_IMAGE_INDEX(img) (((uint8_t)TABLE_INDEX_CUSTOM_OFFSET) + ((uint8_t)MICROUI_IMAGE_FORMAT_CUSTOM_0) - \
55 ((uint8_t)((img)->format)))
67 extern DRAWING_Status UI_IMAGE_DRAWING_draw_custom0(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
68 jint regionY, jint width, jint height, jint x, jint y, jint alpha);
69 extern DRAWING_Status UI_IMAGE_DRAWING_draw_custom1(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
70 jint regionY, jint width, jint height, jint x, jint y, jint alpha);
71 extern DRAWING_Status UI_IMAGE_DRAWING_draw_custom2(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
72 jint regionY, jint width, jint height, jint x, jint y, jint alpha);
73 extern DRAWING_Status UI_IMAGE_DRAWING_draw_custom3(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
74 jint regionY, jint width, jint height, jint x, jint y, jint alpha);
75 extern DRAWING_Status UI_IMAGE_DRAWING_draw_custom4(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
76 jint regionY, jint width, jint height, jint x, jint y, jint alpha);
77 extern DRAWING_Status UI_IMAGE_DRAWING_draw_custom5(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
78 jint regionY, jint width, jint height, jint x, jint y, jint alpha);
79 extern DRAWING_Status UI_IMAGE_DRAWING_draw_custom6(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
80 jint regionY, jint width, jint height, jint x, jint y, jint alpha);
81 extern DRAWING_Status UI_IMAGE_DRAWING_draw_custom7(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
82 jint regionY, jint width, jint height, jint x, jint y, jint alpha);
84 extern DRAWING_Status UI_IMAGE_DRAWING_copy_custom0(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
85 jint regionY, jint width, jint height, jint x, jint y);
86 extern DRAWING_Status UI_IMAGE_DRAWING_copy_custom1(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
87 jint regionY, jint width, jint height, jint x, jint y);
88 extern DRAWING_Status UI_IMAGE_DRAWING_copy_custom2(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
89 jint regionY, jint width, jint height, jint x, jint y);
90 extern DRAWING_Status UI_IMAGE_DRAWING_copy_custom3(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
91 jint regionY, jint width, jint height, jint x, jint y);
92 extern DRAWING_Status UI_IMAGE_DRAWING_copy_custom4(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
93 jint regionY, jint width, jint height, jint x, jint y);
94 extern DRAWING_Status UI_IMAGE_DRAWING_copy_custom5(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
95 jint regionY, jint width, jint height, jint x, jint y);
96 extern DRAWING_Status UI_IMAGE_DRAWING_copy_custom6(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
97 jint regionY, jint width, jint height, jint x, jint y);
98 extern DRAWING_Status UI_IMAGE_DRAWING_copy_custom7(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
99 jint regionY, jint width, jint height, jint x, jint y);
101 extern DRAWING_Status UI_IMAGE_DRAWING_drawRegion_custom0(MICROUI_GraphicsContext *gc, jint regionX, jint regionY,
102 jint width, jint height, jint x, jint y, jint alpha);
103 extern DRAWING_Status UI_IMAGE_DRAWING_drawRegion_custom1(MICROUI_GraphicsContext *gc, jint regionX, jint regionY,
104 jint width, jint height, jint x, jint y, jint alpha);
105 extern DRAWING_Status UI_IMAGE_DRAWING_drawRegion_custom2(MICROUI_GraphicsContext *gc, jint regionX, jint regionY,
106 jint width, jint height, jint x, jint y, jint alpha);
107 extern DRAWING_Status UI_IMAGE_DRAWING_drawRegion_custom3(MICROUI_GraphicsContext *gc, jint regionX, jint regionY,
108 jint width, jint height, jint x, jint y, jint alpha);
109 extern DRAWING_Status UI_IMAGE_DRAWING_drawRegion_custom4(MICROUI_GraphicsContext *gc, jint regionX, jint regionY,
110 jint width, jint height, jint x, jint y, jint alpha);
111 extern DRAWING_Status UI_IMAGE_DRAWING_drawRegion_custom5(MICROUI_GraphicsContext *gc, jint regionX, jint regionY,
112 jint width, jint height, jint x, jint y, jint alpha);
113 extern DRAWING_Status UI_IMAGE_DRAWING_drawRegion_custom6(MICROUI_GraphicsContext *gc, jint regionX, jint regionY,
114 jint width, jint height, jint x, jint y, jint alpha);
115 extern DRAWING_Status UI_IMAGE_DRAWING_drawRegion_custom7(MICROUI_GraphicsContext *gc, jint regionX, jint regionY,
116 jint width, jint height, jint x, jint y, jint alpha);
118 extern DRAWING_Status UI_IMAGE_DRAWING_drawFlipped_custom0(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
119 jint regionX, jint regionY, jint width, jint height, jint x,
120 jint y, DRAWING_Flip transformation, jint alpha);
121 extern DRAWING_Status UI_IMAGE_DRAWING_drawFlipped_custom1(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
122 jint regionX, jint regionY, jint width, jint height, jint x,
123 jint y, DRAWING_Flip transformation, jint alpha);
124 extern DRAWING_Status UI_IMAGE_DRAWING_drawFlipped_custom2(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
125 jint regionX, jint regionY, jint width, jint height, jint x,
126 jint y, DRAWING_Flip transformation, jint alpha);
127 extern DRAWING_Status UI_IMAGE_DRAWING_drawFlipped_custom3(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
128 jint regionX, jint regionY, jint width, jint height, jint x,
129 jint y, DRAWING_Flip transformation, jint alpha);
130 extern DRAWING_Status UI_IMAGE_DRAWING_drawFlipped_custom4(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
131 jint regionX, jint regionY, jint width, jint height, jint x,
132 jint y, DRAWING_Flip transformation, jint alpha);
133 extern DRAWING_Status UI_IMAGE_DRAWING_drawFlipped_custom5(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
134 jint regionX, jint regionY, jint width, jint height, jint x,
135 jint y, DRAWING_Flip transformation, jint alpha);
136 extern DRAWING_Status UI_IMAGE_DRAWING_drawFlipped_custom6(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
137 jint regionX, jint regionY, jint width, jint height, jint x,
138 jint y, DRAWING_Flip transformation, jint alpha);
139 extern DRAWING_Status UI_IMAGE_DRAWING_drawFlipped_custom7(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
140 jint regionX, jint regionY, jint width, jint height, jint x,
141 jint y, DRAWING_Flip transformation, jint alpha);
143 extern DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom0(MICROUI_GraphicsContext *gc,
144 MICROUI_Image *img, jint x, jint y,
145 jint rotationX, jint rotationY, jfloat angle,
147 extern DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom1(MICROUI_GraphicsContext *gc,
148 MICROUI_Image *img, jint x, jint y,
149 jint rotationX, jint rotationY, jfloat angle,
151 extern DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom2(MICROUI_GraphicsContext *gc,
152 MICROUI_Image *img, jint x, jint y,
153 jint rotationX, jint rotationY, jfloat angle,
155 extern DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom3(MICROUI_GraphicsContext *gc,
156 MICROUI_Image *img, jint x, jint y,
157 jint rotationX, jint rotationY, jfloat angle,
159 extern DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom4(MICROUI_GraphicsContext *gc,
160 MICROUI_Image *img, jint x, jint y,
161 jint rotationX, jint rotationY, jfloat angle,
163 extern DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom5(MICROUI_GraphicsContext *gc,
164 MICROUI_Image *img, jint x, jint y,
165 jint rotationX, jint rotationY, jfloat angle,
167 extern DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom6(MICROUI_GraphicsContext *gc,
168 MICROUI_Image *img, jint x, jint y,
169 jint rotationX, jint rotationY, jfloat angle,
171 extern DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom7(MICROUI_GraphicsContext *gc,
172 MICROUI_Image *img, jint x, jint y,
173 jint rotationX, jint rotationY, jfloat angle,
176 extern DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear_custom0(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
177 jint x, jint y, jint rotationX, jint rotationY,
178 jfloat angle, jint alpha);
179 extern DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear_custom1(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
180 jint x, jint y, jint rotationX, jint rotationY,
181 jfloat angle, jint alpha);
182 extern DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear_custom2(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
183 jint x, jint y, jint rotationX, jint rotationY,
184 jfloat angle, jint alpha);
185 extern DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear_custom3(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
186 jint x, jint y, jint rotationX, jint rotationY,
187 jfloat angle, jint alpha);
188 extern DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear_custom4(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
189 jint x, jint y, jint rotationX, jint rotationY,
190 jfloat angle, jint alpha);
191 extern DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear_custom5(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
192 jint x, jint y, jint rotationX, jint rotationY,
193 jfloat angle, jint alpha);
194 extern DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear_custom6(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
195 jint x, jint y, jint rotationX, jint rotationY,
196 jfloat angle, jint alpha);
197 extern DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear_custom7(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
198 jint x, jint y, jint rotationX, jint rotationY,
199 jfloat angle, jint alpha);
201 extern DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom0(MICROUI_GraphicsContext *gc,
202 MICROUI_Image *img, jint x, jint y,
203 jfloat factorX, jfloat factorY, jint alpha);
204 extern DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom1(MICROUI_GraphicsContext *gc,
205 MICROUI_Image *img, jint x, jint y,
206 jfloat factorX, jfloat factorY, jint alpha);
207 extern DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom2(MICROUI_GraphicsContext *gc,
208 MICROUI_Image *img, jint x, jint y,
209 jfloat factorX, jfloat factorY, jint alpha);
210 extern DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom3(MICROUI_GraphicsContext *gc,
211 MICROUI_Image *img, jint x, jint y,
212 jfloat factorX, jfloat factorY, jint alpha);
213 extern DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom4(MICROUI_GraphicsContext *gc,
214 MICROUI_Image *img, jint x, jint y,
215 jfloat factorX, jfloat factorY, jint alpha);
216 extern DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom5(MICROUI_GraphicsContext *gc,
217 MICROUI_Image *img, jint x, jint y,
218 jfloat factorX, jfloat factorY, jint alpha);
219 extern DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom6(MICROUI_GraphicsContext *gc,
220 MICROUI_Image *img, jint x, jint y,
221 jfloat factorX, jfloat factorY, jint alpha);
222 extern DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom7(MICROUI_GraphicsContext *gc,
223 MICROUI_Image *img, jint x, jint y,
224 jfloat factorX, jfloat factorY, jint alpha);
226 extern DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear_custom0(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
227 jint x, jint y, jfloat factorX, jfloat factorY,
229 extern DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear_custom1(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
230 jint x, jint y, jfloat factorX, jfloat factorY,
232 extern DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear_custom2(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
233 jint x, jint y, jfloat factorX, jfloat factorY,
235 extern DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear_custom3(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
236 jint x, jint y, jfloat factorX, jfloat factorY,
238 extern DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear_custom4(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
239 jint x, jint y, jfloat factorX, jfloat factorY,
241 extern DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear_custom5(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
242 jint x, jint y, jfloat factorX, jfloat factorY,
244 extern DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear_custom6(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
245 jint x, jint y, jfloat factorX, jfloat factorY,
247 extern DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear_custom7(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
248 jint x, jint y, jfloat factorX, jfloat factorY,
255 typedef DRAWING_Status (* UI_IMAGE_DRAWING_draw_t) (MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
256 jint regionY, jint width, jint height, jint x, jint y, jint alpha);
257 typedef DRAWING_Status (* UI_IMAGE_DRAWING_copy_t) (MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
258 jint regionY, jint width, jint height, jint x, jint y);
259 typedef DRAWING_Status (* UI_IMAGE_DRAWING_drawRegion_t) (MICROUI_GraphicsContext *gc, jint regionX, jint regionY,
260 jint width, jint height, jint x, jint y, jint alpha);
261 typedef DRAWING_Status (* UI_IMAGE_DRAWING_drawFlipped_t) (MICROUI_GraphicsContext *gc, MICROUI_Image *img,
262 jint regionX, jint regionY, jint width, jint height, jint x,
263 jint y, DRAWING_Flip transformation, jint alpha);
264 typedef DRAWING_Status (* UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_t) (MICROUI_GraphicsContext *gc,
265 MICROUI_Image *img, jint x, jint y,
266 jint rotationX, jint rotationY, jfloat angle,
268 typedef DRAWING_Status (* UI_IMAGE_DRAWING_drawRotatedBilinear_t) (MICROUI_GraphicsContext *gc, MICROUI_Image *img,
269 jint x, jint y, jint rotationX, jint rotationY,
270 jfloat angle, jint alpha);
271 typedef DRAWING_Status (* UI_IMAGE_DRAWING_drawScaledNearestNeighbor_t) (MICROUI_GraphicsContext *gc,
272 MICROUI_Image *img, jint x, jint y,
273 jfloat factorX, jfloat factorY, jint alpha);
274 typedef DRAWING_Status (* UI_IMAGE_DRAWING_drawScaledBilinear_t) (MICROUI_GraphicsContext *gc, MICROUI_Image *img,
275 jint x, jint y, jfloat factorX, jfloat factorY,
282 static const UI_IMAGE_DRAWING_draw_t UI_IMAGE_DRAWING_draw_custom[] = {
283 &UI_DRAWING_STUB_drawImage,
284 &UI_DRAWING_SOFT_drawImage,
285 &UI_IMAGE_DRAWING_draw_custom0,
286 &UI_IMAGE_DRAWING_draw_custom1,
287 &UI_IMAGE_DRAWING_draw_custom2,
288 &UI_IMAGE_DRAWING_draw_custom3,
289 &UI_IMAGE_DRAWING_draw_custom4,
290 &UI_IMAGE_DRAWING_draw_custom5,
291 &UI_IMAGE_DRAWING_draw_custom6,
292 &UI_IMAGE_DRAWING_draw_custom7,
295 static const UI_IMAGE_DRAWING_copy_t UI_IMAGE_DRAWING_copy_custom[] = {
296 UI_DRAWING_STUB_copyImage,
297 UI_DRAWING_SOFT_copyImage,
298 &UI_IMAGE_DRAWING_copy_custom0,
299 &UI_IMAGE_DRAWING_copy_custom1,
300 &UI_IMAGE_DRAWING_copy_custom2,
301 &UI_IMAGE_DRAWING_copy_custom3,
302 &UI_IMAGE_DRAWING_copy_custom4,
303 &UI_IMAGE_DRAWING_copy_custom5,
304 &UI_IMAGE_DRAWING_copy_custom6,
305 &UI_IMAGE_DRAWING_copy_custom7,
308 static const UI_IMAGE_DRAWING_drawRegion_t UI_IMAGE_DRAWING_drawRegion_custom[] = {
309 UI_DRAWING_STUB_drawRegion,
310 UI_DRAWING_SOFT_drawRegion,
311 &UI_IMAGE_DRAWING_drawRegion_custom0,
312 &UI_IMAGE_DRAWING_drawRegion_custom1,
313 &UI_IMAGE_DRAWING_drawRegion_custom2,
314 &UI_IMAGE_DRAWING_drawRegion_custom3,
315 &UI_IMAGE_DRAWING_drawRegion_custom4,
316 &UI_IMAGE_DRAWING_drawRegion_custom5,
317 &UI_IMAGE_DRAWING_drawRegion_custom6,
318 &UI_IMAGE_DRAWING_drawRegion_custom7,
321 static const UI_IMAGE_DRAWING_drawFlipped_t UI_IMAGE_DRAWING_drawFlipped_custom[] = {
322 UI_DRAWING_STUB_drawFlippedImage,
323 DW_DRAWING_SOFT_drawFlippedImage,
324 &UI_IMAGE_DRAWING_drawFlipped_custom0,
325 &UI_IMAGE_DRAWING_drawFlipped_custom1,
326 &UI_IMAGE_DRAWING_drawFlipped_custom2,
327 &UI_IMAGE_DRAWING_drawFlipped_custom3,
328 &UI_IMAGE_DRAWING_drawFlipped_custom4,
329 &UI_IMAGE_DRAWING_drawFlipped_custom5,
330 &UI_IMAGE_DRAWING_drawFlipped_custom6,
331 &UI_IMAGE_DRAWING_drawFlipped_custom7,
334 static const UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_t UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom[] = {
335 UI_DRAWING_STUB_drawRotatedImageNearestNeighbor,
336 DW_DRAWING_SOFT_drawRotatedImageNearestNeighbor,
337 &UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom0,
338 &UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom1,
339 &UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom2,
340 &UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom3,
341 &UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom4,
342 &UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom5,
343 &UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom6,
344 &UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom7,
347 static const UI_IMAGE_DRAWING_drawRotatedBilinear_t UI_IMAGE_DRAWING_drawRotatedBilinear_custom[] = {
348 UI_DRAWING_STUB_drawRotatedImageBilinear,
349 DW_DRAWING_SOFT_drawRotatedImageBilinear,
350 &UI_IMAGE_DRAWING_drawRotatedBilinear_custom0,
351 &UI_IMAGE_DRAWING_drawRotatedBilinear_custom1,
352 &UI_IMAGE_DRAWING_drawRotatedBilinear_custom2,
353 &UI_IMAGE_DRAWING_drawRotatedBilinear_custom3,
354 &UI_IMAGE_DRAWING_drawRotatedBilinear_custom4,
355 &UI_IMAGE_DRAWING_drawRotatedBilinear_custom5,
356 &UI_IMAGE_DRAWING_drawRotatedBilinear_custom6,
357 &UI_IMAGE_DRAWING_drawRotatedBilinear_custom7,
360 static const UI_IMAGE_DRAWING_drawScaledNearestNeighbor_t UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom[] = {
361 UI_DRAWING_STUB_drawScaledImageNearestNeighbor,
362 DW_DRAWING_SOFT_drawScaledImageNearestNeighbor,
363 &UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom0,
364 &UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom1,
365 &UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom2,
366 &UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom3,
367 &UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom4,
368 &UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom5,
369 &UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom6,
370 &UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom7,
373 static const UI_IMAGE_DRAWING_drawScaledBilinear_t UI_IMAGE_DRAWING_drawScaledBilinear_custom[] = {
374 UI_DRAWING_STUB_drawScaledImageBilinear,
375 DW_DRAWING_SOFT_drawScaledImageBilinear,
376 &UI_IMAGE_DRAWING_drawScaledBilinear_custom0,
377 &UI_IMAGE_DRAWING_drawScaledBilinear_custom1,
378 &UI_IMAGE_DRAWING_drawScaledBilinear_custom2,
379 &UI_IMAGE_DRAWING_drawScaledBilinear_custom3,
380 &UI_IMAGE_DRAWING_drawScaledBilinear_custom4,
381 &UI_IMAGE_DRAWING_drawScaledBilinear_custom5,
382 &UI_IMAGE_DRAWING_drawScaledBilinear_custom6,
383 &UI_IMAGE_DRAWING_drawScaledBilinear_custom7,
390 static inline uint32_t _get_table_index(MICROUI_GraphicsContext *gc, MICROUI_Image *img) {
392 if (!LLUI_DISPLAY_isCustomFormat(img->format)) {
393 #if !defined(UI_GC_SUPPORTED_FORMATS) || (UI_GC_SUPPORTED_FORMATS <= 1)
396 index = TABLE_INDEX_SOFT;
398 index = LLUI_DISPLAY_isDisplayFormat(gc->image.format) ? TABLE_INDEX_SOFT : TABLE_INDEX_STUB;
404 index = GET_CUSTOM_IMAGE_INDEX(img);
414 DRAWING_Status UI_IMAGE_DRAWING_draw(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX, jint regionY,
415 jint width, jint height, jint x, jint y, jint alpha) {
416 return (*UI_IMAGE_DRAWING_draw_custom[_get_table_index(gc, img)])(gc, img, regionX, regionY, width, height, x, y,
421 DRAWING_Status UI_IMAGE_DRAWING_copy(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX, jint regionY,
422 jint width, jint height, jint x, jint y) {
423 return (*UI_IMAGE_DRAWING_copy_custom[_get_table_index(gc, img)])(gc, img, regionX, regionY, width, height, x, y);
427 DRAWING_Status UI_IMAGE_DRAWING_drawRegion(MICROUI_GraphicsContext *gc, jint regionX, jint regionY, jint width,
428 jint height, jint x, jint y, jint alpha) {
429 return (*UI_IMAGE_DRAWING_drawRegion_custom[_get_table_index(gc, &gc->image)])(gc, regionX, regionY, width, height,
434 DRAWING_Status UI_IMAGE_DRAWING_drawFlipped(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX, jint regionY,
435 jint width, jint height, jint x, jint y, DRAWING_Flip transformation,
437 return (*UI_IMAGE_DRAWING_drawFlipped_custom[_get_table_index(gc, img)])(gc, img, regionX, regionY, width, height,
438 x, y, transformation, alpha);
442 DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x,
443 jint y, jint rotationX, jint rotationY, jfloat angle,
445 return (*UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom[_get_table_index(gc, img)])(gc, img, x, y, rotationX,
446 rotationY, angle, alpha);
450 DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x, jint y,
451 jint rotationX, jint rotationY, jfloat angle, jint alpha) {
452 return (*UI_IMAGE_DRAWING_drawRotatedBilinear_custom[_get_table_index(gc, img)])(gc, img, x, y, rotationX,
453 rotationY, angle, alpha);
457 DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x,
458 jint y, jfloat factorX, jfloat factorY, jint alpha) {
459 return (*UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom[_get_table_index(gc, img)])(gc, img, x, y, factorX,
464 DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x, jint y,
465 jfloat factorX, jfloat factorY, jint alpha) {
466 return (*UI_IMAGE_DRAWING_drawScaledBilinear_custom[_get_table_index(gc, img)])(gc, img, x, y, factorX, factorY,
475 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_draw_custom0(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
476 jint regionX, jint regionY, jint width, jint height,
477 jint x, jint y, jint alpha) {
478 return UI_DRAWING_STUB_drawImage(gc, img, regionX, regionY, width, height, x, y, alpha);
482 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_draw_custom1(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
483 jint regionX, jint regionY, jint width, jint height,
484 jint x, jint y, jint alpha) {
485 return UI_DRAWING_STUB_drawImage(gc, img, regionX, regionY, width, height, x, y, alpha);
489 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_draw_custom2(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
490 jint regionX, jint regionY, jint width, jint height,
491 jint x, jint y, jint alpha) {
492 return UI_DRAWING_STUB_drawImage(gc, img, regionX, regionY, width, height, x, y, alpha);
496 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_draw_custom3(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
497 jint regionX, jint regionY, jint width, jint height,
498 jint x, jint y, jint alpha) {
499 return UI_DRAWING_STUB_drawImage(gc, img, regionX, regionY, width, height, x, y, alpha);
503 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_draw_custom4(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
504 jint regionX, jint regionY, jint width, jint height,
505 jint x, jint y, jint alpha) {
506 return UI_DRAWING_STUB_drawImage(gc, img, regionX, regionY, width, height, x, y, alpha);
510 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_draw_custom5(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
511 jint regionX, jint regionY, jint width, jint height,
512 jint x, jint y, jint alpha) {
513 return UI_DRAWING_STUB_drawImage(gc, img, regionX, regionY, width, height, x, y, alpha);
517 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_draw_custom6(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
518 jint regionX, jint regionY, jint width, jint height,
519 jint x, jint y, jint alpha) {
520 return UI_DRAWING_STUB_drawImage(gc, img, regionX, regionY, width, height, x, y, alpha);
524 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_draw_custom7(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
525 jint regionX, jint regionY, jint width, jint height,
526 jint x, jint y, jint alpha) {
527 return UI_DRAWING_STUB_drawImage(gc, img, regionX, regionY, width, height, x, y, alpha);
531 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_copy_custom0(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
532 jint regionX, jint regionY, jint width, jint height,
534 return UI_DRAWING_STUB_copyImage(gc, img, regionX, regionY, width, height, x, y);
538 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_copy_custom1(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
539 jint regionX, jint regionY, jint width, jint height,
541 return UI_DRAWING_STUB_copyImage(gc, img, regionX, regionY, width, height, x, y);
545 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_copy_custom2(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
546 jint regionX, jint regionY, jint width, jint height,
548 return UI_DRAWING_STUB_copyImage(gc, img, regionX, regionY, width, height, x, y);
552 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_copy_custom3(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
553 jint regionX, jint regionY, jint width, jint height,
555 return UI_DRAWING_STUB_copyImage(gc, img, regionX, regionY, width, height, x, y);
559 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_copy_custom4(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
560 jint regionX, jint regionY, jint width, jint height,
562 return UI_DRAWING_STUB_copyImage(gc, img, regionX, regionY, width, height, x, y);
566 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_copy_custom5(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
567 jint regionX, jint regionY, jint width, jint height,
569 return UI_DRAWING_STUB_copyImage(gc, img, regionX, regionY, width, height, x, y);
573 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_copy_custom6(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
574 jint regionX, jint regionY, jint width, jint height,
576 return UI_DRAWING_STUB_copyImage(gc, img, regionX, regionY, width, height, x, y);
580 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_copy_custom7(MICROUI_GraphicsContext *gc, MICROUI_Image *img,
581 jint regionX, jint regionY, jint width, jint height,
583 return UI_DRAWING_STUB_copyImage(gc, img, regionX, regionY, width, height, x, y);
587 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRegion_custom0(MICROUI_GraphicsContext *gc, jint regionX,
588 jint regionY, jint width, jint height, jint x,
589 jint y, jint alpha) {
590 return UI_DRAWING_STUB_drawRegion(gc, regionX, regionY, width, height, x, y, alpha);
594 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRegion_custom1(MICROUI_GraphicsContext *gc, jint regionX,
595 jint regionY, jint width, jint height, jint x,
596 jint y, jint alpha) {
597 return UI_DRAWING_STUB_drawRegion(gc, regionX, regionY, width, height, x, y, alpha);
601 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRegion_custom2(MICROUI_GraphicsContext *gc, jint regionX,
602 jint regionY, jint width, jint height, jint x,
603 jint y, jint alpha) {
604 return UI_DRAWING_STUB_drawRegion(gc, regionX, regionY, width, height, x, y, alpha);
608 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRegion_custom3(MICROUI_GraphicsContext *gc, jint regionX,
609 jint regionY, jint width, jint height, jint x,
610 jint y, jint alpha) {
611 return UI_DRAWING_STUB_drawRegion(gc, regionX, regionY, width, height, x, y, alpha);
615 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRegion_custom4(MICROUI_GraphicsContext *gc, jint regionX,
616 jint regionY, jint width, jint height, jint x,
617 jint y, jint alpha) {
618 return UI_DRAWING_STUB_drawRegion(gc, regionX, regionY, width, height, x, y, alpha);
622 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRegion_custom5(MICROUI_GraphicsContext *gc, jint regionX,
623 jint regionY, jint width, jint height, jint x,
624 jint y, jint alpha) {
625 return UI_DRAWING_STUB_drawRegion(gc, regionX, regionY, width, height, x, y, alpha);
629 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRegion_custom6(MICROUI_GraphicsContext *gc, jint regionX,
630 jint regionY, jint width, jint height, jint x,
631 jint y, jint alpha) {
632 return UI_DRAWING_STUB_drawRegion(gc, regionX, regionY, width, height, x, y, alpha);
636 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRegion_custom7(MICROUI_GraphicsContext *gc, jint regionX,
637 jint regionY, jint width, jint height, jint x,
638 jint y, jint alpha) {
639 return UI_DRAWING_STUB_drawRegion(gc, regionX, regionY, width, height, x, y, alpha);
643 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawFlipped_custom0(MICROUI_GraphicsContext *gc,
644 MICROUI_Image *img, jint regionX,
645 jint regionY, jint width, jint height, jint x,
646 jint y, DRAWING_Flip transformation,
648 return UI_DRAWING_STUB_drawFlippedImage(gc, img, regionX, regionY, width, height, x, y, transformation, alpha);
652 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawFlipped_custom1(MICROUI_GraphicsContext *gc,
653 MICROUI_Image *img, jint regionX,
654 jint regionY, jint width, jint height, jint x,
655 jint y, DRAWING_Flip transformation,
657 return UI_DRAWING_STUB_drawFlippedImage(gc, img, regionX, regionY, width, height, x, y, transformation, alpha);
661 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawFlipped_custom2(MICROUI_GraphicsContext *gc,
662 MICROUI_Image *img, jint regionX,
663 jint regionY, jint width, jint height, jint x,
664 jint y, DRAWING_Flip transformation,
666 return UI_DRAWING_STUB_drawFlippedImage(gc, img, regionX, regionY, width, height, x, y, transformation, alpha);
670 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawFlipped_custom3(MICROUI_GraphicsContext *gc,
671 MICROUI_Image *img, jint regionX,
672 jint regionY, jint width, jint height, jint x,
673 jint y, DRAWING_Flip transformation,
675 return UI_DRAWING_STUB_drawFlippedImage(gc, img, regionX, regionY, width, height, x, y, transformation, alpha);
679 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawFlipped_custom4(MICROUI_GraphicsContext *gc,
680 MICROUI_Image *img, jint regionX,
681 jint regionY, jint width, jint height, jint x,
682 jint y, DRAWING_Flip transformation,
684 return UI_DRAWING_STUB_drawFlippedImage(gc, img, regionX, regionY, width, height, x, y, transformation, alpha);
688 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawFlipped_custom5(MICROUI_GraphicsContext *gc,
689 MICROUI_Image *img, jint regionX,
690 jint regionY, jint width, jint height, jint x,
691 jint y, DRAWING_Flip transformation,
693 return UI_DRAWING_STUB_drawFlippedImage(gc, img, regionX, regionY, width, height, x, y, transformation, alpha);
697 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawFlipped_custom6(MICROUI_GraphicsContext *gc,
698 MICROUI_Image *img, jint regionX,
699 jint regionY, jint width, jint height, jint x,
700 jint y, DRAWING_Flip transformation,
702 return UI_DRAWING_STUB_drawFlippedImage(gc, img, regionX, regionY, width, height, x, y, transformation, alpha);
706 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawFlipped_custom7(MICROUI_GraphicsContext *gc,
707 MICROUI_Image *img, jint regionX,
708 jint regionY, jint width, jint height, jint x,
709 jint y, DRAWING_Flip transformation,
711 return UI_DRAWING_STUB_drawFlippedImage(gc, img, regionX, regionY, width, height, x, y, transformation, alpha);
715 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom0(MICROUI_GraphicsContext *gc,
716 MICROUI_Image *img, jint x,
717 jint y, jint rotationX,
718 jint rotationY, jfloat angle,
720 return UI_DRAWING_STUB_drawRotatedImageNearestNeighbor(gc, img, x, y, rotationX, rotationY, angle, alpha);
724 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom1(MICROUI_GraphicsContext *gc,
725 MICROUI_Image *img, jint x,
726 jint y, jint rotationX,
727 jint rotationY, jfloat angle,
729 return UI_DRAWING_STUB_drawRotatedImageNearestNeighbor(gc, img, x, y, rotationX, rotationY, angle, alpha);
733 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom2(MICROUI_GraphicsContext *gc,
734 MICROUI_Image *img, jint x,
735 jint y, jint rotationX,
736 jint rotationY, jfloat angle,
738 return UI_DRAWING_STUB_drawRotatedImageNearestNeighbor(gc, img, x, y, rotationX, rotationY, angle, alpha);
742 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom3(MICROUI_GraphicsContext *gc,
743 MICROUI_Image *img, jint x,
744 jint y, jint rotationX,
745 jint rotationY, jfloat angle,
747 return UI_DRAWING_STUB_drawRotatedImageNearestNeighbor(gc, img, x, y, rotationX, rotationY, angle, alpha);
751 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom4(MICROUI_GraphicsContext *gc,
752 MICROUI_Image *img, jint x,
753 jint y, jint rotationX,
754 jint rotationY, jfloat angle,
756 return UI_DRAWING_STUB_drawRotatedImageNearestNeighbor(gc, img, x, y, rotationX, rotationY, angle, alpha);
760 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom5(MICROUI_GraphicsContext *gc,
761 MICROUI_Image *img, jint x,
762 jint y, jint rotationX,
763 jint rotationY, jfloat angle,
765 return UI_DRAWING_STUB_drawRotatedImageNearestNeighbor(gc, img, x, y, rotationX, rotationY, angle, alpha);
769 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom6(MICROUI_GraphicsContext *gc,
770 MICROUI_Image *img, jint x,
771 jint y, jint rotationX,
772 jint rotationY, jfloat angle,
774 return UI_DRAWING_STUB_drawRotatedImageNearestNeighbor(gc, img, x, y, rotationX, rotationY, angle, alpha);
778 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor_custom7(MICROUI_GraphicsContext *gc,
779 MICROUI_Image *img, jint x,
780 jint y, jint rotationX,
781 jint rotationY, jfloat angle,
783 return UI_DRAWING_STUB_drawRotatedImageNearestNeighbor(gc, img, x, y, rotationX, rotationY, angle, alpha);
787 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear_custom0(MICROUI_GraphicsContext *gc,
788 MICROUI_Image *img, jint x, jint y,
789 jint rotationX, jint rotationY,
790 jfloat angle, jint alpha) {
791 return UI_DRAWING_STUB_drawRotatedImageBilinear(gc, img, x, y, rotationX, rotationY, angle, alpha);
795 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear_custom1(MICROUI_GraphicsContext *gc,
796 MICROUI_Image *img, jint x, jint y,
797 jint rotationX, jint rotationY,
798 jfloat angle, jint alpha) {
799 return UI_DRAWING_STUB_drawRotatedImageBilinear(gc, img, x, y, rotationX, rotationY, angle, alpha);
803 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear_custom2(MICROUI_GraphicsContext *gc,
804 MICROUI_Image *img, jint x, jint y,
805 jint rotationX, jint rotationY,
806 jfloat angle, jint alpha) {
807 return UI_DRAWING_STUB_drawRotatedImageBilinear(gc, img, x, y, rotationX, rotationY, angle, alpha);
811 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear_custom3(MICROUI_GraphicsContext *gc,
812 MICROUI_Image *img, jint x, jint y,
813 jint rotationX, jint rotationY,
814 jfloat angle, jint alpha) {
815 return UI_DRAWING_STUB_drawRotatedImageBilinear(gc, img, x, y, rotationX, rotationY, angle, alpha);
819 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear_custom4(MICROUI_GraphicsContext *gc,
820 MICROUI_Image *img, jint x, jint y,
821 jint rotationX, jint rotationY,
822 jfloat angle, jint alpha) {
823 return UI_DRAWING_STUB_drawRotatedImageBilinear(gc, img, x, y, rotationX, rotationY, angle, alpha);
827 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear_custom5(MICROUI_GraphicsContext *gc,
828 MICROUI_Image *img, jint x, jint y,
829 jint rotationX, jint rotationY,
830 jfloat angle, jint alpha) {
831 return UI_DRAWING_STUB_drawRotatedImageBilinear(gc, img, x, y, rotationX, rotationY, angle, alpha);
835 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear_custom6(MICROUI_GraphicsContext *gc,
836 MICROUI_Image *img, jint x, jint y,
837 jint rotationX, jint rotationY,
838 jfloat angle, jint alpha) {
839 return UI_DRAWING_STUB_drawRotatedImageBilinear(gc, img, x, y, rotationX, rotationY, angle, alpha);
843 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear_custom7(MICROUI_GraphicsContext *gc,
844 MICROUI_Image *img, jint x, jint y,
845 jint rotationX, jint rotationY,
846 jfloat angle, jint alpha) {
847 return UI_DRAWING_STUB_drawRotatedImageBilinear(gc, img, x, y, rotationX, rotationY, angle, alpha);
851 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom0(MICROUI_GraphicsContext *gc,
852 MICROUI_Image *img, jint x,
853 jint y, jfloat factorX,
854 jfloat factorY, jint alpha) {
855 return UI_DRAWING_STUB_drawScaledImageNearestNeighbor(gc, img, x, y, factorX, factorY, alpha);
859 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom1(MICROUI_GraphicsContext *gc,
860 MICROUI_Image *img, jint x,
861 jint y, jfloat factorX,
862 jfloat factorY, jint alpha) {
863 return UI_DRAWING_STUB_drawScaledImageNearestNeighbor(gc, img, x, y, factorX, factorY, alpha);
867 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom2(MICROUI_GraphicsContext *gc,
868 MICROUI_Image *img, jint x,
869 jint y, jfloat factorX,
870 jfloat factorY, jint alpha) {
871 return UI_DRAWING_STUB_drawScaledImageNearestNeighbor(gc, img, x, y, factorX, factorY, alpha);
875 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom3(MICROUI_GraphicsContext *gc,
876 MICROUI_Image *img, jint x,
877 jint y, jfloat factorX,
878 jfloat factorY, jint alpha) {
879 return UI_DRAWING_STUB_drawScaledImageNearestNeighbor(gc, img, x, y, factorX, factorY, alpha);
883 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom4(MICROUI_GraphicsContext *gc,
884 MICROUI_Image *img, jint x,
885 jint y, jfloat factorX,
886 jfloat factorY, jint alpha) {
887 return UI_DRAWING_STUB_drawScaledImageNearestNeighbor(gc, img, x, y, factorX, factorY, alpha);
891 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom5(MICROUI_GraphicsContext *gc,
892 MICROUI_Image *img, jint x,
893 jint y, jfloat factorX,
894 jfloat factorY, jint alpha) {
895 return UI_DRAWING_STUB_drawScaledImageNearestNeighbor(gc, img, x, y, factorX, factorY, alpha);
899 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom6(MICROUI_GraphicsContext *gc,
900 MICROUI_Image *img, jint x,
901 jint y, jfloat factorX,
902 jfloat factorY, jint alpha) {
903 return UI_DRAWING_STUB_drawScaledImageNearestNeighbor(gc, img, x, y, factorX, factorY, alpha);
907 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor_custom7(MICROUI_GraphicsContext *gc,
908 MICROUI_Image *img, jint x,
909 jint y, jfloat factorX,
910 jfloat factorY, jint alpha) {
911 return UI_DRAWING_STUB_drawScaledImageNearestNeighbor(gc, img, x, y, factorX, factorY, alpha);
915 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear_custom0(MICROUI_GraphicsContext *gc,
916 MICROUI_Image *img, jint x, jint y,
917 jfloat factorX, jfloat factorY,
919 return UI_DRAWING_STUB_drawScaledImageBilinear(gc, img, x, y, factorX, factorY, alpha);
923 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear_custom1(MICROUI_GraphicsContext *gc,
924 MICROUI_Image *img, jint x, jint y,
925 jfloat factorX, jfloat factorY,
927 return UI_DRAWING_STUB_drawScaledImageBilinear(gc, img, x, y, factorX, factorY, alpha);
931 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear_custom2(MICROUI_GraphicsContext *gc,
932 MICROUI_Image *img, jint x, jint y,
933 jfloat factorX, jfloat factorY,
935 return UI_DRAWING_STUB_drawScaledImageBilinear(gc, img, x, y, factorX, factorY, alpha);
939 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear_custom3(MICROUI_GraphicsContext *gc,
940 MICROUI_Image *img, jint x, jint y,
941 jfloat factorX, jfloat factorY,
943 return UI_DRAWING_STUB_drawScaledImageBilinear(gc, img, x, y, factorX, factorY, alpha);
947 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear_custom4(MICROUI_GraphicsContext *gc,
948 MICROUI_Image *img, jint x, jint y,
949 jfloat factorX, jfloat factorY,
951 return UI_DRAWING_STUB_drawScaledImageBilinear(gc, img, x, y, factorX, factorY, alpha);
955 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear_custom5(MICROUI_GraphicsContext *gc,
956 MICROUI_Image *img, jint x, jint y,
957 jfloat factorX, jfloat factorY,
959 return UI_DRAWING_STUB_drawScaledImageBilinear(gc, img, x, y, factorX, factorY, alpha);
963 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear_custom6(MICROUI_GraphicsContext *gc,
964 MICROUI_Image *img, jint x, jint y,
965 jfloat factorX, jfloat factorY,
967 return UI_DRAWING_STUB_drawScaledImageBilinear(gc, img, x, y, factorX, factorY, alpha);
971 BSP_DECLARE_WEAK_FCNT DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear_custom7(MICROUI_GraphicsContext *gc,
972 MICROUI_Image *img, jint x, jint y,
973 jfloat factorX, jfloat factorY,
975 return UI_DRAWING_STUB_drawScaledImageBilinear(gc, img, x, y, factorX, factorY, alpha);
995 static inline bool _can_call_soft_algo(MICROUI_GraphicsContext *gc) {
996 #if !defined(UI_GC_SUPPORTED_FORMATS) || (UI_GC_SUPPORTED_FORMATS <= 1)
1001 return LLUI_DISPLAY_isDisplayFormat(gc->image.format);
1010 DRAWING_Status UI_IMAGE_DRAWING_draw(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX, jint regionY,
1011 jint width, jint height, jint x, jint y, jint alpha) {
1012 return _can_call_soft_algo(gc) ?
1013 UI_DRAWING_SOFT_drawImage(gc, img, regionX, regionY, width, height, x, y, alpha)
1014 : UI_DRAWING_STUB_drawImage(gc, img, regionX, regionY, width, height, x, y, alpha);
1018 DRAWING_Status UI_IMAGE_DRAWING_copy(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX, jint regionY,
1019 jint width, jint height, jint x, jint y) {
1020 return _can_call_soft_algo(gc) ?
1021 UI_DRAWING_SOFT_copyImage(gc, img, regionX, regionY, width, height, x, y)
1022 : UI_DRAWING_STUB_copyImage(gc, img, regionX, regionY, width, height, x, y);
1026 DRAWING_Status UI_IMAGE_DRAWING_drawRegion(MICROUI_GraphicsContext *gc, jint regionX, jint regionY, jint width,
1027 jint height, jint x, jint y, jint alpha) {
1028 return _can_call_soft_algo(gc) ?
1029 UI_DRAWING_SOFT_drawRegion(gc, regionX, regionY, width, height, x, y, alpha)
1030 : UI_DRAWING_STUB_drawRegion(gc, regionX, regionY, width, height, x, y, alpha);
1034 DRAWING_Status UI_IMAGE_DRAWING_drawFlipped(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX, jint regionY,
1035 jint width, jint height, jint x, jint y, DRAWING_Flip transformation,
1037 return _can_call_soft_algo(gc) ?
1038 DW_DRAWING_SOFT_drawFlippedImage(gc, img, regionX, regionY, width, height, x, y, transformation, alpha)
1039 : UI_DRAWING_STUB_drawFlippedImage(gc, img, regionX, regionY, width, height, x, y, transformation, alpha);
1043 DRAWING_Status UI_IMAGE_DRAWING_drawRotatedNearestNeighbor(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x,
1044 jint y, jint rotationX, jint rotationY, jfloat angle,
1046 return _can_call_soft_algo(gc) ?
1047 DW_DRAWING_SOFT_drawRotatedImageNearestNeighbor(gc, img, x, y, rotationX, rotationY, angle, alpha)
1048 : UI_DRAWING_STUB_drawRotatedImageNearestNeighbor(gc, img, x, y, rotationX, rotationY, angle, alpha);
1052 DRAWING_Status UI_IMAGE_DRAWING_drawRotatedBilinear(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x, jint y,
1053 jint rotationX, jint rotationY, jfloat angle, jint alpha) {
1054 return _can_call_soft_algo(gc) ?
1055 DW_DRAWING_SOFT_drawRotatedImageBilinear(gc, img, x, y, rotationX, rotationY, angle, alpha)
1056 : UI_DRAWING_STUB_drawRotatedImageBilinear(gc, img, x, y, rotationX, rotationY, angle, alpha);
1060 DRAWING_Status UI_IMAGE_DRAWING_drawScaledNearestNeighbor(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x,
1061 jint y, jfloat factorX, jfloat factorY, jint alpha) {
1062 return _can_call_soft_algo(gc) ?
1063 DW_DRAWING_SOFT_drawScaledImageNearestNeighbor(gc, img, x, y, factorX, factorY, alpha)
1064 : UI_DRAWING_STUB_drawScaledImageNearestNeighbor(gc, img, x, y, factorX, factorY, alpha);
1068 DRAWING_Status UI_IMAGE_DRAWING_drawScaledBilinear(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x, jint y,
1069 jfloat factorX, jfloat factorY, jint alpha) {
1070 return _can_call_soft_algo(gc) ?
1071 DW_DRAWING_SOFT_drawScaledImageBilinear(gc, img, x, y, factorX, factorY, alpha)
1072 : UI_DRAWING_STUB_drawScaledImageBilinear(gc, img, x, y, factorX, factorY, alpha);
MicroEJ MicroUI library low level API: enable some features according to the hardware capabilities.