From ec57e921e28e1a041df14958d1a02c99bd423146 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 24 Mar 2020 09:37:03 +0100 Subject: [PATCH] fix belnding issue. Fixes #1417 --- src/lv_draw/lv_draw_blend.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/lv_draw/lv_draw_blend.c b/src/lv_draw/lv_draw_blend.c index b10684f04..dc5ea266d 100644 --- a/src/lv_draw/lv_draw_blend.c +++ b/src/lv_draw/lv_draw_blend.c @@ -64,10 +64,12 @@ static inline lv_color_t color_blend_true_color_subtractive(lv_color_t fg, lv_co #define FILL_NORMAL_MASK_PX(out_x, color) \ - if(disp_buf_tmp[out_x].full != color.full) { \ - if(*mask_tmp_x == LV_OPA_COVER) disp_buf_tmp[out_x] = color; \ - disp_buf_tmp[out_x] = lv_color_mix(color, disp_buf_tmp[out_x], *mask_tmp_x); ; \ - } \ + if(*mask_tmp_x) { \ + if(disp_buf_tmp[out_x].full != color.full) { \ + if(*mask_tmp_x == LV_OPA_COVER) disp_buf_tmp[out_x] = color; \ + else disp_buf_tmp[out_x] = lv_color_mix(color, disp_buf_tmp[out_x], *mask_tmp_x); ; \ + } \ + } \ mask_tmp_x++; @@ -371,7 +373,7 @@ static void fill_normal(const lv_area_t * disp_area, lv_color_t * disp_buf, con if(opa > LV_OPA_MAX) { for(y = draw_area->y1; y <= draw_area->y2; y++) { const lv_opa_t * mask_tmp_x = &mask_tmp[draw_area->x1]; -#if 0 +#if 1 for(x = draw_area->x1; x <= draw_area->x2; x++) { FILL_NORMAL_MASK_PX(x, color) }