mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 20:53:53 +00:00
43d7184b35
# 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. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |