public final class Resolution extends Object
width
and height
: represent the screen sizeratio
, which is computed by using the width
and height
, allows to know the
screen ratio.rate
: represents the screen refresh rate (in frames per seconds)This class is Thread-Safe.
Constructor and Description |
---|
Resolution(int width,
int height,
int rate)
Create a resolution.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Resolution |
get2x()
Get scaled by 2.
|
Resolution |
get3x()
Get scaled by 3.
|
int |
getHeight()
Get the resolution height.
|
int |
getRate()
Get the display rate.
|
Resolution |
getScaled(double factorX,
double factorY)
Get scaled resolution.
|
int |
getWidth()
Get the resolution width.
|
int |
hashCode() |
public Resolution(int width, int height, int rate)
width
- The resolution width (in pixel) (strictly positive).height
- The resolution height (in pixel) (strictly positive).rate
- The refresh rate (usually 50 or 60) (positive).LionEngineException
- If arguments are invalid.public Resolution get2x()
public Resolution get3x()
public Resolution getScaled(double factorX, double factorY)
factorX
- The horizontal scale factor.factorY
- The vertical scale factor.LionEngineException
- If factor is not strictly superior to 0.public int getWidth()
public int getHeight()
public int getRate()
Copyright © 2017 Byron 3D Games Studio. All rights reserved.