lv_draw_vector.h

API reference for lv_draw_vector.h

Report on GitHub
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_draw_vector_private.h

Functions

lv_draw_vector_dsc_set_transform

Set a matrix to current transformation matrix. The new path shapes added by lv_draw_vector_dsc_add_path will use this matrix.

 
void lv_draw_vector_dsc_set_transform(lv_draw_vector_dsc_t *dsc, const lv_matrix_t *matrix)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
matrixconst lv_matrix_t *pointer to a matrix

lv_draw_vector_dsc_set_blend_mode

Set blend mode for descriptor. The new path shapes added by lv_draw_vector_dsc_add_path will use this blend mode.

 
void lv_draw_vector_dsc_set_blend_mode(lv_draw_vector_dsc_t *dsc, lv_vector_blend_t blend)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
blendlv_vector_blend_tthe blend mode to be set in lv_vector_blend_t

lv_draw_vector_dsc_set_fill_color32

Set the fill color for descriptor. The new path shapes added by lv_draw_vector_dsc_add_path will use this color.

 
void lv_draw_vector_dsc_set_fill_color32(lv_draw_vector_dsc_t *dsc, lv_color32_t color)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
colorlv_color32_tthe color to be set in lv_color32_t format

lv_draw_vector_dsc_set_fill_color

Set fill color for descriptor. The new path shapes added by lv_draw_vector_dsc_add_path will use this color.

 
void lv_draw_vector_dsc_set_fill_color(lv_draw_vector_dsc_t *dsc, lv_color_t color)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
colorlv_color_tthe color to be set in lv_color_t format

lv_draw_vector_dsc_set_fill_opa

Set fill opacity for descriptor. The new path shapes added by lv_draw_vector_dsc_add_path will use this opacity.

 
void lv_draw_vector_dsc_set_fill_opa(lv_draw_vector_dsc_t *dsc, lv_opa_t opa)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
opalv_opa_tthe opacity to be set in lv_opa_t format

lv_draw_vector_dsc_set_fill_rule

Set fill rule for descriptor. The new path shapes added by lv_draw_vector_dsc_add_path will use this fill rule.

 
void lv_draw_vector_dsc_set_fill_rule(lv_draw_vector_dsc_t *dsc, lv_vector_fill_t rule)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
rulelv_vector_fill_tthe fill rule to be set in lv_vector_fill_t format

lv_draw_vector_dsc_set_fill_units

Set the fill units for descriptor. The new path shapes added by lv_draw_vector_dsc_add_path will use this fill units.

 
void lv_draw_vector_dsc_set_fill_units(lv_draw_vector_dsc_t *dsc, const lv_vector_fill_units_t units)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
unitsconst lv_vector_fill_units_tthe units to be set in lv_vector_fill_units_t format

The units can be either relative to the object bounding box or absolute in user space. This API specifically affects the drawing position of the fill image and does not impact other elements.

lv_draw_vector_dsc_set_fill_image

Set fill image for descriptor. The new path shapes added by lv_draw_vector_dsc_add_path will use this fill image.

 
void lv_draw_vector_dsc_set_fill_image(lv_draw_vector_dsc_t *dsc, const lv_draw_image_dsc_t *img_dsc)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
img_dscconst lv_draw_image_dsc_t *pointer to a lv_draw_image_dsc_t variable

lv_draw_vector_dsc_set_fill_linear_gradient

Set fill linear gradient for descriptor The new path shapes added by lv_draw_vector_dsc_add_path will use this gradient.

 
void lv_draw_vector_dsc_set_fill_linear_gradient(lv_draw_vector_dsc_t *dsc, float x1, float y1, float x2, float y2)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
x1floatthe x for start point
y1floatthe y for start point
x2floatthe x for end point
y2floatthe y for end point

lv_draw_vector_dsc_set_fill_radial_gradient

Set fill radial gradient radius for descriptor The new path shapes added by lv_draw_vector_dsc_add_path will use this gradient.

 
void lv_draw_vector_dsc_set_fill_radial_gradient(lv_draw_vector_dsc_t *dsc, float cx, float cy, float radius)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
cxfloatthe x for center of the circle
cyfloatthe y for center of the circle
radiusfloatthe radius for circle

lv_draw_vector_dsc_set_fill_gradient_spread

Set fill radial gradient spread for descriptor

 
void lv_draw_vector_dsc_set_fill_gradient_spread(lv_draw_vector_dsc_t *dsc, lv_vector_gradient_spread_t spread)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
spreadlv_vector_gradient_spread_tthe gradient spread to be set in lv_vector_gradient_spread_t format

lv_draw_vector_dsc_set_fill_gradient_color_stops

Set fill gradient color stops for descriptor. The new path shapes added by lv_draw_vector_dsc_add_path will use this gradient color stops.

 
void lv_draw_vector_dsc_set_fill_gradient_color_stops(lv_draw_vector_dsc_t *dsc, const lv_grad_stop_t *stops, uint16_t count)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
stopsconst lv_grad_stop_t *an array of lv_grad_stop_t variables
countuint16_tthe number of stops in the array, range: 0..LV_GRADIENT_MAX_STOPS

lv_draw_vector_dsc_set_fill_transform

Set a matrix to current fill transformation matrix The new path shapes added by lv_draw_vector_dsc_add_path will use this matrix.

 
void lv_draw_vector_dsc_set_fill_transform(lv_draw_vector_dsc_t *dsc, const lv_matrix_t *matrix)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
matrixconst lv_matrix_t *pointer to a matrix

lv_draw_vector_dsc_set_stroke_color32

Set stroke color for descriptor. The new path shapes added by lv_draw_vector_dsc_add_path will use this color.

 
void lv_draw_vector_dsc_set_stroke_color32(lv_draw_vector_dsc_t *dsc, lv_color32_t color)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
colorlv_color32_tthe color to be set in lv_color32_t format

lv_draw_vector_dsc_set_stroke_color

Set stroke color for descriptor. The new path shapes added by lv_draw_vector_dsc_add_path will use this color.

 
void lv_draw_vector_dsc_set_stroke_color(lv_draw_vector_dsc_t *dsc, lv_color_t color)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
colorlv_color_tthe color to be set in lv_color_t format

lv_draw_vector_dsc_set_stroke_opa

Set stroke opacity for descriptor

 
void lv_draw_vector_dsc_set_stroke_opa(lv_draw_vector_dsc_t *dsc, lv_opa_t opa)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
opalv_opa_tthe opacity to be set in lv_opa_t format

lv_draw_vector_dsc_set_stroke_width

Set stroke line width for descriptor. The new path shapes added by lv_draw_vector_dsc_add_path will use this stroke width.

 
void lv_draw_vector_dsc_set_stroke_width(lv_draw_vector_dsc_t *dsc, float width)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
widthfloatthe stroke line width

lv_draw_vector_dsc_set_stroke_dash

Set stroke line dash pattern for descriptor The new path shapes added by lv_draw_vector_dsc_add_path will use this dash.

 
void lv_draw_vector_dsc_set_stroke_dash(lv_draw_vector_dsc_t *dsc, float *dash_pattern, uint16_t dash_count)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
dash_patternfloat *an array of values that specify the segments of dash line
dash_countuint16_tthe length of dash pattern array

lv_draw_vector_dsc_set_stroke_cap

Set stroke line cap style for descriptor The new path shapes added by lv_draw_vector_dsc_add_path will use this line cap.

 
void lv_draw_vector_dsc_set_stroke_cap(lv_draw_vector_dsc_t *dsc, lv_vector_stroke_cap_t cap)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
caplv_vector_stroke_cap_tthe line cap to be set in lv_vector_stroke_cap_t format

lv_draw_vector_dsc_set_stroke_join

Set stroke line join style for descriptor

 
void lv_draw_vector_dsc_set_stroke_join(lv_draw_vector_dsc_t *dsc, lv_vector_stroke_join_t join)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
joinlv_vector_stroke_join_tthe line join to be set in lv_vector_stroke_join_t format

lv_draw_vector_dsc_set_stroke_miter_limit

Set stroke miter limit for descriptor The new path shapes added by lv_draw_vector_dsc_add_path will use this miter limit.

 
void lv_draw_vector_dsc_set_stroke_miter_limit(lv_draw_vector_dsc_t *dsc, uint16_t miter_limit)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
miter_limituint16_tthe stroke miter_limit

lv_draw_vector_dsc_set_stroke_linear_gradient

Set stroke linear gradient for descriptor The new path shapes added by lv_draw_vector_dsc_add_path will use this gradient.

 
void lv_draw_vector_dsc_set_stroke_linear_gradient(lv_draw_vector_dsc_t *dsc, float x1, float y1, float x2, float y2)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
x1floatthe x for start point
y1floatthe y for start point
x2floatthe x for end point
y2floatthe y for end point

lv_draw_vector_dsc_set_stroke_radial_gradient

Set stroke radial gradient for descriptor The new path shapes added by lv_draw_vector_dsc_add_path will use this gradient.

 
void lv_draw_vector_dsc_set_stroke_radial_gradient(lv_draw_vector_dsc_t *dsc, float cx, float cy, float radius)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
cxfloatthe x for center of the circle
cyfloatthe y for center of the circle
radiusfloatthe radius for circle

lv_draw_vector_dsc_set_stroke_gradient_spread

Set stroke color stops for descriptor The new path shapes added by lv_draw_vector_dsc_add_path will use this gradient spread.

 
void lv_draw_vector_dsc_set_stroke_gradient_spread(lv_draw_vector_dsc_t *dsc, lv_vector_gradient_spread_t spread)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
spreadlv_vector_gradient_spread_tthe gradient spread to be set in lv_vector_gradient_spread_t format

lv_draw_vector_dsc_set_stroke_gradient_color_stops

Set stroke color stops for descriptor The new path shapes added by lv_draw_vector_dsc_add_path will use this color stops.

 
void lv_draw_vector_dsc_set_stroke_gradient_color_stops(lv_draw_vector_dsc_t *dsc, const lv_grad_stop_t *stops, uint16_t count)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
stopsconst lv_grad_stop_t *an array of lv_grad_stop_t variables
countuint16_tthe number of stops in the array

lv_draw_vector_dsc_set_stroke_transform

Set a matrix to current stroke transformation matrix. The new path shapes added by lv_draw_vector_dsc_add_path will use this matrix.

 
void lv_draw_vector_dsc_set_stroke_transform(lv_draw_vector_dsc_t *dsc, const lv_matrix_t *matrix)
Parameters
NameTypeDescription
dsclv_draw_vector_dsc_t *pointer to a vector graphic descriptor
matrixconst lv_matrix_t *pointer to a matrix

Enums

lv_vector_fill_t

NameValue
LV_VECTOR_FILL_NONZERO0
LV_VECTOR_FILL_EVENODD
Used by 1 function
  • lv_draw_vector_dsc_set_fill_rule — param rule

lv_vector_stroke_cap_t

NameValue
LV_VECTOR_STROKE_CAP_BUTT0
LV_VECTOR_STROKE_CAP_SQUARE
LV_VECTOR_STROKE_CAP_ROUND
Used by 1 function
  • lv_draw_vector_dsc_set_stroke_cap — param cap

lv_vector_stroke_join_t

NameValue
LV_VECTOR_STROKE_JOIN_MITER0
LV_VECTOR_STROKE_JOIN_BEVEL
LV_VECTOR_STROKE_JOIN_ROUND
Used by 1 function
  • lv_draw_vector_dsc_set_stroke_join — param join

lv_vector_path_quality_t

NameValue
LV_VECTOR_PATH_QUALITY_MEDIUM0
LV_VECTOR_PATH_QUALITY_HIGH
LV_VECTOR_PATH_QUALITY_LOW
Used by 1 function
  • lv_vector_path_create — param quality

lv_vector_blend_t

NameValue
LV_VECTOR_BLEND_SRC_OVER0
LV_VECTOR_BLEND_SRC_IN
LV_VECTOR_BLEND_DST_OVER
LV_VECTOR_BLEND_DST_IN
LV_VECTOR_BLEND_SCREEN
LV_VECTOR_BLEND_MULTIPLY
LV_VECTOR_BLEND_NONE
LV_VECTOR_BLEND_ADDITIVE
LV_VECTOR_BLEND_SUBTRACTIVE
Used by 1 function
  • lv_draw_vector_dsc_set_blend_mode — param blend

lv_vector_path_op_t

NameValue
LV_VECTOR_PATH_OP_MOVE_TO0
LV_VECTOR_PATH_OP_LINE_TO
LV_VECTOR_PATH_OP_QUAD_TO
LV_VECTOR_PATH_OP_CUBIC_TO
LV_VECTOR_PATH_OP_CLOSE

lv_vector_draw_style_t

NameValue
LV_VECTOR_DRAW_STYLE_SOLID0
LV_VECTOR_DRAW_STYLE_PATTERN
LV_VECTOR_DRAW_STYLE_GRADIENT

lv_vector_gradient_spread_t

NameValue
LV_VECTOR_GRADIENT_SPREAD_PAD0
LV_VECTOR_GRADIENT_SPREAD_REPEAT
LV_VECTOR_GRADIENT_SPREAD_REFLECT
Used by 2 functions
  • lv_draw_vector_dsc_set_fill_gradient_spread — param spread
  • lv_draw_vector_dsc_set_stroke_gradient_spread — param spread

lv_vector_gradient_style_t

NameValue
LV_VECTOR_GRADIENT_STYLE_LINEAR0
LV_VECTOR_GRADIENT_STYLE_RADIAL

lv_vector_fill_units_t

NameValueDescription
LV_VECTOR_FILL_UNITS_OBJECT_BOUNDING_BOX0
LV_VECTOR_FILL_UNITS_USER_SPACE_ON_USERelative coordinates relative to the object bounding box.
Used by 1 function
  • lv_draw_vector_dsc_set_fill_units — param units

Structs

struct

_lv_fpoint_t

MemberTypeDescription
xfloat
yfloat

Typedefs

vector_draw_task_cb

 
typedef void(* vector_draw_task_cb) (void *ctx, const lv_vector_path_t *path, const lv_vector_path_ctx_t *dsc)
Used by 1 function
  • lv_vector_for_each_destroy_tasks — param cb

Dependencies

How is this guide?

Last updated on

On this page

Functionslv_draw_vector_dsc_set_transformlv_draw_vector_dsc_set_blend_modelv_draw_vector_dsc_set_fill_color32lv_draw_vector_dsc_set_fill_colorlv_draw_vector_dsc_set_fill_opalv_draw_vector_dsc_set_fill_rulelv_draw_vector_dsc_set_fill_unitslv_draw_vector_dsc_set_fill_imagelv_draw_vector_dsc_set_fill_linear_gradientlv_draw_vector_dsc_set_fill_radial_gradientlv_draw_vector_dsc_set_fill_gradient_spreadlv_draw_vector_dsc_set_fill_gradient_color_stopslv_draw_vector_dsc_set_fill_transformlv_draw_vector_dsc_set_stroke_color32lv_draw_vector_dsc_set_stroke_colorlv_draw_vector_dsc_set_stroke_opalv_draw_vector_dsc_set_stroke_widthlv_draw_vector_dsc_set_stroke_dashlv_draw_vector_dsc_set_stroke_caplv_draw_vector_dsc_set_stroke_joinlv_draw_vector_dsc_set_stroke_miter_limitlv_draw_vector_dsc_set_stroke_linear_gradientlv_draw_vector_dsc_set_stroke_radial_gradientlv_draw_vector_dsc_set_stroke_gradient_spreadlv_draw_vector_dsc_set_stroke_gradient_color_stopslv_draw_vector_dsc_set_stroke_transformlv_vector_path_get_boundinglv_draw_task_get_vector_dsclv_matrix_transform_pointlv_matrix_transform_pathlv_vector_path_createlv_vector_path_copylv_vector_path_clearlv_vector_path_deletelv_vector_path_move_tolv_vector_path_line_tolv_vector_path_quad_tolv_vector_path_cubic_tolv_vector_path_arc_tolv_vector_path_closelv_vector_path_append_rectanglelv_vector_path_append_rectlv_vector_path_append_circlelv_vector_path_append_arclv_vector_path_append_pathlv_draw_vector_dsc_createlv_draw_vector_dsc_deletelv_draw_vector_dsc_identitylv_draw_vector_dsc_scalelv_draw_vector_dsc_rotatelv_draw_vector_dsc_translatelv_draw_vector_dsc_skewlv_draw_vector_dsc_add_pathlv_draw_vector_dsc_clear_arealv_draw_vectorEnumslv_vector_fill_tlv_vector_stroke_cap_tlv_vector_stroke_join_tlv_vector_path_quality_tlv_vector_blend_tlv_vector_path_op_tlv_vector_draw_style_tlv_vector_gradient_spread_tlv_vector_gradient_style_tlv_vector_fill_units_tStructs_lv_fpoint_tTypedefsvector_draw_task_cbDependencies