public class Navigation
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.awt.geom.AffineTransform |
calcTransform(boolean rotate,
double displayX,
double displayY,
double displayWidth,
double displayHeight)
Calculate an affine transform based on the display size parameters - used for printing.
|
ProjectionRect |
getMapArea(ProjectionRect rect)
Get current MapArea .
|
double |
getPixPerWorld() |
double |
getScreenHeight() |
double |
getScreenWidth() |
java.awt.geom.AffineTransform |
getTransform()
Get the affine transform based on screen size and world bounding box
|
void |
moveDown() |
void |
moveLeft() |
void |
moveRight() |
void |
moveUp() |
void |
pan(double deltax,
double deltay)
call this to change the center of the screen's world coordinates.
|
ProjectionRect |
screenToWorld(java.awt.geom.Point2D start,
java.awt.geom.Point2D end)
convert screen Rectangle to a projection (world) rectangle
|
ProjectionPointImpl |
screenToWorld(java.awt.geom.Point2D p,
ProjectionPointImpl w)
convert a display point to a world coordinate
|
void |
setMapArea(ProjectionRect ma) |
void |
setScreenSize(double pwidth,
double pheight) |
boolean |
wantRotate(double displayWidth,
double displayHeight) |
java.awt.geom.Point2D |
worldToScreen(ProjectionPointImpl w,
java.awt.geom.Point2D p)
convert a world coordinate to a display point
|
java.awt.Rectangle |
worldToScreen(ProjectionRect projRect)
convert a projection (world) rectangle to a screen Rectangle
|
void |
zoom(double startx,
double starty,
double width,
double height)
call this to zoom into a subset of the screen.
|
void |
zoomIn() |
void |
zoomIn(double x,
double y) |
void |
zoomOut() |
void |
zoomOut(double x,
double y) |
void |
zoomPrevious() |
public double getScreenWidth()
public double getScreenHeight()
public void setScreenSize(double pwidth, double pheight)
public java.awt.geom.AffineTransform getTransform()
public boolean wantRotate(double displayWidth, double displayHeight)
public java.awt.geom.AffineTransform calcTransform(boolean rotate, double displayX, double displayY, double displayWidth, double displayHeight)
rotate
- should the page be rotated?displayX
- upper right corner of display areadisplayY
- upper right corner of display areadisplayWidth
- display areadisplayHeight
- display area
see Navigation.calcTransformpublic ProjectionRect getMapArea(ProjectionRect rect)
rect
- : place results here, or null to create new Objectpublic void setMapArea(ProjectionRect ma)
public java.awt.geom.Point2D worldToScreen(ProjectionPointImpl w, java.awt.geom.Point2D p)
public ProjectionPointImpl screenToWorld(java.awt.geom.Point2D p, ProjectionPointImpl w)
public double getPixPerWorld()
public ProjectionRect screenToWorld(java.awt.geom.Point2D start, java.awt.geom.Point2D end)
public java.awt.Rectangle worldToScreen(ProjectionRect projRect)
public void pan(double deltax, double deltay)
public void zoom(double startx, double starty, double width, double height)
public void zoomIn(double x, double y)
public void zoomOut(double x, double y)
public void zoomIn()
public void zoomOut()
public void moveDown()
public void moveUp()
public void moveRight()
public void moveLeft()
public void zoomPrevious()