16 #if !defined VG_HELPER_H
19 #if defined __cplusplus
38 #if defined MEJ_LOG_INFO_LEVEL && defined MEJ_LOG_MICROVG
39 #define MEJ_LOG_INFO_MICROVG(fmt, ...) MEJ_LOG(INFO, MICROVG, fmt, ## __VA_ARGS__)
41 #define MEJ_LOG_INFO_MICROVG(fmt, ...)
45 #define MEJ_LOG_ERROR_MICROVG(fmt, ...) MEJ_LOG(ERROR, MICROVG, fmt, ## __VA_ARGS__)
57 #define VG_HELPER_NULL_GRADIENT 0
66 #define FT_FACE_FLAG_COMPLEX_LAYOUT (((uint32_t)1) << 31)
69 #define M_PI 3.1415926535
72 #define RAD_TO_DEG(r) ((r) * (180.0f / M_PI))
73 #define DEG_TO_RAD(d) (((d) * M_PI) / 180.0f)
75 #define JFLOAT_TO_UINT32_t(f) (*(uint32_t *)&(f))
76 #define UINT32_t_TO_JFLOAT(i) (*(float *)&(i))
81 #define REGISTERDESC(desc, buf, buf_len) if ((buf_len) >= sizeof(desc)) { (void)memcpy((buf), (desc), sizeof(desc)); }
134 void VG_HELPER_layout_configure(
int faceHandle,
const unsigned short *text,
int length);
147 bool VG_HELPER_layout_load_glyph(uint32_t *glyph_idx,
int *x_advance,
int *y_advance,
int *x_offset,
int *y_offset);
160 const jfloat * VG_HELPER_check_matrix(
const jfloat *matrix);
170 uint32_t VG_HELPER_apply_alpha(uint32_t color, uint32_t alpha);
180 void VG_HELPER_prepare_matrix(jfloat *dest, jfloat x, jfloat y,
const jfloat *matrix);
void LLUI_DISPLAY_waitAsynchronousDrawingEnd(void)
Waits until the end of current asynchronous drawing.
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 ...