microvg  8.0.3
microvg
Functions
vg_drawing.h File Reference

Provides drawing functions called by MicroVG native drawing functions. More...

#include <LLVG_PAINTER_impl.h>
#include "ui_drawing.h"

Go to the source code of this file.

Functions

void VG_DRAWING_initialize (void)
 Called when initializing MicroVG. More...
 
bool VG_DRAWING_image_is_closed (const MICROVG_Image *image)
 Tells if the image is closed (closed just before calling the native function). More...
 
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. More...
 
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). More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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 filtering. More...
 

Detailed Description

Provides drawing functions called by MicroVG native drawing functions.

This header file follows strictly the same concept as ui_drawing.h but for MicroVG library.

See also
ui_drawing.h

Definition in file vg_drawing.h.

Function Documentation

◆ VG_DRAWING_drawGradient()

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.

Parameters
[in]gcthe destination
[in]paththe path's data
[in]matrixthe deformation to apply
[in]fillRulethe fill type
[in]alphathe global opacity to apply
[in]blendthe blend mode
[in]gradientthe gradient to apply
[in]gradientMatrixthe gradient deformation, may be null (means identity)
Returns
the drawing status.

◆ VG_DRAWING_drawImage()

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 filtering.

Parameters
[in]gcthe graphics context to draw on
[in]imagethe image to draw
[in]matrixthe transformation matrix to apply
[in]alphathe global opacity rendering value
[in]elapsedthe elapsed time since the beginning of the animation, in milliseconds
[in]color_matrixthe color matrix used to transform colors, may be null (means no color deformation)
[out]errnothe error code to return to MicroVG.
Returns
the drawing status.

◆ VG_DRAWING_drawPath()

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).

Parameters
[in]gcthe destination
[in]paththe path's data
[in]matrixthe deformation to apply
[in]fillRulethe fill type
[in]blendthe blend mode
[in]colorthe color to apply (with an opacity)
Returns
the drawing status.

◆ VG_DRAWING_drawString()

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.

The top/left position of the first drawn character is placed at coordinate x/y.

Parameters
[in]gcthe MicroUI GraphicsContext target.
[in]textthe array of characters to draw.
[in]lengththe length of the array
[in]faceHandlethe font reference handle.
[in]sizethe height of the font in pixels.
[in]matrixdeformation matrix, may be null (means identity)
[in]alphathe opacity level to apply to the character.
[in]blendthe blend mode to use
[in]letterSpacingthe extra letter spacing to use
Returns
the drawing status.

◆ VG_DRAWING_drawStringGradient()

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.

Parameters
[in]gcthe MicroUI GraphicsContext target.
[in]textthe array of characters to draw.
[in]lengththe length of the array
[in]faceHandlethe font reference handle.
[in]sizethe height of the font in pixels.
[in]matrixdeformation matrix, may be null (means identity)
[in]alphathe opacity level to apply to the character.
[in]blendthe blend mode to use
[in]letterSpacingthe extra letter spacing to use
[in]gradientDatathe gradient to apply
[in]gradientMatrixthe gradient deformation, may be null (means identity)
Returns
the drawing status.

◆ VG_DRAWING_drawStringOnCircle()

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.

Parameters
[in]gcthe MicroUI GraphicsContext target.
[in]textthe array of characters to draw.
[in]lengththe length of the array
[in]faceHandlethe font reference handle.
[in]sizethe height of the font in pixels.
[in]matrixdeformation matrix, may be null (means identity)
[in]alphathe opacity level to apply to the character.
[in]blendthe blend mode to use
[in]letterSpacingthe extra letter spacing to use
[in]radiusthe radius of the circle
[in]directionthe direction of the text along the circle
Returns
the drawing status.

◆ VG_DRAWING_drawStringOnCircleGradient()

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.

Parameters
[in]gcthe MicroUI GraphicsContext target.
[in]textthe array of characters to draw.
[in]lengththe length of the array
[in]faceHandlethe font reference handle.
[in]sizethe height of the font in pixels.
[in]matrixdeformation matrix, may be null (means identity)
[in]alphathe opacity level to apply to the character.
[in]blendthe blend mode to use
[in]letterSpacingthe extra letter spacing to use
[in]radiusthe radius of the circle
[in]directionthe direction of the text along the circle
[in]gradientDatathe gradient to apply
[in]gradientMatrixthe gradient deformation, may be null (means identity)
Returns
the drawing status.

◆ VG_DRAWING_get_image_size()

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.

Parameters
[in]imagethe image
[out]widththe image width
[out]heightthe image height

◆ VG_DRAWING_image_is_closed()

bool VG_DRAWING_image_is_closed ( const MICROVG_Image *  image)

Tells if the image is closed (closed just before calling the native function).

Parameters
[in]imagethe image to check.
Returns
true if the image is closed.

◆ VG_DRAWING_initialize()

void VG_DRAWING_initialize ( void  )

Called when initializing MicroVG.

This function should initialize the necessary variables.