libgdx/libgdx — pull request #1539 by monkeyhybrid (2014-03-24 16:28:30+00:00)
Title: FixedScaleViewport

With the new Viewport classes that were added recently, there isn't a viewport type to support fixed 'pixels per world unit' type rendering. This pull request contains a new FixedScaleViewport than can be instantiated with just a scaling factor. The world width and height will simply be scaled from the screen dimensions, by the specified scaling factor. If the screen is resized, the world dimensions will change proportionally. So, for example, a game that relies on the fact that 32 pixels represent 1 world unit, could use a FixedScaleViewport(1/32).

This patch also adds the new viewport to the relevant tests.