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 or LB_DIR_VER)

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

uint16_t lv_barcode_get_scale(lv_obj_t *obj)

Get the scale of a barcode object

Parameters:

obj -- pointer to barcode object

Returns:

scale factor

Variables

const lv_obj_class_t lv_barcode_class
struct lv_barcode_t

Public Members

lv_canvas_t canvas
lv_color_t dark_color
lv_color_t light_color
uint16_t scale
lv_dir_t direction