org.formaria.svg
Class PointSystem

java.lang.Object
  extended by org.formaria.svg.PointSystem

public class PointSystem
extends java.lang.Object

Copyright (c) Formaria Ltd., 2008, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Formaria.

$Revision: 1.2 $


Field Summary
protected  SvgImageMap imageMap
           
 
Constructor Summary
PointSystem(SvgImageMap imageMap)
          Creates a new instance of PointSystem This class is used to convert points from the glasspane coordinate system to the svg coordinate system and vice-versa.
 
Method Summary
 java.awt.geom.Point2D glassPaneToSvg(double x, double y)
          Converts a coordinate from the glasspane coordinate system to the svg map coordinate system.
 java.awt.geom.Point2D svgToGlassPane(double x, double y)
          Converts a coordinate from the svg map coordinate system to the glasspane coordinate system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imageMap

protected SvgImageMap imageMap
Constructor Detail

PointSystem

public PointSystem(SvgImageMap imageMap)
Creates a new instance of PointSystem This class is used to convert points from the glasspane coordinate system to the svg coordinate system and vice-versa.

Method Detail

glassPaneToSvg

public java.awt.geom.Point2D glassPaneToSvg(double x,
                                            double y)
Converts a coordinate from the glasspane coordinate system to the svg map coordinate system.

Parameters:
x - a double specifying the x coordinate to be converted.
y - a double specifying the y coordinate to be converted.
Returns:
Point2D object containing the converted coordinates.

svgToGlassPane

public java.awt.geom.Point2D svgToGlassPane(double x,
                                            double y)
Converts a coordinate from the svg map coordinate system to the glasspane coordinate system.

Parameters:
x - a double specifying the x coordinate to be converted.
y - a double specifying the y coordinate to be converted.
Returns:
Point2D object containing the converted coordinates.