lv_barcode.h
Functions
-
lv_obj_t *lv_barcode_create(lv_obj_t *parent)
Create an empty barcode (an
lv_canvas
) object.- Parameters:
parent – point to an object where to create the barcode
- Returns:
pointer to the created barcode object
-
void lv_barcode_set_dark_color(lv_obj_t *obj, lv_color_t color)
Set the dark color of a barcode object
- Parameters:
obj – pointer to barcode object
color – dark color of the barcode
-
void lv_barcode_set_light_color(lv_obj_t *obj, lv_color_t color)
Set the light color of a barcode object
- Parameters:
obj – pointer to barcode object
color – light color of the barcode
-
void lv_barcode_set_scale(lv_obj_t *obj, uint16_t scale)
Set the scale of a barcode object
- Parameters:
obj – pointer to barcode object
scale – scale factor
-
void lv_barcode_set_direction(lv_obj_t *obj, lv_dir_t direction)
Set the direction of a barcode object
- Parameters:
obj – pointer to barcode object
direction – draw direction (
LV_DIR_HOR
orLB_DIR_VER
)
-
void lv_barcode_set_tiled(lv_obj_t *obj, bool tiled)
Set the tiled mode of a barcode object
- Parameters:
obj – pointer to barcode object
tiled – true: tiled mode, false: normal mode (default)
-
lv_result_t lv_barcode_update(lv_obj_t *obj, const char *data)
Set the data of a barcode object
- Parameters:
obj – pointer to barcode object
data – data to display
- Returns:
LV_RESULT_OK: if no error; LV_RESULT_INVALID: on error
-
lv_color_t lv_barcode_get_dark_color(lv_obj_t *obj)
Get the dark color of a barcode object
- Parameters:
obj – pointer to barcode object
- Returns:
dark color of the barcode
-
lv_color_t lv_barcode_get_light_color(lv_obj_t *obj)
Get the light color of a barcode object
- Parameters:
obj – pointer to barcode object
- Returns:
light color of the barcode
Variables
-
const lv_obj_class_t lv_barcode_class