lv_svg_token.h

Defines

SVG_TOKEN_LEN(t)

Typedefs

typedef bool (*svg_token_process)(_lv_svg_token_t *token, void *user_data)

Enums

enum _lv_svg_token_type_t

Values:

enumerator LV_SVG_TOKEN_BEGIN
enumerator LV_SVG_TOKEN_END
enumerator LV_SVG_TOKEN_CONTENT

Functions

bool _lv_svg_tokenizer(const char *svg_data, uint32_t len, svg_token_process cb, void *user_data)

Parse SVG data and call a callback for each token.

参数:
  • svg_data -- pointer to SVG data

  • len -- length of the SVG data

  • cb -- callback function to be called for each token

  • user_data -- custom data to be passed to the callback function

返回:

true: SVG data successfully parsed, false: error occurred

struct _lv_svg_token_attr_t

Public Members

const char *name_start
const char *name_end
const char *value_start
const char *value_end
struct _lv_svg_token_t

Public Members

const char *start
const char *end
_lv_svg_token_type_t type
bool flat
_lv_svg_token_attr_t *cur_attr
lv_array_t attrs