Skip to content

Commit

Permalink
don't clip text that is rotated (#15925)
Browse files Browse the repository at this point in the history
# Objective

- Fixes #15922 , #15853 
- Don't clip text that is rotated by some angles

## Solution

- Compare to the absolute size before clipping
  • Loading branch information
mockersf authored Oct 15, 2024
1 parent af93e78 commit 812e599
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_ui/src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1158,9 +1158,9 @@ pub fn prepare_uinodes(
let transformed_rect_size =
glyph.transform.transform_vector3(rect_size);
if positions_diff[0].x - positions_diff[1].x
>= transformed_rect_size.x
>= transformed_rect_size.x.abs()
|| positions_diff[1].y - positions_diff[2].y
>= transformed_rect_size.y
>= transformed_rect_size.y.abs()
{
continue;
}
Expand Down

0 comments on commit 812e599

Please sign in to comment.