public class Resolution extends Object implements Comparable, Settings
Modifier and Type | Field and Description |
---|---|
static Resolution |
RESOLUTION_1024x768
Common screen resolution.
|
static Resolution |
RESOLUTION_1440x1080
Common screen resolution.
|
static Resolution |
RESOLUTION_1600x1200
Common screen resolution.
|
static Resolution |
RESOLUTION_160x120
Common screen resolution.
|
static Resolution |
RESOLUTION_320x240
Common screen resolution.
|
static Resolution |
RESOLUTION_640x480
Common screen resolution.
|
Constructor and Description |
---|
Resolution(int width,
int height)
Creates a
Resolution that stores a width to
height resolution size. |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o)
Compares which resolution has more pixels.
|
static List<Resolution> |
defaultResolutions()
Default set of resolutions (image width and height set) to test
profiling on, based on standard computer resolutions.
|
int |
getHeight()
Returns the image height of the resolution in pixels.
|
Object[] |
getOutput()
Gets the list of data to output this as settings.
|
int |
getPixels()
Returns the amount of pixels based on this resolution.
|
Object[] |
getTitle()
List of headers for the data members.
|
int |
getWidth()
Returns the image width of the resolution in pixels.
|
void |
setHeight(int height)
Sets the image height of the resolution in pixels.
|
void |
setWidth(int width)
Sets the image width of the resolution in pixels.
|
String |
toString()
Returns a string representation of the resolution.
|
public static Resolution RESOLUTION_160x120
public static Resolution RESOLUTION_320x240
public static Resolution RESOLUTION_640x480
public static Resolution RESOLUTION_1024x768
public static Resolution RESOLUTION_1440x1080
public static Resolution RESOLUTION_1600x1200
public Resolution(int width, int height)
Resolution
that stores a width to
height resolution size.width
- image width in pixelsheight
- image height in pixelspublic final void setWidth(int width)
width
- image width in pixelspublic final void setHeight(int height)
height
- image height in pixelspublic int getWidth()
public int getHeight()
public int getPixels()
public String toString()
public int compareTo(Object o)
compareTo
in interface Comparable
o
- other resolution to compare topublic static List<Resolution> defaultResolutions()
public Object[] getTitle()
Settings
Copyright © 2015. All rights reserved.