1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 22:00:03 -04:00

Refactor: define rect by min/max

This commit is contained in:
Emil Ernerfeldt
2020-04-15 11:47:03 +02:00
parent 7fc2500973
commit 0265b3d43a
3 changed files with 31 additions and 24 deletions

View File

@@ -347,7 +347,9 @@ impl Mesher {
let min = rect.min();
let max = rect.max();
let cr = corner_radius.min(rect.size.x * 0.5).min(rect.size.y * 0.5);
let cr = corner_radius
.min(rect.width() * 0.5)
.min(rect.height() * 0.5);
if cr <= 0.0 {
path_points.push(vec2(min.x, min.y));