opacity related bug fixes in draw functions
This commit is contained in:
@@ -471,7 +471,7 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area
|
||||
lv_coord_t width = lv_area_get_width(coords);
|
||||
lv_coord_t height = lv_area_get_height(coords);
|
||||
uint16_t bwidth = style->body.border.width;
|
||||
lv_opa_t opa = (uint16_t)((uint16_t) style->body.border.opa * opa_scale) >> 8;
|
||||
lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.border.opa : (uint16_t)((uint16_t) style->body.border.opa * opa_scale) >> 8;
|
||||
lv_border_part_t part = style->body.border.part;
|
||||
lv_color_t color = style->body.border.color;
|
||||
lv_area_t work_area;
|
||||
|
||||
@@ -62,6 +62,8 @@ static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_
|
||||
*/
|
||||
void lv_vpx(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa)
|
||||
{
|
||||
if(opa == LV_OPA_TRANSP) return;
|
||||
|
||||
lv_vdb_t * vdb_p = lv_vdb_get();
|
||||
|
||||
/*Pixel out of the mask*/
|
||||
@@ -100,6 +102,8 @@ void lv_vpx(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t col
|
||||
void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p,
|
||||
lv_color_t color, lv_opa_t opa)
|
||||
{
|
||||
if(opa == LV_OPA_TRANSP) return;
|
||||
|
||||
lv_area_t res_a;
|
||||
bool union_ok;
|
||||
lv_vdb_t * vdb_p = lv_vdb_get();
|
||||
@@ -220,6 +224,9 @@ void lv_vletter(const lv_point_t * pos_p, const lv_area_t * mask_p,
|
||||
204, 221, 238, 255
|
||||
};
|
||||
|
||||
|
||||
if(opa == LV_OPA_TRANSP) return;
|
||||
|
||||
if(font_p == NULL) {
|
||||
LV_LOG_WARN("Font: character's bitmap not found");
|
||||
return;
|
||||
@@ -357,6 +364,8 @@ void lv_vmap(const lv_area_t * cords_p, const lv_area_t * mask_p,
|
||||
lv_color_t recolor, lv_opa_t recolor_opa)
|
||||
{
|
||||
|
||||
if(opa == LV_OPA_TRANSP) return;
|
||||
|
||||
lv_area_t masked_a;
|
||||
bool union_ok;
|
||||
lv_vdb_t * vdb_p = lv_vdb_get();
|
||||
|
||||
Reference in New Issue
Block a user