mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-21 06:53:01 +08:00
lv_draw_basic: use uint16_t for letter width
This commit is contained in:
parent
4c1dbc63d2
commit
ecd21d512d
@ -286,7 +286,7 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv
|
|||||||
|
|
||||||
uint8_t width_byte_scr = g.box_w >> 3; /*Width in bytes (on the screen finally) (e.g. w = 11 -> 2 bytes wide)*/
|
uint8_t width_byte_scr = g.box_w >> 3; /*Width in bytes (on the screen finally) (e.g. w = 11 -> 2 bytes wide)*/
|
||||||
if(g.box_w & 0x7) width_byte_scr++;
|
if(g.box_w & 0x7) width_byte_scr++;
|
||||||
uint8_t width_bit = g.box_w * g.bpp; /*Letter width in bits*/
|
uint16_t width_bit = g.box_w * g.bpp; /*Letter width in bits*/
|
||||||
|
|
||||||
/* Calculate the col/row start/end on the map*/
|
/* Calculate the col/row start/end on the map*/
|
||||||
lv_coord_t col_start = pos_x >= mask_p->x1 ? 0 : mask_p->x1 - pos_x;
|
lv_coord_t col_start = pos_x >= mask_p->x1 ? 0 : mask_p->x1 - pos_x;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user