edu.stanford.smi.protegex.widget.imagemap
Class CoordinateTransform
java.lang.Object
|
+--edu.stanford.smi.protegex.widget.imagemap.CoordinateTransform
- public class CoordinateTransform
- extends Object
Takes two rectangles, does the calculations both forwards and back.
Basically a simple matrix transformation that restricts itself to integers
(the domain of the AWT universe). Map from coordinates in one rectangle to
coordinates in another rectangle. Used in diagrams.
- Author:
- William Grosso
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CoordinateTransform
public CoordinateTransform(Rectangle firstRect,
Rectangle secondRect)
mapPointIntoFirstRect
public Point mapPointIntoFirstRect(int xCoord,
int yCoord)
mapPointIntoFirstRect
public Point mapPointIntoFirstRect(Point point)
mapPointIntoSecondRect
public Point mapPointIntoSecondRect(int xCoord,
int yCoord)
mapPointIntoSecondRect
public Point mapPointIntoSecondRect(Point point)
mapRectIntoFirstRect
public Rectangle mapRectIntoFirstRect(Rectangle rectangle)
mapRectIntoSecondRect
public Rectangle mapRectIntoSecondRect(Rectangle rectangle)
setFirstCoordinateSystem
public void setFirstCoordinateSystem(Rectangle rectangle)
setFlipX
public void setFlipX(boolean flipX)
setFlipY
public void setFlipY(boolean flipY)
setSecondCoordinateSystem
public void setSecondCoordinateSystem(Rectangle rectangle)
Submit a bug report or feature request
Protege-2000 is a trademark of Stanford University.
Copyright (c) 1998-2002 Stanford University.