feat(draw) add LV_BLEND_MODE_MULTIPLY
This commit is contained in:
@@ -191,8 +191,7 @@ void lv_obj_set_style_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selec
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_OPA, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value,
|
||||
lv_style_selector_t selector)
|
||||
void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = value
|
||||
@@ -224,8 +223,7 @@ void lv_obj_set_style_anim_speed(struct _lv_obj_t * obj, uint32_t value, lv_styl
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM_SPEED, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value,
|
||||
lv_style_selector_t selector)
|
||||
void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = value
|
||||
|
||||
@@ -142,8 +142,7 @@ static inline lv_opa_t lv_obj_get_style_opa(const struct _lv_obj_t * obj, uint32
|
||||
return (lv_opa_t)v.num;
|
||||
}
|
||||
|
||||
static inline const lv_color_filter_dsc_t * lv_obj_get_style_color_filter_dsc(const struct _lv_obj_t * obj,
|
||||
uint32_t part)
|
||||
static inline const lv_color_filter_dsc_t * lv_obj_get_style_color_filter_dsc(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_COLOR_FILTER_DSC);
|
||||
return (const lv_color_filter_dsc_t *)v.ptr;
|
||||
@@ -557,13 +556,11 @@ void lv_obj_set_style_pad_column(struct _lv_obj_t * obj, lv_coord_t value, lv_st
|
||||
void lv_obj_set_style_radius(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_clip_corner(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value,
|
||||
lv_style_selector_t selector);
|
||||
void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_color_filter_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_anim_time(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_anim_speed(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value,
|
||||
lv_style_selector_t selector);
|
||||
void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_blend_mode(struct _lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_layout(struct _lv_obj_t * obj, uint16_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_base_dir(struct _lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector);
|
||||
|
||||
@@ -65,6 +65,7 @@ static void map_blended(const lv_area_t * disp_area, lv_color_t * disp_buf, con
|
||||
|
||||
static inline lv_color_t color_blend_true_color_additive(lv_color_t fg, lv_color_t bg, lv_opa_t opa);
|
||||
static inline lv_color_t color_blend_true_color_subtractive(lv_color_t fg, lv_color_t bg, lv_opa_t opa);
|
||||
static inline lv_color_t color_blend_true_color_multiply(lv_color_t fg, lv_color_t bg, lv_opa_t opa);
|
||||
#endif
|
||||
#endif //LV_USE_GPU_SDL_RENDER
|
||||
|
||||
@@ -518,6 +519,9 @@ static void fill_blended(const lv_area_t * disp_area, lv_color_t * disp_buf, co
|
||||
case LV_BLEND_MODE_SUBTRACTIVE:
|
||||
blend_fp = color_blend_true_color_subtractive;
|
||||
break;
|
||||
case LV_BLEND_MODE_MULTIPLY:
|
||||
blend_fp = color_blend_true_color_multiply;
|
||||
break;
|
||||
default:
|
||||
LV_LOG_WARN("fill_blended: unsupported blend mode");
|
||||
return;
|
||||
@@ -904,6 +908,9 @@ static void map_blended(const lv_area_t * disp_area, lv_color_t * disp_buf, con
|
||||
case LV_BLEND_MODE_SUBTRACTIVE:
|
||||
blend_fp = color_blend_true_color_subtractive;
|
||||
break;
|
||||
case LV_BLEND_MODE_MULTIPLY:
|
||||
blend_fp = color_blend_true_color_multiply;
|
||||
break;
|
||||
default:
|
||||
LV_LOG_WARN("fill_blended: unsupported blend mode");
|
||||
return;
|
||||
@@ -1004,7 +1011,6 @@ static inline lv_color_t color_blend_true_color_additive(lv_color_t fg, lv_color
|
||||
|
||||
static inline lv_color_t color_blend_true_color_subtractive(lv_color_t fg, lv_color_t bg, lv_opa_t opa)
|
||||
{
|
||||
|
||||
if(opa <= LV_OPA_MIN) return bg;
|
||||
|
||||
int32_t tmp;
|
||||
@@ -1028,6 +1034,30 @@ static inline lv_color_t color_blend_true_color_subtractive(lv_color_t fg, lv_co
|
||||
|
||||
return lv_color_mix(fg, bg, opa);
|
||||
}
|
||||
|
||||
static inline lv_color_t color_blend_true_color_multiply(lv_color_t fg, lv_color_t bg, lv_opa_t opa)
|
||||
{
|
||||
if(opa <= LV_OPA_MIN) return bg;
|
||||
|
||||
#if LV_COLOR_DEPTH == 32
|
||||
fg.ch.red = (fg.ch.red * bg.ch.red) >> 8;
|
||||
fg.ch.green = (fg.ch.green * bg.ch.green) >> 8;
|
||||
fg.ch.blue = (fg.ch.blue * bg.ch.blue) >> 8;
|
||||
#elif LV_COLOR_DEPTH == 16
|
||||
fg.ch.red = (fg.ch.red * bg.ch.red) >> 5;
|
||||
fg.ch.blue = (fg.ch.blue * bg.ch.blue) >> 5;
|
||||
LV_COLOR_SET_G(fg, (LV_COLOR_GET_G(fg) * LV_COLOR_GET_G(bg)) >> 6);
|
||||
#elif LV_COLOR_DEPTH == 8
|
||||
fg.ch.red = (fg.ch.red * bg.ch.red) >> 3;
|
||||
fg.ch.green = (fg.ch.green * bg.ch.green) >> 3;
|
||||
fg.ch.blue = (fg.ch.blue * bg.ch.blue) >> 2;
|
||||
#endif
|
||||
|
||||
if(opa == LV_OPA_COVER) return fg;
|
||||
|
||||
return lv_color_mix(fg, bg, opa);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif // LV_USE_GPU_SDL_RENDER
|
||||
|
||||
@@ -61,6 +61,7 @@ enum {
|
||||
LV_BLEND_MODE_NORMAL, /**< Simply mix according to the opacity value*/
|
||||
LV_BLEND_MODE_ADDITIVE, /**< Add the respective color channels*/
|
||||
LV_BLEND_MODE_SUBTRACTIVE,/**< Subtract the foreground from the background*/
|
||||
LV_BLEND_MODE_MULTIPLY, /**< Multiply the foreground and background*/
|
||||
};
|
||||
|
||||
typedef uint8_t lv_blend_mode_t;
|
||||
|
||||
@@ -90,712 +90,712 @@ void lv_style_set_arc_img_src(lv_style_t * style, const void * value);
|
||||
#define LV_STYLE_CONST_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_MIN_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_MIN_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_MAX_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_MAX_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_HEIGHT(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_HEIGHT, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_MIN_HEIGHT(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_MIN_HEIGHT, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_MAX_HEIGHT(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_MAX_HEIGHT, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_X(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_X, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_Y(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_Y, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ALIGN(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ALIGN, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TRANSFORM_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TRANSFORM_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TRANSFORM_HEIGHT(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TRANSFORM_HEIGHT, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TRANSLATE_X(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TRANSLATE_X, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TRANSLATE_Y(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TRANSLATE_Y, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TRANSFORM_ZOOM(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TRANSFORM_ZOOM, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TRANSFORM_ANGLE(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TRANSFORM_ANGLE, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_PAD_TOP(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_PAD_TOP, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_PAD_BOTTOM(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_PAD_BOTTOM, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_PAD_LEFT(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_PAD_LEFT, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_PAD_RIGHT(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_PAD_RIGHT, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_PAD_ROW(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_PAD_ROW, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_PAD_COLUMN(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_PAD_COLUMN, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_RADIUS(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_RADIUS, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_CLIP_CORNER(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_CLIP_CORNER, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_COLOR_FILTER_DSC(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_COLOR_FILTER_DSC, \
|
||||
.value = { \
|
||||
.ptr = val \
|
||||
} \
|
||||
.value = { \
|
||||
.ptr = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_COLOR_FILTER_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_COLOR_FILTER_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ANIM_TIME(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ANIM_TIME, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ANIM_SPEED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ANIM_SPEED, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TRANSITION(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TRANSITION, \
|
||||
.value = { \
|
||||
.ptr = val \
|
||||
} \
|
||||
.value = { \
|
||||
.ptr = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BLEND_MODE(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BLEND_MODE, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_LAYOUT(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_LAYOUT, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BASE_DIR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BASE_DIR, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_COLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_COLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_COLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_COLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_GRAD_COLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_GRAD_COLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_GRAD_COLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_GRAD_COLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_GRAD_DIR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_GRAD_DIR, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_MAIN_STOP(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_MAIN_STOP, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_GRAD_STOP(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_GRAD_STOP, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_IMG_SRC(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_IMG_SRC, \
|
||||
.value = { \
|
||||
.ptr = val \
|
||||
} \
|
||||
.value = { \
|
||||
.ptr = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_IMG_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_IMG_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_IMG_RECOLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_IMG_RECOLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_IMG_RECOLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_IMG_RECOLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_IMG_RECOLOR_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_IMG_RECOLOR_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BG_IMG_TILED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BG_IMG_TILED, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BORDER_COLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BORDER_COLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BORDER_COLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BORDER_COLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BORDER_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BORDER_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BORDER_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BORDER_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BORDER_SIDE(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BORDER_SIDE, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_BORDER_POST(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_BORDER_POST, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_COLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_COLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_COLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_COLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_FONT(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_FONT, \
|
||||
.value = { \
|
||||
.ptr = val \
|
||||
} \
|
||||
.value = { \
|
||||
.ptr = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_LETTER_SPACE(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_LETTER_SPACE, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_LINE_SPACE(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_LINE_SPACE, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_DECOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_DECOR, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_TEXT_ALIGN(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_TEXT_ALIGN, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_IMG_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_IMG_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_IMG_RECOLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_IMG_RECOLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_IMG_RECOLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_IMG_RECOLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_IMG_RECOLOR_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_IMG_RECOLOR_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_OUTLINE_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_OUTLINE_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_OUTLINE_COLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_OUTLINE_COLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_OUTLINE_COLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_OUTLINE_COLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_OUTLINE_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_OUTLINE_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_OUTLINE_PAD(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_OUTLINE_PAD, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_SHADOW_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_SHADOW_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_SHADOW_OFS_X(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_SHADOW_OFS_X, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_SHADOW_OFS_Y(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_SHADOW_OFS_Y, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_SHADOW_SPREAD(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_SHADOW_SPREAD, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_SHADOW_COLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_SHADOW_COLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_SHADOW_COLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_SHADOW_COLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_SHADOW_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_SHADOW_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_LINE_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_LINE_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_LINE_DASH_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_LINE_DASH_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_LINE_DASH_GAP(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_LINE_DASH_GAP, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_LINE_ROUNDED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_LINE_ROUNDED, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_LINE_COLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_LINE_COLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_LINE_COLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_LINE_COLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_LINE_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_LINE_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ARC_WIDTH(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ARC_WIDTH, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ARC_ROUNDED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ARC_ROUNDED, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ARC_COLOR(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ARC_COLOR, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ARC_COLOR_FILTERED(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ARC_COLOR_FILTERED, \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
.value = { \
|
||||
.color = val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ARC_OPA(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ARC_OPA, \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
.value = { \
|
||||
.num = (int32_t)val \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_ARC_IMG_SRC(val) \
|
||||
{ \
|
||||
.prop = LV_STYLE_ARC_IMG_SRC, \
|
||||
.value = { \
|
||||
.ptr = val \
|
||||
} \
|
||||
.value = { \
|
||||
.ptr = val \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user