mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
merge dev-7.0
This commit is contained in:
commit
a31369678d
@ -92,6 +92,12 @@ void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, uin
|
||||
area.x2 = center_x + radius - 1; /*-1 because the center already belongs to the left/bottom part*/
|
||||
area.y2 = center_y + radius - 1;
|
||||
|
||||
/*Draw a full ring*/
|
||||
if(start_angle + 360 == end_angle) {
|
||||
lv_draw_rect(&area, clip_area, &circle_style, opa_scale);
|
||||
return;
|
||||
}
|
||||
|
||||
int32_t angle_gap;
|
||||
if(end_angle > start_angle) {
|
||||
angle_gap = 360 - (end_angle - start_angle);
|
||||
|
@ -326,8 +326,8 @@ static void fill_normal(const lv_area_t * disp_area, lv_color_t * disp_buf, con
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
if(mask_tmp[x] > LV_OPA_MAX) last_res_color = color;
|
||||
else if(mask_tmp[x] < LV_OPA_MIN) last_res_color = disp_buf_tmp[x];
|
||||
if(mask_tmp[x] == LV_OPA_COVER) last_res_color = color;
|
||||
else if(mask_tmp[x] == LV_OPA_TRANSP) last_res_color = disp_buf_tmp[x];
|
||||
else if(disp_buf_tmp[x].full == color.full) last_res_color = color;
|
||||
else last_res_color = lv_color_mix(color, disp_buf_tmp[x], mask_tmp[x]);
|
||||
}
|
||||
@ -346,15 +346,15 @@ static void fill_normal(const lv_area_t * disp_area, lv_color_t * disp_buf, con
|
||||
for(x = draw_area->x1; x <= draw_area->x2; x++) {
|
||||
if(mask_tmp[x] == 0) continue;
|
||||
if(mask_tmp[x] != last_mask || last_dest_color.full != disp_buf_tmp[x].full) {
|
||||
lv_opa_t opa_tmp = (uint32_t)((uint32_t)mask_tmp[x] * opa) >> 8;
|
||||
lv_opa_t opa_tmp = mask_tmp[x] == LV_OPA_COVER ? opa : (uint32_t)((uint32_t)mask_tmp[x] * opa) >> 8;
|
||||
#if LV_COLOR_SCREEN_TRANSP
|
||||
if(disp->driver.screen_transp) {
|
||||
lv_color_mix_with_alpha(disp_buf_tmp[x], disp_buf_tmp[x].ch.alpha, color, opa_tmp, &last_res_color, &last_res_color.ch.alpha);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
if(opa_tmp > LV_OPA_MAX) last_res_color = lv_color_mix(color, disp_buf_tmp[x], mask_tmp[x]);
|
||||
else if(opa_tmp < LV_OPA_MIN) last_res_color = disp_buf_tmp[x];
|
||||
if(opa_tmp == LV_OPA_COVER) last_res_color = lv_color_mix(color, disp_buf_tmp[x], mask_tmp[x]);
|
||||
else if(opa_tmp == LV_OPA_TRANSP) last_res_color = disp_buf_tmp[x];
|
||||
else last_res_color = lv_color_mix(color, disp_buf_tmp[x],opa_tmp);
|
||||
}
|
||||
last_mask = mask_tmp[x];
|
||||
|
@ -254,8 +254,8 @@ static void basic_init(void)
|
||||
// lv_style_set_shadow_width(&panel, LV_STYLE_STATE_NORMAL, 5);
|
||||
// lv_style_set_shadow_offset_y(&panel, LV_STYLE_STATE_NORMAL, 3);
|
||||
// lv_style_set_shadow_color(&panel, LV_STYLE_STATE_NORMAL, LV_COLOR_BLUE);
|
||||
lv_style_set_pad_left(&panel, LV_STYLE_STATE_NORMAL, LV_DPI / 20);
|
||||
lv_style_set_pad_right(&panel, LV_STYLE_STATE_NORMAL, LV_DPI / 20);
|
||||
lv_style_set_pad_left(&panel, LV_STYLE_STATE_NORMAL, 3);
|
||||
lv_style_set_pad_right(&panel, LV_STYLE_STATE_NORMAL, 3);
|
||||
lv_style_set_pad_top(&panel, LV_STYLE_STATE_NORMAL, LV_DPI / 20);
|
||||
lv_style_set_pad_bottom(&panel, LV_STYLE_STATE_NORMAL, LV_DPI / 20);
|
||||
lv_style_set_pad_inner(&panel, LV_STYLE_STATE_NORMAL, LV_DPI / 20);
|
||||
@ -276,10 +276,10 @@ static void basic_init(void)
|
||||
lv_style_set_border_width(&btn, LV_STYLE_STATE_NORMAL, 2);
|
||||
lv_style_set_border_opa(&btn, LV_STYLE_STATE_NORMAL, LV_OPA_50);
|
||||
lv_style_set_shadow_width(&btn, LV_STYLE_STATE_NORMAL, 10);
|
||||
// lv_style_set_shadow_width(&btn, LV_STYLE_STATE_PRESSED, 2);
|
||||
// lv_style_set_shadow_offset_x(&btn, LV_STYLE_STATE_NORMAL, 35);
|
||||
lv_style_set_shadow_width(&btn, LV_STYLE_STATE_PRESSED, 2);
|
||||
lv_style_set_shadow_offset_x(&btn, LV_STYLE_STATE_NORMAL, -4);
|
||||
lv_style_set_shadow_offset_y(&btn, LV_STYLE_STATE_NORMAL, 8);
|
||||
lv_style_set_shadow_offset_y(&btn, LV_STYLE_STATE_PRESSED, 1);
|
||||
// lv_style_set_shadow_offset_y(&btn, LV_STYLE_STATE_PRESSED, 1);
|
||||
lv_style_set_shadow_color(&btn, LV_STYLE_STATE_NORMAL, LV_COLOR_BLUE);
|
||||
// lv_style_set_shadow_spread(&btn, LV_STYLE_STATE_NORMAL, 5);
|
||||
lv_style_set_text_color(&btn, LV_STYLE_STATE_NORMAL, LV_COLOR_WHITE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user