improv: overlap corner radius strip regions
fixes handling of unfortunate scale values
This commit is contained in:
parent
be41927859
commit
5056fc6f9b
1 changed files with 3 additions and 3 deletions
|
|
@ -45,7 +45,7 @@ pub fn rounded_rect_strips(rect: Rectangle<f32>, radius: CornerRadius) -> Vec<Re
|
||||||
x: strip_x,
|
x: strip_x,
|
||||||
y: rect.y + y as f32,
|
y: rect.y + y as f32,
|
||||||
width: strip_w,
|
width: strip_w,
|
||||||
height: 1.0,
|
height: if h > 1. { 2. } else { 1. },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -62,9 +62,9 @@ pub fn rounded_rect_strips(rect: Rectangle<f32>, radius: CornerRadius) -> Vec<Re
|
||||||
if strip_w > 0.0 {
|
if strip_w > 0.0 {
|
||||||
out.push(Rectangle {
|
out.push(Rectangle {
|
||||||
x: strip_x,
|
x: strip_x,
|
||||||
y: rect.y + h - max_bottom as f32 + y as f32,
|
y: rect.y + h - max_bottom as f32 + y as f32 - if h > 1. { 1. } else { 0. },
|
||||||
width: strip_w,
|
width: strip_w,
|
||||||
height: 1.0,
|
height: if h > 1. { 2. } else { 1. },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue