@ -451,7 +451,7 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_sw_mask_res_t lv_draw_mask_line(lv_opa_t *
|
||||
/*Non sense: Can't be on the right/left of a horizontal line*/
|
||||
if(p->cfg.side == LV_DRAW_SW_MASK_LINE_SIDE_LEFT ||
|
||||
p->cfg.side == LV_DRAW_SW_MASK_LINE_SIDE_RIGHT) return LV_DRAW_SW_MASK_RES_FULL_COVER;
|
||||
else if(p->cfg.side == LV_DRAW_SW_MASK_LINE_SIDE_TOP && abs_y + 1 < 0) return LV_DRAW_SW_MASK_RES_FULL_COVER;
|
||||
else if(p->cfg.side == LV_DRAW_SW_MASK_LINE_SIDE_TOP && abs_y < 0) return LV_DRAW_SW_MASK_RES_FULL_COVER;
|
||||
else if(p->cfg.side == LV_DRAW_SW_MASK_LINE_SIDE_BOTTOM && abs_y > 0) return LV_DRAW_SW_MASK_RES_FULL_COVER;
|
||||
else {
|
||||
return LV_DRAW_SW_MASK_RES_TRANSP;
|
||||
|
@ -104,9 +104,15 @@ void lv_draw_sw_triangle(lv_draw_unit_t * draw_unit, const lv_draw_triangle_dsc_
|
||||
p[2].x, p[2].y,
|
||||
right ? LV_DRAW_SW_MASK_LINE_SIDE_LEFT : LV_DRAW_SW_MASK_LINE_SIDE_RIGHT);
|
||||
|
||||
lv_draw_sw_mask_line_points_init(&mask_bottom, p[1].x, p[1].y,
|
||||
p[2].x, p[2].y,
|
||||
right ? LV_DRAW_SW_MASK_LINE_SIDE_LEFT : LV_DRAW_SW_MASK_LINE_SIDE_RIGHT);
|
||||
if(p[1].y == p[2].y) {
|
||||
lv_draw_sw_mask_line_points_init(&mask_bottom, p[1].x, p[1].y,
|
||||
p[2].x, p[2].y, LV_DRAW_SW_MASK_LINE_SIDE_TOP);
|
||||
}
|
||||
else {
|
||||
lv_draw_sw_mask_line_points_init(&mask_bottom, p[1].x, p[1].y,
|
||||
p[2].x, p[2].y,
|
||||
right ? LV_DRAW_SW_MASK_LINE_SIDE_LEFT : LV_DRAW_SW_MASK_LINE_SIDE_RIGHT);
|
||||
}
|
||||
|
||||
masks[0] = &mask_left;
|
||||
masks[1] = &mask_right;
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |