We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4390

Summary: SDL_RenderCopyEx rotation and global scaling around the wrong way
Product: SDL Reporter: Anthony @ POW Games <ant>
Component: renderAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: sezeroz
Version: 2.0.9   
Hardware: All   
OS: All   

Description Anthony @ POW Games 2018-11-19 01:14:21 UTC
This should be an easy fix. Simply apply global scale factor after rotating verts?

The problem is when using SDL_RenderSetScale with non-equal width and height. This scale factor is applied before rotation. I can't think of any situation where this is the desired result. It means the rotated shape is distorted. Say you have a square texture, and scale factor of 1, .5, the square will be squashed and rotated, rather than rotated, then squashed in unison with all the other non-rotated shapes.
Comment 1 Anthony @ POW Games 2018-11-19 13:16:05 UTC
After briefly looking at the source code, I can see there is no simple fix for this. Scaling is done before the angle is passed down deeper into the renderer's QueueCopyEx(). 

Scaling would need to be passed down deeper into the renderer queue and applied there.

This is still a bug though. It's caused me many problems that I've had to find a messy work-around for in most of my designs.