![]() |
microvg
8.0.3
microvg
|
MicroEJ MicroVG library low level API: helper to implement library natives methods. More...
#include "vg_configuration.h"#include <LLVG_MATRIX_impl.h>#include "vg_helper.h"#include "vg_trace.h"#include "vg_drawing.h"#include "bsp_util.h"Go to the source code of this file.
Functions | |
| void | LLVG_IMPL_initialize (jint trace_group) |
| BSP_DECLARE_WEAK_FCNT void | LLUI_DISPLAY_waitAsynchronousDrawingEnd (void) |
| Waits until the end of current asynchronous drawing. More... | |
| int | VG_HELPER_get_utf (const unsigned short *textCharRam, int length, int *offset) |
| Gets the UTF character from a text buffer at the given offset and updates the offset to point to the next character. More... | |
| const jfloat * | VG_HELPER_check_matrix (const jfloat *matrix) |
| Checks if the matrix is null. In that case, returns an identity matrix. This allows to prevent to make some checks on the matrix in the algorithms. More... | |
| uint32_t | VG_HELPER_apply_alpha (uint32_t color, uint32_t alpha) |
| Applies the global opacity on given color. More... | |
| void | VG_HELPER_prepare_matrix (jfloat *dest, jfloat x, jfloat y, const jfloat *matrix) |
| Converts a MicroVG matrix in another MicroVG matrix applying a translation. More... | |
Variables | |
| int32_t | LLVG_TRACE_group |
| Identifies the MicroVG group to trace an event. | |
MicroEJ MicroVG library low level API: helper to implement library natives methods.
Definition in file vg_helper.c.
| BSP_DECLARE_WEAK_FCNT void LLUI_DISPLAY_waitAsynchronousDrawingEnd | ( | void | ) |
Waits until the end of current asynchronous drawing.
To avoid potential side effects from the release of objects (images, fonts) retained by a feature during the killing of that feature, ensure that no third-party components (e.g., GPU) are using these objects at the time of the kill.
UI packs with versions higher than 14.5.1 provide the blocking API LLUI_DISPLAY_waitAsynchronousDrawingEnd(). This API is stubbed on the VG Pack for backward compatibility issues between VG Pack 1.8.0 and UI Packs [14.4.0, 14.5.1]. However, it is highly recommended to use a UI Pack version greater than 14.5.1.
Definition at line 157 of file vg_helper.c.
| uint32_t VG_HELPER_apply_alpha | ( | uint32_t | color, |
| uint32_t | alpha | ||
| ) |
Applies the global opacity on given color.
| [in] | color | the 32-bit color. |
| [in] | alpha | the opacity. |
Definition at line 352 of file vg_helper.c.
| const jfloat* VG_HELPER_check_matrix | ( | const jfloat * | matrix | ) |
Checks if the matrix is null. In that case, returns an identity matrix. This allows to prevent to make some checks on the matrix in the algorithms.
The identity matrix can be used several times by the same algorithm. The caller must not modify it (read-only matrix).
| [in] | matrix | the matrix to check |
Definition at line 347 of file vg_helper.c.
| int VG_HELPER_get_utf | ( | const unsigned short * | text, |
| int | length, | ||
| int * | offset | ||
| ) |
Gets the UTF character from a text buffer at the given offset and updates the offset to point to the next character.
Some characters have some special values; they are made up of two Unicode characters in two specific ranges such that the first Unicode character is in one range (for example 0xD800-0xD8FF) and the second Unicode character is in the second range (for example 0xDC00-0xDCFF). This is called a surrogate pair.
If a surrogate pair is incomplete (missing second character), this function returns "0" (error) and does not update the offset.
| [in] | text | text buffer encoded in UTF16 where to read UTF character. |
| [in] | length | lenght of the text buffer. |
| [in,out] | offset | offset in the text buffer where to read UTF character. Updated to the next character position. |
Definition at line 166 of file vg_helper.c.
| void VG_HELPER_prepare_matrix | ( | jfloat * | dest, |
| jfloat | x, | ||
| jfloat | y, | ||
| const jfloat * | matrix | ||
| ) |
Converts a MicroVG matrix in another MicroVG matrix applying a translation.
| [out] | dest | the MicroVG matrix to set |
| [in] | x | the X translation to apply |
| [in] | y | the Y translation to apply |
| [in] | matrix | the MicroVG transformation to apply (can be null) |
Definition at line 358 of file vg_helper.c.
1.9.1