[fix]: Text not being centered when using center alignment
Some checks failed
/ clippy (push) Failing after 5m32s
/ test (push) Failing after 6m10s

This commit is contained in:
Chris Cochrun 2026-04-28 09:33:12 -05:00
parent 495a28180f
commit 42c3bd3068

View file

@ -330,7 +330,7 @@ impl TextSvg {
let position = half_lines.mul_add(
-text_and_line_spacing,
middle_position,
);
) + text_and_line_spacing / 2.0;
("start", position, "10")
}
TextAlignment::MiddleCenter => {
@ -338,7 +338,7 @@ impl TextSvg {
let position = half_lines.mul_add(
-text_and_line_spacing,
middle_position,
);
) + text_and_line_spacing / 2.0;
("middle", position, center_y.as_str())
}
TextAlignment::MiddleRight => {
@ -346,7 +346,7 @@ impl TextSvg {
let position = half_lines.mul_add(
-text_and_line_spacing,
middle_position,
);
) + text_and_line_spacing / 2.0;
("end", position, x_width_padded.as_str())
}
TextAlignment::BottomLeft => {