mirror of
https://github.com/lvgl/lvgl.git
synced 2026-06-01 00:51:49 +08:00
draw: add blend_mode fields to draw dscs to avoid a lot #if #endif if LV_USE_BLEND_MODES = 0
This commit is contained in:
@@ -82,7 +82,6 @@ void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, uin
|
|||||||
cir_dsc.border_width = dsc->width;
|
cir_dsc.border_width = dsc->width;
|
||||||
cir_dsc.border_blend_mode = dsc->blend_mode;
|
cir_dsc.border_blend_mode = dsc->blend_mode;
|
||||||
|
|
||||||
|
|
||||||
lv_area_t area;
|
lv_area_t area;
|
||||||
area.x1 = center_x - radius;
|
area.x1 = center_x - radius;
|
||||||
area.y1 = center_y - radius;
|
area.y1 = center_y - radius;
|
||||||
|
|||||||
@@ -40,9 +40,7 @@ typedef struct {
|
|||||||
lv_bidi_dir_t bidi_dir;
|
lv_bidi_dir_t bidi_dir;
|
||||||
lv_txt_flag_t flag;
|
lv_txt_flag_t flag;
|
||||||
lv_text_decor_t decor;
|
lv_text_decor_t decor;
|
||||||
#if LV_USE_BLEND_MODES
|
|
||||||
lv_blend_mode_t blend_mode;
|
lv_blend_mode_t blend_mode;
|
||||||
#endif
|
|
||||||
}lv_draw_label_dsc_t;
|
}lv_draw_label_dsc_t;
|
||||||
|
|
||||||
/** Store some info to speed up drawing of very large texts
|
/** Store some info to speed up drawing of very large texts
|
||||||
|
|||||||
@@ -33,27 +33,21 @@ typedef struct {
|
|||||||
lv_style_int_t bg_main_color_stop;
|
lv_style_int_t bg_main_color_stop;
|
||||||
lv_style_int_t bg_grad_color_stop;
|
lv_style_int_t bg_grad_color_stop;
|
||||||
lv_opa_t bg_opa;
|
lv_opa_t bg_opa;
|
||||||
#if LV_USE_BLEND_MODES
|
|
||||||
lv_blend_mode_t bg_blend_mode;
|
lv_blend_mode_t bg_blend_mode;
|
||||||
#endif
|
|
||||||
|
|
||||||
/*Border*/
|
/*Border*/
|
||||||
lv_color_t border_color;
|
lv_color_t border_color;
|
||||||
lv_style_int_t border_width;
|
lv_style_int_t border_width;
|
||||||
lv_style_int_t border_side;
|
lv_style_int_t border_side;
|
||||||
lv_opa_t border_opa;
|
lv_opa_t border_opa;
|
||||||
#if LV_USE_BLEND_MODES
|
|
||||||
lv_blend_mode_t border_blend_mode;
|
lv_blend_mode_t border_blend_mode;
|
||||||
#endif
|
|
||||||
|
|
||||||
/*Outline*/
|
/*Outline*/
|
||||||
lv_color_t outline_color;
|
lv_color_t outline_color;
|
||||||
lv_style_int_t outline_width;
|
lv_style_int_t outline_width;
|
||||||
lv_style_int_t outline_pad;
|
lv_style_int_t outline_pad;
|
||||||
lv_opa_t outline_opa;
|
lv_opa_t outline_opa;
|
||||||
#if LV_USE_BLEND_MODES
|
|
||||||
lv_blend_mode_t outline_blend_mode;
|
lv_blend_mode_t outline_blend_mode;
|
||||||
#endif
|
|
||||||
|
|
||||||
/*Shadow*/
|
/*Shadow*/
|
||||||
lv_color_t shadow_color;
|
lv_color_t shadow_color;
|
||||||
@@ -62,9 +56,7 @@ typedef struct {
|
|||||||
lv_style_int_t shadow_ofs_y;
|
lv_style_int_t shadow_ofs_y;
|
||||||
lv_style_int_t shadow_spread;
|
lv_style_int_t shadow_spread;
|
||||||
lv_opa_t shadow_opa;
|
lv_opa_t shadow_opa;
|
||||||
#if LV_USE_BLEND_MODES
|
|
||||||
lv_blend_mode_t shadow_blend_mode;
|
lv_blend_mode_t shadow_blend_mode;
|
||||||
#endif
|
|
||||||
|
|
||||||
/*Pattern*/
|
/*Pattern*/
|
||||||
const void * pattern_image;
|
const void * pattern_image;
|
||||||
@@ -73,9 +65,7 @@ typedef struct {
|
|||||||
lv_opa_t pattern_opa;
|
lv_opa_t pattern_opa;
|
||||||
lv_opa_t pattern_recolor_opa;
|
lv_opa_t pattern_recolor_opa;
|
||||||
uint8_t pattern_repeat :1;
|
uint8_t pattern_repeat :1;
|
||||||
#if LV_USE_BLEND_MODES
|
|
||||||
lv_blend_mode_t pattern_blend_mode;
|
lv_blend_mode_t pattern_blend_mode;
|
||||||
#endif
|
|
||||||
|
|
||||||
/*Value*/
|
/*Value*/
|
||||||
const char * value_str;
|
const char * value_str;
|
||||||
@@ -87,9 +77,7 @@ typedef struct {
|
|||||||
lv_style_int_t value_letter_space;
|
lv_style_int_t value_letter_space;
|
||||||
lv_style_int_t value_line_space;
|
lv_style_int_t value_line_space;
|
||||||
lv_align_t value_align;
|
lv_align_t value_align;
|
||||||
#if LV_USE_BLEND_MODES
|
|
||||||
lv_blend_mode_t value_blend_mode;
|
lv_blend_mode_t value_blend_mode;
|
||||||
#endif
|
|
||||||
}lv_draw_rect_dsc_t;
|
}lv_draw_rect_dsc_t;
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
|
|||||||
Reference in New Issue
Block a user