Arbitrary Sprite Transformations
DOME supports rotation (in 90 degree increments) and integer scaling, but I'd like to allow for arbitrary transformations (including skews and full 360 degree rotations).
This will matter more to people operating at higher resolutions. It's also essential that it be as performant as possible.
I'm assuming that SDL2 has some function already available for this already?
It does, but DOME doesn't use any of SDL's graphics routines so it doesn't directly help us.
Okay, I can take a look at this if you want me to (?), I can then write about it in more detail if I figure something out and perhaps open up a PR.
You are certainly welcome to. Some fresh eyes are always appreciated.
I toyed with a few approaches to this before DOME hot 1.0, they are sitting on the "basis" and "rotate" branches, but it's definitely not in a workable state at the moment.
Hmm, I've taken a look at it, and with the 90 degrees it seems simple enough. But not sure what the math would be to calculate the new position rotated n degrees. Perhaps this works: https://stackoverflow.com/questions/26007202/calculate-new-point-offset-based-on-angle-of-rotation