mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -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:
@@ -452,7 +452,12 @@ fn pixel_test_strokes(ui: &mut Ui) {
|
||||
Pos2::new(cursor_pixel.x, cursor_pixel.y),
|
||||
Vec2::splat(size as f32),
|
||||
);
|
||||
painter.rect_stroke(rect_points / pixels_per_point, 0.0, stroke);
|
||||
painter.rect_stroke(
|
||||
rect_points / pixels_per_point,
|
||||
0.0,
|
||||
stroke,
|
||||
egui::StrokeKind::Outside,
|
||||
);
|
||||
cursor_pixel.x += (1 + size) as f32 + thickness_pixels * 2.0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user