pipe.gui
Class ZoomController
java.lang.Object
pipe.gui.ZoomController
public class ZoomController
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZoomController
public ZoomController(GuiView view)
ZoomController
public ZoomController(int pct,
GuiView view)
zoomOut
public void zoomOut()
zoomIn
public void zoomIn()
getTransform
public java.awt.geom.AffineTransform getTransform()
getPercent
public int getPercent()
setPercent
public void setPercent(int newPercent)
getUnzoomedValue
public int getUnzoomedValue(double val)
- Calculates the value of the screen distance val at 100% zoom
- Parameters:
val
-
- Returns:
getZoomPositionForXLocation
public double getZoomPositionForXLocation(double locationX)
- Calculates where the correct screen x position at the current zoom is
for an object with "real" x value locationX.
- Parameters:
locationX
-
- Returns:
getZoomPositionForYLocation
public double getZoomPositionForYLocation(double locationY)
- Calculates where the correct screen y position at the current zoom is
for an object with "real" y value locationY.
- Parameters:
locationY
-
- Returns:
setZoom
public void setZoom(int newPercent)