lv_svg_parser.h

Enums

enum _lv_svg_parser_state_t

Values:

enumerator LV_SVG_PARSER_PROCESS
enumerator LV_SVG_PARSER_IGNORE

Functions

void _lv_svg_parser_init(_lv_svg_parser_t *parser)

Initialize the SVG parser.

参数:

parser -- pointer to a parser object

void _lv_svg_parser_deinit(_lv_svg_parser_t *parser)

Deinitialize the SVG parser.

参数:

parser -- pointer to a parser object

bool _lv_svg_parser_token(_lv_svg_parser_t *parser, const _lv_svg_token_t *token)

Parse an SVG document.

参数:
  • parser -- pointer to a parser object

  • token -- pointer to a token object

返回:

true: the parsing is finished, false: the parsing is not finished yet.

bool _lv_svg_parser_is_finish(_lv_svg_parser_t *parser)

Check if the parsing is finished.

参数:

parser -- pointer to a parser object

返回:

true: the parsing is finished, false: the parsing is not finished yet.

void _lv_svg_dump_tree(lv_svg_node_t *root, int depth)

Dump the SVG tree.

参数:
  • root -- pointer to the root of the SVG tree

  • depth -- the depth of the current node in the tree

struct _lv_svg_parser_t

Public Members

uint16_t state
char *ignore_name
uint32_t ignore_len
int32_t dpi
lv_svg_node_t *doc_root
lv_svg_node_t *cur_node