All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.badlogic.gdx.utils.viewport.FillViewport Maven / Gradle / Ivy

There is a newer version: 1.13.0
Show newest version

package com.badlogic.gdx.utils.viewport;

import com.badlogic.gdx.graphics.Camera;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.utils.Scaling;

/** A ScalingViewport that uses {@link Scaling#fill} so it keeps the aspect ratio by scaling the world up to take the whole screen
 * (some of the world may be off screen).
 * @author Daniel Holderbaum
 * @author Nathan Sweet */
public class FillViewport extends ScalingViewport {
	/** Creates a new viewport using a new {@link OrthographicCamera}. */
	public FillViewport (float worldWidth, float worldHeight) {
		super(Scaling.fill, worldWidth, worldHeight);
	}

	public FillViewport (float worldWidth, float worldHeight, Camera camera) {
		super(Scaling.fill, worldWidth, worldHeight, camera);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy