Files
Andreas Loew de157c44e8 Texture2DRegion: support trimmed and rotated sprites optionally load origin from atlas data file (#1004)
* Added the following features to Texture2DRegion to improve sprite sheet packing efficiency:
- Regions on the texture can now be rotated.
- Transparent borders around sprites can be trimmed.

The SpriteBatch.Draw method will automatically rotate the region back to its original orientation and restore the transparent borders during rendering.

Additionally, since sprite sheet data files can define sprite origins, TextureRegion2D can now optionally store this origin. Sprites created from a Texture2DRegion will use this stored origin as their default.

* Adapted nine-patch sprite implementation for support rotated / trimmed sprites, too.

* Extended the TextureAtlas content pipeline to support trimmed and rotated sprites, as well as reading anchor points (origins) from the data file.
The JSON format has been cleaned up by removing unnecessary keys. The legacy format remains supported for backward compatibility.

* added build-time check to ensure that texture image file referenced by atlas data file exists
2025-08-04 12:04:25 -04:00
..
2024-07-06 23:46:20 -04:00
2024-07-06 23:46:20 -04:00
2024-07-06 23:46:20 -04:00
2024-07-06 23:46:20 -04:00
2024-07-06 23:46:20 -04:00
2024-07-06 23:46:20 -04:00
2024-07-06 23:46:20 -04:00
2024-07-06 23:46:20 -04:00
2024-07-06 23:46:20 -04:00
2024-07-06 23:46:20 -04:00