com.hardcode.gdbms.engine.spatial
Class ViewPort

java.lang.Object
  extended by com.hardcode.gdbms.engine.spatial.ViewPort

public class ViewPort
extends java.lang.Object

Defines a visualization of a spatial area


Constructor Summary
ViewPort(int width, int height, java.awt.Graphics2D g)
          Creates a new DefaultViewPort object.
 
Method Summary
 java.awt.geom.Rectangle2D getAdjustedExtent()
          Gets the extent adjusted to the width and heigth of the image
 java.awt.geom.Rectangle2D getExtent()
          Gets the area of data to be drawn
 java.awt.Graphics2D getGraphics()
           
 int getHeight()
           
 java.awt.geom.AffineTransform getTransformationMatrix()
          matrix used to 'bring' the geometries to the image rectangle
 int getWidth()
           
 void setExtent(java.awt.geom.Rectangle2D extent)
          Sets the area of the data to be drawn
 void setHeight(int h)
           
 void setWidth(int w)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewPort

public ViewPort(int width,
                int height,
                java.awt.Graphics2D g)
Creates a new DefaultViewPort object.

Parameters:
width - width of the image to be obtained
height - heigth of the image to be obtained
g - Graphics where to draw
Method Detail

getAdjustedExtent

public java.awt.geom.Rectangle2D getAdjustedExtent()
Gets the extent adjusted to the width and heigth of the image

Returns:
Rectangle2D

getExtent

public java.awt.geom.Rectangle2D getExtent()
Gets the area of data to be drawn

Returns:
Rectangle2D

setExtent

public void setExtent(java.awt.geom.Rectangle2D extent)
Sets the area of the data to be drawn

Parameters:
extent - Rectangle2D

getWidth

public int getWidth()

getHeight

public int getHeight()

getGraphics

public java.awt.Graphics2D getGraphics()

setHeight

public void setHeight(int h)

setWidth

public void setWidth(int w)

getTransformationMatrix

public java.awt.geom.AffineTransform getTransformationMatrix()
matrix used to 'bring' the geometries to the image rectangle

Returns:
AffineTransform


Copyright © 2005-2006 . All Rights Reserved.