bevy/crates/bevy_ui
ickshonpe 43d7184b35
Fix the UV calculations for clipped and flipped ImageNodes (#8195)
# Objective

Instead of flipping the entire image, `prepare_ui_nodes` only flips the
unclipped area.

<img width="652" alt="overflow_flipped_bug"
src="https://user-images.githubusercontent.com/27962798/227587867-1467c6ae-8693-45c3-87cb-793cc5b433e4.png">

## Solution

Whenever flip_x or flip_y is set swap the image rect coordinates and
invert the clipping coords along the flipped axes before the UVs are
calculated.

<img width="656" alt="overflow_fixed"
src="https://user-images.githubusercontent.com/27962798/227588839-e0dde3b9-dc26-4652-a129-2faab2d07281.PNG">

--

## Changelog

* Modified `prepare_uinodes` so that the UVs for clipped and flipped
image nodes are calculated correctly.
2023-04-17 15:58:34 +00:00
..
src Fix the UV calculations for clipped and flipped ImageNodes (#8195) 2023-04-17 15:58:34 +00:00
Cargo.toml text_system split (#7779) 2023-04-17 15:23:21 +00:00