15 #if !defined VG_PATH_H
18 #if defined __cplusplus
24 #ifdef VG_FEATURE_PATH
37 #if defined(VG_FEATURE_PATH_DUAL_ARRAY) && (VG_FEATURE_PATH == VG_FEATURE_PATH_DUAL_ARRAY)
42 typedef uint8_t VG_path_command_t;
47 typedef float VG_path_param_t;
55 #if defined(VG_FEATURE_PATH_SINGLE_ARRAY) && (VG_FEATURE_PATH == VG_FEATURE_PATH_SINGLE_ARRAY)
193 jfloat y2, jfloat x3, jfloat y3);
204 #if defined(VG_FEATURE_PATH_DUAL_ARRAY) && (VG_FEATURE_PATH == VG_FEATURE_PATH_DUAL_ARRAY)
212 static inline VG_path_param_t * VG_PATH_get_path_param_begin(
VG_PATH_HEADER_t *path) {
223 static inline VG_path_param_t * VG_PATH_get_path_param_end(
VG_PATH_HEADER_t *path) {
224 return (VG_PATH_get_path_param_begin(path)) + path->param_length;
233 static inline VG_path_command_t * VG_PATH_get_path_command_begin(
VG_PATH_HEADER_t *path) {
234 return ((uint8_t *)VG_PATH_get_path_param_begin(path)) + path->cmd_offset;
243 static inline VG_path_command_t * VG_PATH_get_path_command_end(
VG_PATH_HEADER_t *path) {
244 return (VG_PATH_get_path_command_begin(path)) + path->cmd_length;
Map a jbyte array that represents a path.
MicroEJ MicroVG library low level API: enable some features according to the hardware capacities.
uint32_t VG_PATH_append_path_command1(jbyte *path, jint array_length, jint cmd, jfloat x, jfloat y)
Appends the command with 1 point parameter in the path's array.
void VG_PATH_initialize(void)
Initializes the path builder.
uint32_t VG_PATH_append_path_command0(jbyte *path, jint array_length, jint cmd)
Appends the command with zero parameter in the path's array.
uint32_t VG_PATH_get_command_parameter_number(jint command)
Gets the number of parameters for a specific command.
uint32_t VG_PATH_append_path_command3(jbyte *path, jint array_length, jint cmd, jfloat x1, jfloat y1, jfloat x2, jfloat y2, jfloat x3, jfloat y3)
Appends the command with 3 points parameter in the path's array.
uint32_t VG_PATH_convert_path_command(jint command)
Converts the command in destination format.
uint32_t VG_PATH_append_path_command2(jbyte *path, jint array_length, jint cmd, jfloat x1, jfloat y1, jfloat x2, jfloat y2)
Appends the command with 2 points parameter in the path's array.
struct MICROVG_PATH_HEADER VG_PATH_HEADER_t
Map a jbyte array that represents a path.
uint32_t VG_PATH_get_path_command_size(jint command, uint32_t nbParams)
Gets the size to add in the path array to encode the command and its parameters.
uint32_t VG_PATH_get_path_header_size(void)
Gets the path's array header size.
uint8_t VG_PATH_get_path_encoder_format(void)
Gets the path's array format used to encode the commands and parameters. This format is stored into t...