Artenus 2D Framework
Artenus Reference
Represents a viewport for a render target. A viewport is an area on the frame that is used for rendering. The rest of the available area on the target will not be touched.
public class Viewport

Field Summary

Modifier and TypeField and Description
protected height
Holds viewport height.
protected width
Holds viewport width.

Constructor Summary

Modifier and TypeConstructor and Description
public Viewport(int width, int height)
Creates a new viewport with given width and height.

Method Summary

Modifier and TypeMethod and Description
public intgetHeight()
Gets the frame height for this viewport.
public intgetWidth()
Gets the frame width in this viewport.

Methods inherited from java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

height
protected height
Holds viewport height.
width
protected width
Holds viewport width.

Constructor Detail

Viewport
public  Viewport(
    int width,
    int height
)
Creates a new viewport with given width and height.
Parameters:
widthViewport width
heightViewport height

Method Detail

getHeight
public int getHeight()
Gets the frame height for this viewport.
Returns:
Frame height
getWidth
public int getWidth()
Gets the frame width in this viewport.
Returns:
Frame width