]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.district.maps/src/org/simantics/maps/sg/MapAttributionNode.java
Elimination of compiler warnings.
[simantics/district.git] / org.simantics.district.maps / src / org / simantics / maps / sg / MapAttributionNode.java
index 66543aac457858b4b8db49eb8d5c108244d7f692..b2d28c0b7575491bdd0e3d690c19fbf42fc30ccc 100644 (file)
@@ -10,6 +10,7 @@ import java.awt.geom.AffineTransform;
 import java.awt.geom.Rectangle2D;
 
 import org.simantics.scenegraph.g2d.G2DNode;
+import org.simantics.scenegraph.utils.DPIUtil;
 
 public class MapAttributionNode extends G2DNode {
 
@@ -28,12 +29,10 @@ public class MapAttributionNode 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));
@@ -43,7 +42,9 @@ public class MapAttributionNode extends G2DNode {
         if (bounds == null)
             return; // FIXME
 
-        String str = "Map data © OpenStreetMap contributors";
+        String str = "Map data \u00A9 OpenStreetMap contributors";
+        
+        g2d.setFont(rulerFont);
         FontMetrics fm = g2d.getFontMetrics();
         Rectangle2D r = fm.getStringBounds(str, g2d);