mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
fix(draw): missed bg_color renaming in the draw function (#3002)
This commit is contained in:
parent
e3b43eec94
commit
38ad11966a
@ -109,13 +109,12 @@ static void draw_bg(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc, co
|
|||||||
if(bg_color.full == dsc->bg_grad.stops[1].color.full) grad_dir = LV_GRAD_DIR_NONE;
|
if(bg_color.full == dsc->bg_grad.stops[1].color.full) grad_dir = LV_GRAD_DIR_NONE;
|
||||||
|
|
||||||
bool mask_any = lv_draw_mask_is_any(&bg_coords);
|
bool mask_any = lv_draw_mask_is_any(&bg_coords);
|
||||||
|
lv_draw_sw_blend_dsc_t blend_dsc = {0};
|
||||||
|
blend_dsc.blend_mode = dsc->blend_mode;
|
||||||
|
blend_dsc.color = bg_color;
|
||||||
|
|
||||||
/*Most simple case: just a plain rectangle*/
|
/*Most simple case: just a plain rectangle*/
|
||||||
if(!mask_any && dsc->radius == 0 && (grad_dir == LV_GRAD_DIR_NONE)) {
|
if(!mask_any && dsc->radius == 0 && (grad_dir == LV_GRAD_DIR_NONE)) {
|
||||||
lv_draw_sw_blend_dsc_t blend_dsc;
|
|
||||||
lv_memset_00(&blend_dsc, sizeof(lv_draw_sw_blend_dsc_t));
|
|
||||||
blend_dsc.blend_mode = dsc->blend_mode;
|
|
||||||
blend_dsc.color = bg_color;
|
|
||||||
blend_dsc.blend_area = &bg_coords;
|
blend_dsc.blend_area = &bg_coords;
|
||||||
blend_dsc.opa = dsc->bg_opa;
|
blend_dsc.opa = dsc->bg_opa;
|
||||||
|
|
||||||
@ -152,14 +151,11 @@ static void draw_bg(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc, co
|
|||||||
blend_area.x1 = clipped_coords.x1;
|
blend_area.x1 = clipped_coords.x1;
|
||||||
blend_area.x2 = clipped_coords.x2;
|
blend_area.x2 = clipped_coords.x2;
|
||||||
|
|
||||||
lv_draw_sw_blend_dsc_t blend_dsc;
|
|
||||||
lv_memset_00(&blend_dsc, sizeof(lv_draw_sw_blend_dsc_t));
|
|
||||||
blend_dsc.blend_mode = dsc->blend_mode;
|
|
||||||
blend_dsc.color = dsc->bg_grad.stops[0].color;
|
|
||||||
blend_dsc.mask_buf = mask_buf;
|
blend_dsc.mask_buf = mask_buf;
|
||||||
blend_dsc.opa = LV_OPA_COVER;
|
|
||||||
blend_dsc.blend_area = &blend_area;
|
blend_dsc.blend_area = &blend_area;
|
||||||
blend_dsc.mask_area = &blend_area;
|
blend_dsc.mask_area = &blend_area;
|
||||||
|
blend_dsc.opa = LV_OPA_COVER;
|
||||||
|
|
||||||
|
|
||||||
/*Get gradient if appropriate*/
|
/*Get gradient if appropriate*/
|
||||||
lv_gradient_cache_t * grad = lv_grad_get_from_cache(&dsc->bg_grad, coords_bg_w, coords_bg_h);
|
lv_gradient_cache_t * grad = lv_grad_get_from_cache(&dsc->bg_grad, coords_bg_w, coords_bg_h);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user