public final class Resolution extends Object
width & height
: represent the screen sizeratio
, which is computed by using the width & height
, allows to know the screen ratio.rate
: represents the screen refresh rate (in frames per seconds)Constructor and Description |
---|
Resolution(int width,
int height,
int rate)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getHeight()
Get the resolution height.
|
int |
getRate()
Get the display rate.
|
double |
getRatio()
Get the resolution ratio.
|
int |
getWidth()
Get the resolution width.
|
void |
set(int width,
int height)
Set the resolution.
|
void |
set(int width,
int height,
int rate)
Set the resolution.
|
void |
setRate(int rate)
Set the refresh rate value in hertz.
|
void |
setRatio(double ratio)
Set the ratio and adapt the resolution to the new ratio (based on the height value).
|
public Resolution(int width, int height, int rate)
width
- The resolution width (in pixel).height
- The resolution height (in pixel).rate
- The refresh rate (usually 50 or 60).public void set(int width, int height)
width
- The resolution width (in pixel).height
- The resolution height (in pixel).public void set(int width, int height, int rate)
width
- The resolution width (in pixel) [> 0].height
- The resolution height (in pixel) [> 0].rate
- The refresh rate in hertz (usually 50 or 60) [>= 0].public void setRatio(double ratio)
ratio
- The new ratio [> 0].public void setRate(int rate)
rate
- The refresh rate value [>= 0].public int getWidth()
public int getHeight()
public double getRatio()
public int getRate()
Copyright © 2014 Byron 3D Games Studio. All rights reserved.