All Packages Class Hierarchy This Package Previous Next Index
Class edu.cmu.owl.ui.twoD.PointConverter
edu.cmu.owl.ui.twoD.PointConverter
- public class PointConverter
Utility class for converting points and shapes from one unit system to
another. Used by OWL to go from physical coordinates (in the map) to
screen coordinates for the 2D view.
-
PointConverter(float)
-
-
getScale()
-
-
setScale(float)
-
-
toPixel(Point)
- Convert this point in physical units to pixels.
-
toPixels(Dimension)
-
-
toPixels(Polygon)
-
-
toPixels(Rectangle)
-
-
toUnits(Point)
- Convert this point in pixels to physical units.
PointConverter
public PointConverter(float scale)
- Parameters:
- scale - The larger the scale, the larger the map.
setScale
public void setScale(float scale)
getScale
public float getScale()
toPixel
public Point toPixel(Point pt)
- Convert this point in physical units to pixels.
toPixels
public Dimension toPixels(Dimension d)
toPixels
public Rectangle toPixels(Rectangle r)
toPixels
public Polygon toPixels(Polygon p)
toUnits
public Point toUnits(Point pt)
- Convert this point in pixels to physical units.
All Packages Class Hierarchy This Package Previous Next Index