GeoSoft API

no.geosoft.cc.graphics
Class GViewport

Object
  extended byGViewport

public class GViewport
extends Object

This class represent the area of the window where graphics will be drawn. The viewport is defined by three points as follows:

     x0,y0 o-------o  x1,y1
           |
           |
           |
     x2,y2 o
 
A typical viewport will have y0 == y1 and x2 == x0, but the definition makes it possible to create skewed viewports in order to produce pseudo 3D graphics for instance.

Clients sets viewport on a scene through the GScene.setViewport() methods.

Author:
GeoSoft
See Also:
(int, int, int, int, int, int);, (int, int, int, int);

Method Summary
 double getCenterX()
          Return horizontal center of this viewport.
 double getCenterY()
          Return vertical center of this viewport.
 double getHeight()
          Return height of viewport
 double getWidth()
          Return width of viewport
 int getX0()
          Return X coordinate of viewport point 0.
 int getX1()
          Return X coordinate of viewport point 1.
 int getX2()
          Return X coordinate of viewport point 2.
 int getX3()
          Return X coordinate of viewport point 3.
 int getY0()
          Return Y coordinate of viewport point 0.
 int getY1()
          Return Y coordinate of viewport point 1.
 int getY2()
          Return Y coordinate of viewport point 2.
 int getY3()
          Return Y coordinate of viewport point 3.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getX0

public int getX0()
Return X coordinate of viewport point 0.

Returns:
X coordinate of viewport point 0.

getY0

public int getY0()
Return Y coordinate of viewport point 0.

Returns:
Y coordinate of viewport point 0.

getX1

public int getX1()
Return X coordinate of viewport point 1.

Returns:
X coordinate of viewport point 1.

getY1

public int getY1()
Return Y coordinate of viewport point 1.

Returns:
Y coordinate of viewport point 1.

getX2

public int getX2()
Return X coordinate of viewport point 2.

Returns:
X coordinate of viewport point 2.

getY2

public int getY2()
Return Y coordinate of viewport point 2.

Returns:
Y coordinate of viewport point 2.

getX3

public int getX3()
Return X coordinate of viewport point 3. Point 3 is the lower right corner of the viewport.

Returns:
X coordinate of viewport point 2.

getY3

public int getY3()
Return Y coordinate of viewport point 3. Point 3 is the lower right corner of the viewport.

Returns:
Y coordinate of viewport point 2.

getWidth

public double getWidth()
Return width of viewport

Returns:
Width of viewport.

getHeight

public double getHeight()
Return height of viewport

Returns:
Width of viewport.

getCenterX

public double getCenterX()
Return horizontal center of this viewport.

Returns:
Horizontal center of this viewport.

getCenterY

public double getCenterY()
Return vertical center of this viewport.

Returns:
Vertical center of this viewport.

GeoSoft API

Copyright © 2004 - Geotechnical Software Services     geosoft.no