1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

minor fixes

This commit is contained in:
Gabor Kiss-Vamosi 2020-02-14 12:22:52 +01:00
parent 30910e392b
commit 738faeda21
3 changed files with 9 additions and 5 deletions

View File

@ -403,7 +403,12 @@ static void lv_draw_map(const lv_area_t * map_area, const lv_area_t * clip_area,
if(alpha_byte) {
lv_opa_t px_opa = map_px[LV_IMG_PX_SIZE_ALPHA_BYTE - 1];
mask_buf[px_i] = px_opa;
if(px_opa < LV_OPA_MIN) continue;
if(px_opa < LV_OPA_MIN) {
#if LV_COLOR_DEPTH == 32
map2[px_i].ch.alpha = 0xFF;
#endif
continue;
}
} else {
mask_buf[px_i] = LV_OPA_COVER;
}

View File

@ -188,8 +188,8 @@ void lv_draw_mask_line_points_init(lv_draw_mask_line_param_t * param, lv_coord_t
param->cfg.p1.x = p1x;
param->cfg.p1.y = p1y;
param->cfg.p2.x = p1x;
param->cfg.p2.y = p1y;
param->cfg.p2.x = p2x;
param->cfg.p2.y = p2y;
param->cfg.side = side;
param->origo.x = p1x;

View File

@ -643,10 +643,9 @@ static lv_res_t lv_img_decoder_built_in_line_alpha(lv_img_decoder_dsc_t * dsc, l
#endif
}
uint8_t byte_act = 0;
uint8_t val_act;
for(i = 0; i < len; i++) {
val_act = (data_tmp[byte_act] & (mask << pos)) >> pos;
val_act = (*data_tmp & (mask << pos)) >> pos;
buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE + LV_IMG_PX_SIZE_ALPHA_BYTE - 1] =
dsc->header.cf == LV_IMG_CF_ALPHA_8BIT ? val_act : opa_table[val_act];