microui  14.1.0
microui
ui_drawing_stub.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 Implementation of all drawing functions of ui_drawing_stub.h.
11  * @author MicroEJ Developer Team
12  * @version 14.1.0
13  * @see ui_drawing_stub.h
14  */
15 
16 // --------------------------------------------------------------------------------
17 // Includes
18 // --------------------------------------------------------------------------------
19 
20 #include <stddef.h>
21 
22 #include <LLUI_DISPLAY.h>
23 
24 #include "ui_drawing_stub.h"
25 #include "ui_font_drawing.h"
26 
27 // --------------------------------------------------------------------------------
28 // Private functions
29 // --------------------------------------------------------------------------------
30 
31 static inline DRAWING_Status not_implemented(MICROUI_GraphicsContext *gc) {
32  LLUI_DISPLAY_reportError(gc, DRAWING_LOG_NOT_IMPLEMENTED);
33  return DRAWING_DONE;
34 }
35 
36 // --------------------------------------------------------------------------------
37 // ui_drawing_stub.h functions
38 // --------------------------------------------------------------------------------
39 
40 // See the header file for the function documentation
41 DRAWING_Status UI_DRAWING_STUB_writePixel(MICROUI_GraphicsContext *gc, jint x, jint y) {
42  (void)gc;
43  (void)x;
44  (void)y;
45  return not_implemented(gc);
46 }
47 
48 // See the header file for the function documentation
49 DRAWING_Status UI_DRAWING_STUB_drawLine(MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX, jint endY) {
50  (void)gc;
51  (void)startX;
52  (void)startY;
53  (void)endX;
54  (void)endY;
55  return not_implemented(gc);
56 }
57 
58 // See the header file for the function documentation
59 DRAWING_Status UI_DRAWING_STUB_drawHorizontalLine(MICROUI_GraphicsContext *gc, jint x1, jint x2, jint y) {
60  (void)gc;
61  (void)x1;
62  (void)x2;
63  (void)y;
64  return not_implemented(gc);
65 }
66 
67 // See the header file for the function documentation
68 DRAWING_Status UI_DRAWING_STUB_drawVerticalLine(MICROUI_GraphicsContext *gc, jint x, jint y1, jint y2) {
69  (void)gc;
70  (void)x;
71  (void)y1;
72  (void)y2;
73  return not_implemented(gc);
74 }
75 
76 // See the header file for the function documentation
77 DRAWING_Status UI_DRAWING_STUB_drawRectangle(MICROUI_GraphicsContext *gc, jint x1, jint y1, jint x2, jint y2) {
78  (void)gc;
79  (void)x1;
80  (void)y1;
81  (void)x2;
82  (void)y2;
83  return not_implemented(gc);
84 }
85 
86 // See the header file for the function documentation
87 DRAWING_Status UI_DRAWING_STUB_fillRectangle(MICROUI_GraphicsContext *gc, jint x1, jint y1, jint x2, jint y2) {
88  (void)gc;
89  (void)x1;
90  (void)y1;
91  (void)x2;
92  (void)y2;
93  return not_implemented(gc);
94 }
95 
96 // See the header file for the function documentation
97 DRAWING_Status UI_DRAWING_STUB_drawRoundedRectangle(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
98  jint height, jint cornerEllipseWidth, jint cornerEllipseHeight) {
99  (void)gc;
100  (void)x;
101  (void)y;
102  (void)width;
103  (void)height;
104  (void)cornerEllipseWidth;
105  (void)cornerEllipseHeight;
106  return not_implemented(gc);
107 }
108 
109 // See the header file for the function documentation
110 DRAWING_Status UI_DRAWING_STUB_fillRoundedRectangle(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
111  jint height, jint cornerEllipseWidth, jint cornerEllipseHeight) {
112  (void)gc;
113  (void)x;
114  (void)y;
115  (void)width;
116  (void)height;
117  (void)cornerEllipseWidth;
118  (void)cornerEllipseHeight;
119  return not_implemented(gc);
120 }
121 
122 // See the header file for the function documentation
123 DRAWING_Status UI_DRAWING_STUB_drawCircleArc(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
124  jfloat startAngle, jfloat arcAngle) {
125  (void)gc;
126  (void)x;
127  (void)y;
128  (void)diameter;
129  (void)startAngle;
130  (void)arcAngle;
131  return not_implemented(gc);
132 }
133 
134 // See the header file for the function documentation
135 DRAWING_Status UI_DRAWING_STUB_drawEllipseArc(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height,
136  jfloat startAngle, jfloat arcAngle) {
137  (void)gc;
138  (void)x;
139  (void)y;
140  (void)width;
141  (void)height;
142  (void)startAngle;
143  (void)arcAngle;
144  return not_implemented(gc);
145 }
146 
147 // See the header file for the function documentation
148 DRAWING_Status UI_DRAWING_STUB_fillCircleArc(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
149  jfloat startAngle, jfloat arcAngle) {
150  (void)gc;
151  (void)x;
152  (void)y;
153  (void)diameter;
154  (void)startAngle;
155  (void)arcAngle;
156  return not_implemented(gc);
157 }
158 
159 // See the header file for the function documentation
160 DRAWING_Status UI_DRAWING_STUB_fillEllipseArc(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height,
161  jfloat startAngle, jfloat arcAngle) {
162  (void)gc;
163  (void)x;
164  (void)y;
165  (void)width;
166  (void)height;
167  (void)startAngle;
168  (void)arcAngle;
169  return not_implemented(gc);
170 }
171 
172 // See the header file for the function documentation
173 DRAWING_Status UI_DRAWING_STUB_drawEllipse(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height) {
174  (void)gc;
175  (void)x;
176  (void)y;
177  (void)width;
178  (void)height;
179  return not_implemented(gc);
180 }
181 
182 // See the header file for the function documentation
183 DRAWING_Status UI_DRAWING_STUB_fillEllipse(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height) {
184  (void)gc;
185  (void)x;
186  (void)y;
187  (void)width;
188  (void)height;
189  return not_implemented(gc);
190 }
191 
192 // See the header file for the function documentation
193 DRAWING_Status UI_DRAWING_STUB_drawCircle(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter) {
194  (void)gc;
195  (void)x;
196  (void)y;
197  (void)diameter;
198  return not_implemented(gc);
199 }
200 
201 // See the header file for the function documentation
202 DRAWING_Status UI_DRAWING_STUB_fillCircle(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter) {
203  (void)gc;
204  (void)x;
205  (void)y;
206  (void)diameter;
207  return not_implemented(gc);
208 }
209 
210 // See the header file for the function documentation
211 DRAWING_Status UI_DRAWING_STUB_drawString(MICROUI_GraphicsContext *gc, jchar *chars, jint length, MICROUI_Font *font,
212  jint x, jint y) {
213  (void)gc;
214  (void)chars;
215  (void)length;
216  (void)font;
217  (void)x;
218  (void)y;
219  return not_implemented(gc);
220 }
221 
222 // See the header file for the function documentation
223 jint UI_DRAWING_STUB_stringWidth(jchar *chars, jint length, MICROUI_Font *font) {
224  (void)chars;
225  (void)length;
226  (void)font;
227  return 0;
228 }
229 
230 // See the header file for the function documentation
231 jint UI_DRAWING_STUB_initializeRenderableStringSNIContext(jchar *chars, jint length, MICROUI_Font *font,
232  MICROUI_RenderableString *renderableString) {
233  (void)renderableString;
234  return UI_FONT_DRAWING_stringWidth(chars, length, font);
235 }
236 
237 // See the header file for the function documentation
238 DRAWING_Status UI_DRAWING_STUB_drawRenderableString(MICROUI_GraphicsContext *gc, jchar *chars, jint length,
239  MICROUI_Font *font, jint width,
240  MICROUI_RenderableString *renderableString, jint x, jint y) {
241  (void)width;
242  (void)renderableString;
243  return UI_FONT_DRAWING_drawString(gc, chars, length, font, x, y);
244 }
245 
246 // See the header file for the function documentation
247 DRAWING_Status UI_DRAWING_STUB_drawImage(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX, jint regionY,
248  jint width, jint height, jint x, jint y, jint alpha) {
249  (void)gc;
250  (void)img;
251  (void)regionX;
252  (void)regionY;
253  (void)width;
254  (void)height;
255  (void)x;
256  (void)y;
257  (void)alpha;
258  return not_implemented(gc);
259 }
260 
261 // See the header file for the function documentation
262 DRAWING_Status UI_DRAWING_STUB_copyImage(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX, jint regionY,
263  jint width, jint height, jint x, jint y) {
264  (void)gc;
265  (void)img;
266  (void)regionX;
267  (void)regionY;
268  (void)width;
269  (void)height;
270  (void)x;
271  (void)y;
272  return not_implemented(gc);
273 }
274 
275 // See the header file for the function documentation
276 DRAWING_Status UI_DRAWING_STUB_drawRegion(MICROUI_GraphicsContext *gc, jint regionX, jint regionY, jint width,
277  jint height, jint x, jint y, jint alpha) {
278  (void)gc;
279  (void)regionX;
280  (void)regionY;
281  (void)width;
282  (void)height;
283  (void)x;
284  (void)y;
285  (void)alpha;
286  return not_implemented(gc);
287 }
288 
289 // See the header file for the function documentation
290 DRAWING_Status UI_DRAWING_STUB_drawThickFadedPoint(MICROUI_GraphicsContext *gc, jint x, jint y, jint thickness,
291  jint fade) {
292  (void)gc;
293  (void)x;
294  (void)y;
295  (void)thickness;
296  (void)fade;
297  return not_implemented(gc);
298 }
299 
300 // See the header file for the function documentation
301 DRAWING_Status UI_DRAWING_STUB_drawThickFadedLine(MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX,
302  jint endY, jint thickness, jint fade, DRAWING_Cap startCap,
303  DRAWING_Cap endCap) {
304  (void)gc;
305  (void)startX;
306  (void)startY;
307  (void)endX;
308  (void)endY;
309  (void)thickness;
310  (void)fade;
311  (void)startCap;
312  (void)endCap;
313  return not_implemented(gc);
314 }
315 
316 // See the header file for the function documentation
317 DRAWING_Status UI_DRAWING_STUB_drawThickFadedCircle(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
318  jint thickness, jint fade) {
319  (void)gc;
320  (void)x;
321  (void)y;
322  (void)diameter;
323  (void)thickness;
324  (void)fade;
325  return not_implemented(gc);
326 }
327 
328 // See the header file for the function documentation
329 DRAWING_Status UI_DRAWING_STUB_drawThickFadedCircleArc(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
330  jfloat startAngle, jfloat arcAngle, jint thickness, jint fade,
331  DRAWING_Cap start, DRAWING_Cap end) {
332  (void)gc;
333  (void)x;
334  (void)y;
335  (void)diameter;
336  (void)startAngle;
337  (void)arcAngle;
338  (void)thickness;
339  (void)fade;
340  (void)start;
341  (void)end;
342  return not_implemented(gc);
343 }
344 
345 // See the header file for the function documentation
346 DRAWING_Status UI_DRAWING_STUB_drawThickFadedEllipse(MICROUI_GraphicsContext *gc, jint x, jint y, jint width,
347  jint height, jint thickness, jint fade) {
348  (void)gc;
349  (void)x;
350  (void)y;
351  (void)width;
352  (void)height;
353  (void)thickness;
354  (void)fade;
355  return not_implemented(gc);
356 }
357 
358 // See the header file for the function documentation
359 DRAWING_Status UI_DRAWING_STUB_drawThickLine(MICROUI_GraphicsContext *gc, jint startX, jint startY, jint endX,
360  jint endY, jint thickness) {
361  (void)gc;
362  (void)startX;
363  (void)startY;
364  (void)endX;
365  (void)endY;
366  (void)thickness;
367  return not_implemented(gc);
368 }
369 
370 // See the header file for the function documentation
371 DRAWING_Status UI_DRAWING_STUB_drawThickCircle(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
372  jint thickness) {
373  (void)gc;
374  (void)x;
375  (void)y;
376  (void)diameter;
377  (void)thickness;
378  return not_implemented(gc);
379 }
380 
381 // See the header file for the function documentation
382 DRAWING_Status UI_DRAWING_STUB_drawThickEllipse(MICROUI_GraphicsContext *gc, jint x, jint y, jint width, jint height,
383  jint thickness) {
384  (void)gc;
385  (void)x;
386  (void)y;
387  (void)width;
388  (void)height;
389  (void)thickness;
390  return not_implemented(gc);
391 }
392 
393 // See the header file for the function documentation
394 DRAWING_Status UI_DRAWING_STUB_drawThickCircleArc(MICROUI_GraphicsContext *gc, jint x, jint y, jint diameter,
395  jfloat startAngle, jfloat arcAngle, jint thickness) {
396  (void)gc;
397  (void)x;
398  (void)y;
399  (void)diameter;
400  (void)startAngle;
401  (void)arcAngle;
402  (void)thickness;
403  return not_implemented(gc);
404 }
405 
406 // See the header file for the function documentation
407 DRAWING_Status UI_DRAWING_STUB_drawFlippedImage(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint regionX,
408  jint regionY, jint width, jint height, jint x, jint y,
409  DRAWING_Flip transformation, jint alpha) {
410  (void)gc;
411  (void)img;
412  (void)regionX;
413  (void)regionY;
414  (void)width;
415  (void)height;
416  (void)x;
417  (void)y;
418  (void)transformation;
419  (void)alpha;
420  return not_implemented(gc);
421 }
422 
423 // See the header file for the function documentation
424 DRAWING_Status UI_DRAWING_STUB_drawRotatedImageNearestNeighbor(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x,
425  jint y, jint rotationX, jint rotationY, jfloat angle,
426  jint alpha) {
427  (void)gc;
428  (void)img;
429  (void)x;
430  (void)y;
431  (void)rotationX;
432  (void)rotationY;
433  (void)angle;
434  (void)alpha;
435  return not_implemented(gc);
436 }
437 
438 // See the header file for the function documentation
439 DRAWING_Status UI_DRAWING_STUB_drawRotatedImageBilinear(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x, jint y,
440  jint rotationX, jint rotationY, jfloat angle, jint alpha) {
441  (void)gc;
442  (void)img;
443  (void)x;
444  (void)y;
445  (void)rotationX;
446  (void)rotationY;
447  (void)angle;
448  (void)alpha;
449  return not_implemented(gc);
450 }
451 
452 // See the header file for the function documentation
453 DRAWING_Status UI_DRAWING_STUB_drawScaledImageNearestNeighbor(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x,
454  jint y, jfloat factorX, jfloat factorY, jint alpha) {
455  (void)gc;
456  (void)img;
457  (void)x;
458  (void)y;
459  (void)factorX;
460  (void)factorY;
461  (void)alpha;
462  return not_implemented(gc);
463 }
464 
465 // See the header file for the function documentation
466 DRAWING_Status UI_DRAWING_STUB_drawScaledImageBilinear(MICROUI_GraphicsContext *gc, MICROUI_Image *img, jint x, jint y,
467  jfloat factorX, jfloat factorY, jint alpha) {
468  (void)gc;
469  (void)img;
470  (void)x;
471  (void)y;
472  (void)factorX;
473  (void)factorY;
474  (void)alpha;
475  return not_implemented(gc);
476 }
477 
478 // See the header file for the function documentation
479 DRAWING_Status UI_DRAWING_STUB_drawScaledStringBilinear(MICROUI_GraphicsContext *gc, jchar *chars, jint length,
480  MICROUI_Font *font, jint x, jint y, jfloat xRatio,
481  jfloat yRatio) {
482  (void)gc;
483  (void)chars;
484  (void)length;
485  (void)font;
486  (void)x;
487  (void)y;
488  (void)xRatio;
489  (void)yRatio;
490  return not_implemented(gc);
491 }
492 
493 // See the header file for the function documentation
494 DRAWING_Status UI_DRAWING_STUB_drawScaledRenderableStringBilinear(MICROUI_GraphicsContext *gc, jchar *chars,
495  jint length, MICROUI_Font *font, jint width,
496  MICROUI_RenderableString *renderableString, jint x,
497  jint y, jfloat xRatio, jfloat yRatio) {
498  (void)width;
499  (void)renderableString;
500  return UI_FONT_DRAWING_drawScaledStringBilinear(gc, chars, length, font, x, y, xRatio, yRatio);
501 }
502 
503 // See the header file for the function documentation
504 DRAWING_Status UI_DRAWING_STUB_drawCharWithRotationBilinear(MICROUI_GraphicsContext *gc, jchar c, MICROUI_Font *font,
505  jint x, jint y, jint xRotation, jint yRotation,
506  jfloat angle, jint alpha) {
507  (void)gc;
508  (void)c;
509  (void)font;
510  (void)x;
511  (void)y;
512  (void)xRotation;
513  (void)yRotation;
514  (void)angle;
515  (void)alpha;
516  return not_implemented(gc);
517 }
518 
519 // See the header file for the function documentation
520 DRAWING_Status UI_DRAWING_STUB_drawCharWithRotationNearestNeighbor(MICROUI_GraphicsContext *gc, jchar c,
521  MICROUI_Font *font, jint x, jint y, jint xRotation,
522  jint yRotation, jfloat angle, jint alpha) {
523  (void)gc;
524  (void)c;
525  (void)font;
526  (void)x;
527  (void)y;
528  (void)xRotation;
529  (void)yRotation;
530  (void)angle;
531  (void)alpha;
532  return not_implemented(gc);
533 }
534 
535 // --------------------------------------------------------------------------------
536 // EOF
537 // --------------------------------------------------------------------------------