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

Refactor: make Rect members min/max public

This commit is contained in:
Emil Ernerfeldt
2020-04-25 15:45:38 +02:00
parent e26d08851f
commit cce048509f
10 changed files with 31 additions and 37 deletions

View File

@@ -179,8 +179,8 @@ impl Path {
}
pub fn add_rectangle(&mut self, rect: &Rect) {
let min = rect.min();
let max = rect.max();
let min = rect.min;
let max = rect.max;
self.add_point(pos2(min.x, min.y), vec2(-1.0, -1.0));
self.add_point(pos2(max.x, min.y), vec2(1.0, -1.0));
self.add_point(pos2(max.x, max.y), vec2(1.0, 1.0));
@@ -188,8 +188,8 @@ impl Path {
}
pub fn add_rounded_rectangle(&mut self, rect: &Rect, corner_radius: f32) {
let min = rect.min();
let max = rect.max();
let min = rect.min;
let max = rect.max;
let cr = corner_radius
.min(rect.width() * 0.5)