lv_svg_render.h¶
Defines
-
LV_SVG_RENDER_OBJ(n)¶
Typedefs
-
typedef struct _lv_svg_render_obj lv_svg_render_obj_t¶
-
typedef struct _lv_svg_render_class lv_svg_render_class¶
-
typedef struct _lv_svg_render_hal lv_svg_render_hal_t¶
Functions
-
void lv_svg_render_init(const lv_svg_render_hal_t *hal)¶
Initialize the SVG render.
- Parameters:
hal – pointer to a structure with rendering functions
-
lv_svg_render_obj_t *lv_svg_render_create(const lv_svg_node_t *svg_doc)¶
Create a new SVG render from an SVG document.
- Parameters:
svg_doc – pointer to the SVG document
- Returns:
pointer to the new SVG render object
-
void lv_svg_render_delete(lv_svg_render_obj_t *render)¶
Delete an SVG render object.
- Parameters:
render – pointer to the SVG render object to delete
-
uint32_t lv_svg_render_get_size(const lv_svg_render_obj_t *render)¶
Get size of render objects.
- Parameters:
render – pointer to the SVG render object
- Returns:
the bytes of SVG render objects
-
lv_result_t lv_svg_render_get_viewport_size(const lv_svg_render_obj_t *render, float *width, float *height)¶
Get viewport's width and height of the render object.
- Parameters:
render – pointer to the SVG render object
width – pointer to save the width of the viewport of the SVG render object
height – pointer to save the height of the viewport of the SVG render object
- Returns:
lv_result_t, LV_RESULT_OK if success, LV_RESULT_INVALID if fail
-
void lv_draw_svg_render(lv_vector_dsc_t *dsc, const lv_svg_render_obj_t *render)¶
Render an SVG object to a vector graphics.
- Parameters:
dsc – pointer to the vector graphics descriptor
render – pointer to the SVG render object to render
-
void lv_draw_svg(lv_layer_t *layer, const lv_svg_node_t *svg_doc)¶
Draw an SVG document to a layer.
- Parameters:
layer – pointer to the target layer
svg_doc – pointer to the SVG document to draw
-
struct _lv_svg_render_obj¶
Public Members
-
struct _lv_svg_render_obj *next¶
-
lv_svg_tag_t tag¶
-
uint32_t flags¶
-
char *id¶
-
lv_vector_draw_dsc_t dsc¶
-
lv_matrix_t matrix¶
-
struct _lv_svg_render_obj *head¶
-
char *fill_ref¶
-
char *stroke_ref¶
-
struct _lv_svg_render_class *clz¶
-
struct _lv_svg_render_obj *next¶
-
struct _lv_svg_render_class¶
Public Members
-
void (*set_paint_ref)(struct _lv_svg_render_obj *obj, lv_vector_draw_dsc_t *dsc, const struct _lv_svg_render_obj *target_obj, bool fill)¶
-
void (*init)(struct _lv_svg_render_obj *obj, const lv_svg_node_t *node)¶
-
void (*render)(const struct _lv_svg_render_obj *obj, lv_vector_dsc_t *dsc, const lv_matrix_t *matrix)¶
-
void (*set_attr)(struct _lv_svg_render_obj *obj, lv_vector_draw_dsc_t *dsc, const lv_svg_attr_t *attr)¶
-
void (*get_bounds)(const struct _lv_svg_render_obj *obj, lv_area_t *area)¶
-
void (*get_size)(const struct _lv_svg_render_obj *obj, uint32_t *size)¶
-
void (*destroy)(struct _lv_svg_render_obj *obj)¶
-
void (*set_paint_ref)(struct _lv_svg_render_obj *obj, lv_vector_draw_dsc_t *dsc, const struct _lv_svg_render_obj *target_obj, bool fill)¶
-
struct _lv_svg_render_hal¶