Skip to content
Snippets Groups Projects
Commit a41981fa authored by Niklas Haas's avatar Niklas Haas
Browse files

common: add aspect ratio helper code

This is sufficiently nontrivial and often-needed enough that providing
helpers makes a lot of sense. Add some extra helpers that come up when
rendering to sub-rects of targets.

The only annoying thing here is the mismatch between pl_rect2df and
pl_rect2d. Maybe I can come up with a better API here?

Also update the sdl2 demo to actually preserve the aspect ratio, as well
as add some test cases to the new helper functions.
parent f74ad3c8
No related branches found
No related tags found
1 merge request!96common: add aspect ratio helper code
Pipeline #17750 passed with stages
in 7 minutes and 22 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment