microvg  8.0.3
microvg
vg_drawing.h
Go to the documentation of this file.
1 /*
2  * Copyright 2023-2026 MicroEJ Corp. All rights reserved.
3  * MicroEJ Corp. PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4  */
5 
6 #if !defined VG_DRAWING_H
7 #define VG_DRAWING_H
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
22 // --------------------------------------------------------------------------------
23 // Includes
24 // --------------------------------------------------------------------------------
25 
26 #include <LLVG_PAINTER_impl.h>
27 
28 #include "ui_drawing.h"
29 
30 // --------------------------------------------------------------------------------
31 // API
32 // --------------------------------------------------------------------------------
33 
40 
49 bool VG_DRAWING_image_is_closed(const MICROVG_Image *image);
50 
58 void VG_DRAWING_get_image_size(const MICROVG_Image *image, float *width, float *height);
59 
72 DRAWING_Status VG_DRAWING_drawPath(MICROUI_GraphicsContext *gc, jbyte *path, jfloat *matrix, jint fillRule, jint blend,
73  jint color);
74 
89 DRAWING_Status VG_DRAWING_drawGradient(MICROUI_GraphicsContext *gc, jbyte *path, jfloat *matrix, jint fillRule,
90  jint alpha, jint blend, jint *gradient, jfloat *gradientMatrix);
91 
110 DRAWING_Status VG_DRAWING_drawString(MICROUI_GraphicsContext *gc, jchar *text, jint length, jint faceHandle,
111  jfloat size, jfloat *matrix, jint alpha, jint blend, jfloat letterSpacing);
112 
130 DRAWING_Status VG_DRAWING_drawStringGradient(MICROUI_GraphicsContext *gc, jchar *text, jint length, jint faceHandle,
131  jfloat size, jfloat *matrix, jint alpha, jint blend, jfloat letterSpacing,
132  jint *gradientData, jfloat *gradientMatrix);
133 
151 DRAWING_Status VG_DRAWING_drawStringOnCircle(MICROUI_GraphicsContext *gc, jchar *text, jint length, jint faceHandle,
152  jfloat size, jfloat *matrix, jint alpha, jint blend, jfloat letterSpacing,
153  jfloat radius, jint direction);
154 
174 DRAWING_Status VG_DRAWING_drawStringOnCircleGradient(MICROUI_GraphicsContext *gc, jchar *text, jint length,
175  jint faceHandle, jfloat size, jfloat *matrix, jint alpha,
176  jint blend, jfloat letterSpacing, jfloat radius, jint direction,
177  jint *gradientData, jfloat *gradientMatrix);
178 
192 DRAWING_Status VG_DRAWING_drawImage(MICROUI_GraphicsContext *gc, void *image, jfloat *matrix, jint alpha, jlong elapsed,
193  const float color_matrix[], jint *errno);
194 
195 // --------------------------------------------------------------------------------
196 // EOF
197 // --------------------------------------------------------------------------------
198 
199 #ifdef __cplusplus
200 }
201 #endif
202 #endif // VG_DRAWING_H
DRAWING_Status VG_DRAWING_drawStringOnCircleGradient(MICROUI_GraphicsContext *gc, jchar *text, jint length, jint faceHandle, jfloat size, jfloat *matrix, jint alpha, jint blend, jfloat letterSpacing, jfloat radius, jint direction, jint *gradientData, jfloat *gradientMatrix)
Draws a string along a circle, with a linear gradient.
void VG_DRAWING_get_image_size(const MICROVG_Image *image, float *width, float *height)
Gets the image size. The image structure format is VEE Port specific.
bool VG_DRAWING_image_is_closed(const MICROVG_Image *image)
Tells if the image is closed (closed just before calling the native function).
DRAWING_Status VG_DRAWING_drawString(MICROUI_GraphicsContext *gc, jchar *text, jint length, jint faceHandle, jfloat size, jfloat *matrix, jint alpha, jint blend, jfloat letterSpacing)
Draws a string with the color of the Graphics Context.
void VG_DRAWING_initialize(void)
Called when initializing MicroVG.
DRAWING_Status VG_DRAWING_drawImage(MICROUI_GraphicsContext *gc, void *image, jfloat *matrix, jint alpha, jlong elapsed, const float color_matrix[], jint *errno)
Draws an image with transformation and opacity. Optionally apply an animation and / or a color filter...
DRAWING_Status VG_DRAWING_drawPath(MICROUI_GraphicsContext *gc, jbyte *path, jfloat *matrix, jint fillRule, jint blend, jint color)
Draws a path filled with the specified color (not the one of the Graphics Context).
DRAWING_Status VG_DRAWING_drawStringOnCircle(MICROUI_GraphicsContext *gc, jchar *text, jint length, jint faceHandle, jfloat size, jfloat *matrix, jint alpha, jint blend, jfloat letterSpacing, jfloat radius, jint direction)
Draws a string along a circle, with the color of the Graphics Context.
DRAWING_Status VG_DRAWING_drawGradient(MICROUI_GraphicsContext *gc, jbyte *path, jfloat *matrix, jint fillRule, jint alpha, jint blend, jint *gradient, jfloat *gradientMatrix)
Draws a path filled with a linear gradient.
DRAWING_Status VG_DRAWING_drawStringGradient(MICROUI_GraphicsContext *gc, jchar *text, jint length, jint faceHandle, jfloat size, jfloat *matrix, jint alpha, jint blend, jfloat letterSpacing, jint *gradientData, jfloat *gradientMatrix)
Draws a string with a linear gradient.