[Schmitzm-commits] r2001 - trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/gui

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Thu May 17 16:25:26 CEST 2012


Author: mojays
Date: 2012-05-17 16:25:26 +0200 (Thu, 17 May 2012)
New Revision: 2001

Modified:
   trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/gui/XMapPane.java
Log:
Missing XMapPane.tranformWindowToGeo(int,int) re-establish; maybe replaced by tranformWindowToGeo(int,int,int,int)?

Modified: trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/gui/XMapPane.java
===================================================================
--- trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/gui/XMapPane.java	2012-05-17 14:16:44 UTC (rev 2000)
+++ trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/gui/XMapPane.java	2012-05-17 14:25:26 UTC (rev 2001)
@@ -2319,12 +2319,12 @@
 	}
 
 	/**
-	 * Transformiert einen Geo-Koordinate in eine Fenster-Koordinaten.
+	 * Transformiert eine Geo-Koordinate in eine Fenster-Koordinaten.
 	 * 
 	 * @param x
-	 *            X-Koordinate der VON-Position
+	 *            X-Koordinate in Geo-Koordinaten
 	 * @param y
-	 *            Y-Koordinate der VON-Position
+	 *            Y-Koordinate in Geo-Koordinaten
 	 */
 	public Point2D tranformGeoToWindow(final double x, final double y) {
 		return getWorldToScreenTransform().transform(new Point2D.Double(x, y),
@@ -2359,6 +2359,19 @@
 	}
 
 	/**
+     * Transformiert eine Fenster-Koordinate in Geo-Koordinaten.
+     * 
+     * @param x
+     *            X-Koordinate in Fenster-Koordinaten
+     * @param y
+     *            Y-Koordinate in Fenster-Koordinaten
+     */
+    public Point2D tranformWindowToGeo(final int x, final int y) {
+        return getScreenToWorld().transform(new Point2D.Double(x, y),
+                null);
+    }
+
+	/**
 	 * Will update the cursor. If all rendering is finished also stops the
 	 * {@link #repaintTimer}
 	 */



More information about the Schmitzm-commits mailing list