libgdx/libgdx — pull request #2116 by gemurdock (2014-07-15 18:55:26+00:00)
Title: Added MultiAspectViewport to support many aspect ratios

Commit comment: Added MultiAspectViewport and created ViewportTestMultiAspectRatio for testing the class.

Summary: I needed a view port which could account for many aspect ratios, being 4:3 - 16:9. I liked the solution that was presented for Clash of the Olympians, but it did not work like they said. I now have a proper working version of what he was trying to create. This includes a test class to show how it works.

Basic idea: Creates a new FitViewport at largest possible size that preserves a certain range of view port aspect ratios and sizes. While it does not extend FitViewport, it does the same basic thing.

Here is a download to a working example (JAR): https://drive.google.com/file/d/0B5FgN8-ZK8hPWUNka0Y5eG5zTFk/edit?usp=sharing

Here is virus total for the JAR: https://www.virustotal.com/en/file/29c32c5403183bb5bfec4fd46b3e426d5a9cf9966cce124a58e5a89530697975/analysis/1405450317/

**Ikarus is presenting a false positive for the virus total.

As you can see, for any give screen width and height it will not show red as long as it is between 4:3 and 16:9.

Please let me know if you think this would be helpful to libgdx and its community.

Thanks!