]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.district.maps/src/org/simantics/maps/sg/MapLocationZoomInfoNode.java
Elimination of compiler warnings.
[simantics/district.git] / org.simantics.district.maps / src / org / simantics / maps / sg / MapLocationZoomInfoNode.java
index bad499e6f02cb7ca6408608495b1a23753ccc304..c081c92336c692c75d5031fa5ea46e8523713208 100644 (file)
@@ -15,6 +15,7 @@ import org.simantics.g2d.participant.MouseUtil;
 import org.simantics.g2d.participant.MouseUtil.MouseInfo;
 import org.simantics.maps.MapScalingTransform;
 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));
@@ -68,6 +67,7 @@ public class MapLocationZoomInfoNode extends G2DNode {
         }
         
         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);