1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

Fix multi-line TextShape rotation (#7404)

* Closes <https://github.com/emilk/egui/issues/7397>
* [X] I have followed the instructions in the PR template
I do admit I got a peak NixOS `RequestDeviceError` and deemed it
entirely not worth it to think about that.

https://github.com/emilk/egui/pull/5411 broke rotation of multi-line
`TextShape`s because `PlacedRow::pos` was no longer being rotated, so
let's rotate it.

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Co-authored-by: Lucas Meurer <hi@lucasmerlin.me>
This commit is contained in:
Hubert Głuchowski
2025-08-05 13:11:45 +02:00
committed by Emil Ernerfeldt
parent aef9015e34
commit 2f7bcf26f2

View File

@@ -2031,7 +2031,7 @@ impl Tessellator {
continue;
}
let final_row_pos = galley_pos + row.pos.to_vec2();
let final_row_pos = galley_pos + rotator * row.pos.to_vec2();
let mut row_rect = row.visuals.mesh_bounds;
if *angle != 0.0 {