com.badlogic.gdx.backends.android.surfaceview
Class RatioResolutionStrategy

java.lang.Object
  extended by com.badlogic.gdx.backends.android.surfaceview.RatioResolutionStrategy
All Implemented Interfaces:
ResolutionStrategy

public class RatioResolutionStrategy
extends Object
implements ResolutionStrategy

This ResolutionStrategy will maintain a given aspect ratio and stretch the GLSurfaceView to the maximum available screen size.

Author:
christoph widulle

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.badlogic.gdx.backends.android.surfaceview.ResolutionStrategy
ResolutionStrategy.MeasuredDimension
 
Constructor Summary
RatioResolutionStrategy(float ratio)
           
RatioResolutionStrategy(float width, float height)
           
 
Method Summary
 ResolutionStrategy.MeasuredDimension calcMeasures(int widthMeasureSpec, int heightMeasureSpec)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RatioResolutionStrategy

public RatioResolutionStrategy(float ratio)

RatioResolutionStrategy

public RatioResolutionStrategy(float width,
                               float height)
Method Detail

calcMeasures

public ResolutionStrategy.MeasuredDimension calcMeasures(int widthMeasureSpec,
                                                         int heightMeasureSpec)
Specified by:
calcMeasures in interface ResolutionStrategy


Copyright © 2014. All Rights Reserved.