Ticket #4234: antialiasing.patch

File antialiasing.patch, 1.0 KB (added by Upliner, 15 years ago)

Simple patch to fix this issue

  • src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintVisitor.java

     
    99import java.awt.Point;
    1010import java.awt.Polygon;
    1111import java.awt.Rectangle;
     12import java.awt.RenderingHints;
    1213import java.awt.geom.Point2D;
    1314import java.util.ArrayList;
    1415import java.util.Collection;
     
    938939        minEN = nc.getEastNorth(0, nc.getHeight() - 1);
    939940        maxEN = nc.getEastNorth(nc.getWidth() - 1, 0);
    940941
     942        g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
     943                Main.pref.getBoolean("mappaint.use-antialiasing", false) ?
     944                        RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_OFF);
     945
    941946        this.paintSettings = MapPaintSettings.INSTANCE;
    942947        this.painter = new MapPainter(paintSettings, g, inactive, nc, virtual, dist, circum);
    943948