mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Require a StrokeKind when painting rectangles with strokes (#5648)
This is a breaking change, requiring users to think about wether the stroke is inside/centered/outside the rect. When in doubt, add `egui::StrokeKind::Inside` to the function call.
This commit is contained in:
@@ -76,7 +76,13 @@ pub fn criterion_benchmark(c: &mut Criterion) {
|
||||
let painter = ui.painter();
|
||||
let rect = ui.max_rect();
|
||||
b.iter(|| {
|
||||
painter.rect(rect, 2.0, egui::Color32::RED, (1.0, egui::Color32::WHITE));
|
||||
painter.rect(
|
||||
rect,
|
||||
2.0,
|
||||
egui::Color32::RED,
|
||||
(1.0, egui::Color32::WHITE),
|
||||
egui::StrokeKind::Inside,
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user