diff --git a/src/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRenderer.java b/src/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRenderer.java
index 205323e..b496391 100644
|
a
|
b
|
package org.openstreetmap.josm.data.osm.visitor.paint;
|
| 4 | 4 | import java.awt.Color; |
| 5 | 5 | import java.awt.Graphics2D; |
| 6 | 6 | import java.awt.Point; |
| | 7 | import java.awt.RenderingHints; |
| 7 | 8 | import java.awt.geom.GeneralPath; |
| 8 | 9 | import java.awt.geom.Point2D; |
| 9 | 10 | import java.util.Iterator; |
| … |
… |
public abstract class AbstractMapRenderer implements Rendering {
|
| 51 | 52 | |
| 52 | 53 | /** Preference: minimum space (displayed way length) to display segment numbers */ |
| 53 | 54 | protected int segmentNumberSpace; |
| | 55 | /** Preference: use smooth graphics */ |
| | 56 | protected Object antialiasing; |
| 54 | 57 | |
| 55 | 58 | /** |
| 56 | 59 | * <p>Creates an abstract paint visitor</p> |
| … |
… |
public abstract class AbstractMapRenderer implements Rendering {
|
| 229 | 232 | } |
| 230 | 233 | } |
| 231 | 234 | } |
| | 235 | |
| | 236 | public void setAntialiasing(boolean antialiasing) { |
| | 237 | setAntialiasing(antialiasing ? RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_OFF); |
| | 238 | } |
| | 239 | |
| | 240 | public void setAntialiasing(Object antialiasing) { |
| | 241 | this.antialiasing = antialiasing; |
| | 242 | applyAntialiasing(); |
| | 243 | } |
| | 244 | |
| | 245 | public void applyAntialiasing() { |
| | 246 | if (antialiasing == null) getSettings(false); |
| | 247 | g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, antialiasing); |
| | 248 | } |
| 232 | 249 | } |
diff --git a/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java b/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
index 3a61bf7..d35c529 100644
|
a
|
b
|
public class StyledMapRenderer extends AbstractMapRenderer {
|
| 337 | 337 | private Font orderFont; |
| 338 | 338 | |
| 339 | 339 | private boolean leftHandTraffic; |
| 340 | | private Object antialiasing; |
| 341 | 340 | |
| 342 | 341 | /** |
| 343 | 342 | * Constructs a new {@code StyledMapRenderer}. |
| … |
… |
public class StyledMapRenderer extends AbstractMapRenderer {
|
| 1532 | 1531 | isOutlineOnly = paintSettings.isOutlineOnly(); |
| 1533 | 1532 | orderFont = new Font(Main.pref.get("mappaint.font", "Droid Sans"), Font.PLAIN, Main.pref.getInteger("mappaint.fontsize", 8)); |
| 1534 | 1533 | |
| 1535 | | antialiasing = Main.pref.getBoolean("mappaint.use-antialiasing", true) ? |
| 1536 | | RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_OFF; |
| 1537 | | g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, antialiasing); |
| | 1534 | setAntialiasing(Main.pref.getBoolean("mappaint.use-antialiasing", true) ? |
| | 1535 | RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_OFF); |
| 1538 | 1536 | |
| 1539 | 1537 | Object textAntialiasing; |
| 1540 | 1538 | switch (Main.pref.get("mappaint.text-antialiasing", "default")) { |
diff --git a/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java b/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java
index aad01af..740c55b 100644
|
a
|
b
|
public class WireframeMapRenderer extends AbstractMapRenderer implements Visitor
|
| 140 | 140 | fillConnectionNode = settings.isFillConnectionNode(); |
| 141 | 141 | fillTaggedNode = settings.isFillTaggedNode(); |
| 142 | 142 | |
| 143 | | g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, |
| 144 | | Main.pref.getBoolean("mappaint.wireframe.use-antialiasing", false) ? |
| 145 | | RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_OFF); |
| | 143 | setAntialiasing(Main.pref.getBoolean("mappaint.wireframe.use-antialiasing", false) ? |
| | 144 | RenderingHints.VALUE_ANTIALIAS_ON : RenderingHints.VALUE_ANTIALIAS_OFF); |
| 146 | 145 | } |
| 147 | 146 | |
| 148 | 147 | /** |
diff --git a/src/org/openstreetmap/josm/gui/MapView.java b/src/org/openstreetmap/josm/gui/MapView.java
index b2e4b35..5ac7fa6 100644
|
a
|
b
|
import org.openstreetmap.josm.data.coor.LatLon;
|
| 51 | 51 | import org.openstreetmap.josm.data.imagery.ImageryInfo; |
| 52 | 52 | import org.openstreetmap.josm.data.osm.DataSet; |
| 53 | 53 | import org.openstreetmap.josm.data.osm.OsmPrimitive; |
| | 54 | import org.openstreetmap.josm.data.osm.visitor.paint.MapRendererFactory; |
| 54 | 55 | import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors; |
| 55 | 56 | import org.openstreetmap.josm.data.osm.visitor.paint.Rendering; |
| 56 | 57 | import org.openstreetmap.josm.data.osm.visitor.paint.relations.MultipolygonCache; |
| … |
… |
implements PropertyChangeListener, PreferenceChangedListener, OsmDataLayer.Layer
|
| 681 | 682 | } |
| 682 | 683 | |
| 683 | 684 | Graphics2D tempG = offscreenBuffer.createGraphics(); |
| | 685 | MapRendererFactory.getInstance().createActiveRenderer(tempG, (NavigatableComponent) this, false).applyAntialiasing(); |
| 684 | 686 | tempG.setClip(g.getClip()); |
| 685 | 687 | Bounds box = getLatLonBounds(g.getClipBounds()); |
| 686 | 688 | |