X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.district.maps%2Fsrc%2Forg%2Fsimantics%2Fmaps%2Fsg%2FMapLocationZoomInfoNode.java;h=790ebbe01b7550155a6040042439dde96d30ae64;hb=7851902c16663a27134ec1c8f72e3206b4d47dad;hp=bad499e6f02cb7ca6408608495b1a23753ccc304;hpb=17c52752fcc15ee30a7790b96e3976214077761b;p=simantics%2Fdistrict.git diff --git a/org.simantics.district.maps/src/org/simantics/maps/sg/MapLocationZoomInfoNode.java b/org.simantics.district.maps/src/org/simantics/maps/sg/MapLocationZoomInfoNode.java index bad499e6..790ebbe0 100644 --- a/org.simantics.district.maps/src/org/simantics/maps/sg/MapLocationZoomInfoNode.java +++ b/org.simantics.district.maps/src/org/simantics/maps/sg/MapLocationZoomInfoNode.java @@ -13,8 +13,9 @@ import java.util.Locale; import org.simantics.g2d.participant.MouseUtil; import org.simantics.g2d.participant.MouseUtil.MouseInfo; -import org.simantics.maps.MapScalingTransform; +import org.simantics.maps.elevation.server.SingletonTiffTileInterface; import org.simantics.scenegraph.g2d.G2DNode; +import org.simantics.scenegraph.utils.DPIUtil; public class MapLocationZoomInfoNode extends G2DNode { @@ -35,12 +36,10 @@ public class MapLocationZoomInfoNode extends G2DNode { Color originalColor = g2d.getColor(); g2d.transform(transform); - AffineTransform tr = g2d.getTransform(); - g2d.setTransform(new AffineTransform()); // do the rendering magic - Font rulerFont = new Font("Tahoma", Font.PLAIN, 9); + Font rulerFont = new Font("Tahoma", Font.PLAIN, DPIUtil.upscale(9)); //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setStroke(new BasicStroke(1)); @@ -50,7 +49,6 @@ public class MapLocationZoomInfoNode extends G2DNode { if (bounds == null) return; // FIXME - int zoomLevel = MapScalingTransform.zoomLevel(ot); MouseInfo mouseInfo = util.getMouseInfo(0); double startLat; @@ -66,8 +64,9 @@ public class MapLocationZoomInfoNode extends G2DNode { startLat = 0; startLon = 0; } - + Number zoomLevel = SingletonTiffTileInterface.lookup(startLat, startLon); String str = "X: " + formatValue(startLon, MAX_DIGITS) + ", Y: " + formatValue(startLat, MAX_DIGITS) + ", Z: " + zoomLevel; + g2d.setFont(rulerFont); FontMetrics fm = g2d.getFontMetrics(); Rectangle2D r = fm.getStringBounds(str, g2d);