mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -04:00
Make the ends of vline/hline sharper
This commit is contained in:
@@ -1644,6 +1644,9 @@ impl Tessellator {
|
|||||||
round_line_segment(&mut x, &stroke, self.pixels_per_point);
|
round_line_segment(&mut x, &stroke, self.pixels_per_point);
|
||||||
a.x = x;
|
a.x = x;
|
||||||
b.x = x;
|
b.x = x;
|
||||||
|
|
||||||
|
a.y = a.y.round_to_pixel_center(self.pixels_per_point);
|
||||||
|
b.y = b.y.round_to_pixel_center(self.pixels_per_point);
|
||||||
}
|
}
|
||||||
if a.y == b.y {
|
if a.y == b.y {
|
||||||
// Horizontal line
|
// Horizontal line
|
||||||
@@ -1651,6 +1654,9 @@ impl Tessellator {
|
|||||||
round_line_segment(&mut y, &stroke, self.pixels_per_point);
|
round_line_segment(&mut y, &stroke, self.pixels_per_point);
|
||||||
a.y = y;
|
a.y = y;
|
||||||
b.y = y;
|
b.y = y;
|
||||||
|
|
||||||
|
a.x = a.x.round_to_pixel_center(self.pixels_per_point);
|
||||||
|
b.x = b.x.round_to_pixel_center(self.pixels_per_point);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user