public class ViewportConfiguration extends Object
ViewportConfiguration
states how a particular GL rendering should
occupy a canvas area.
It is define by a width and height, and support an X and Y offsethttp://www.opengl.org/sdk/docs/man/xhtml/glViewport.xml
Modifier and Type | Field and Description |
---|---|
protected int |
height |
protected ViewportMode |
mode |
protected int |
width |
protected int |
x |
protected int |
y |
Constructor and Description |
---|
ViewportConfiguration(ICanvas canvas)
A viewport configuration that occupies the complete canvas area.
|
ViewportConfiguration(int width,
int height) |
ViewportConfiguration(int width,
int height,
int x,
int y) |
Modifier and Type | Method and Description |
---|---|
int |
getHeight() |
ViewportMode |
getMode() |
int |
getWidth() |
int |
getX() |
int |
getY() |
float |
ratio()
computes width/height
|
void |
setHeight(int height) |
void |
setMode(ViewportMode mode) |
void |
setWidth(int width) |
void |
setX(int x) |
void |
setY(int y) |
String |
toString() |
protected int width
protected int height
protected int x
protected int y
protected ViewportMode mode
public ViewportConfiguration(int width, int height)
public ViewportConfiguration(int width, int height, int x, int y)
public ViewportConfiguration(ICanvas canvas)
public int getWidth()
public void setWidth(int width)
public int getHeight()
public void setHeight(int height)
public int getX()
public void setX(int x)
public int getY()
public void setY(int y)
public float ratio()
public ViewportMode getMode()
public void setMode(ViewportMode mode)
Copyright © 2016. All rights reserved.