mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -04:00
Pre-existing bug fix: round strikethrough and underline to pixel coord
This commit is contained in:
@@ -1656,7 +1656,7 @@ impl Tessellator {
|
|||||||
if a.x == b.x {
|
if a.x == b.x {
|
||||||
// Vertical line
|
// Vertical line
|
||||||
let mut x = a.x;
|
let mut x = a.x;
|
||||||
stroke.round_coord_to_pixel(self.pixels_per_point, &mut x);
|
stroke.round_center_to_pixel(self.pixels_per_point, &mut x);
|
||||||
a.x = x;
|
a.x = x;
|
||||||
b.x = x;
|
b.x = x;
|
||||||
|
|
||||||
@@ -1677,7 +1677,7 @@ impl Tessellator {
|
|||||||
if a.y == b.y {
|
if a.y == b.y {
|
||||||
// Horizontal line
|
// Horizontal line
|
||||||
let mut y = a.y;
|
let mut y = a.y;
|
||||||
stroke.round_coord_to_pixel(self.pixels_per_point, &mut y);
|
stroke.round_center_to_pixel(self.pixels_per_point, &mut y);
|
||||||
a.y = y;
|
a.y = y;
|
||||||
b.y = y;
|
b.y = y;
|
||||||
|
|
||||||
|
|||||||
@@ -866,7 +866,8 @@ fn add_row_hline(
|
|||||||
let mut last_right_x = f32::NAN;
|
let mut last_right_x = f32::NAN;
|
||||||
|
|
||||||
for glyph in &row.glyphs {
|
for glyph in &row.glyphs {
|
||||||
let (stroke, y) = stroke_and_y(glyph);
|
let (stroke, mut y) = stroke_and_y(glyph);
|
||||||
|
stroke.round_center_to_pixel(point_scale.pixels_per_point, &mut y);
|
||||||
|
|
||||||
if stroke == Stroke::NONE {
|
if stroke == Stroke::NONE {
|
||||||
end_line(line_start.take(), last_right_x);
|
end_line(line_start.take(), last_right_x);
|
||||||
|
|||||||
Reference in New Issue
Block a user