Ignore:
Timestamp:
2017-05-15T15:43:30+02:00 (7 years ago)
Author:
michael2402
Message:

See #13415: Add the ILatLon interface, unify handling of Nodes and CachedLatLon

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/PaintVisitor.java

    r12131 r12161  
    33
    44import java.awt.Color;
    5 import java.awt.Graphics;
     5import java.awt.Graphics2D;
    66import java.awt.Point;
    77import java.util.HashSet;
     
    1818import org.openstreetmap.josm.data.osm.visitor.AbstractVisitor;
    1919import org.openstreetmap.josm.gui.MapView;
     20import org.openstreetmap.josm.gui.draw.MapViewPath;
     21import org.openstreetmap.josm.gui.draw.SymbolShape;
    2022import org.openstreetmap.josm.tools.Utils;
    2123
     
    2729public class PaintVisitor extends AbstractVisitor implements ValidatorVisitor {
    2830    /** The graphics */
    29     private final Graphics g;
     31    private final Graphics2D g;
    3032    /** The MapView */
    3133    private final MapView mv;
     
    4446     * @param mv The Mapview
    4547     */
    46     public PaintVisitor(Graphics g, MapView mv) {
     48    public PaintVisitor(Graphics2D g, MapView mv) {
    4749        this.g = g;
    4850        this.mv = mv;
     
    121123
    122124        if (!paintedPoints.contains(pp)) {
    123             Point p = mv.getPoint(n);
     125            MapViewPath circle = new MapViewPath(mv.getState()).shapeAround(n, SymbolShape.CIRCLE, 10);
    124126
    125127            if (selected) {
    126128                g.setColor(getHighlightColor(color));
    127                 g.fillOval(p.x - 5, p.y - 5, 10, 10);
     129                g.fill(circle);
    128130            }
    129131            g.setColor(color);
    130             g.drawOval(p.x - 5, p.y - 5, 10, 10);
     132            g.draw(circle);
    131133            paintedPoints.add(pp);
    132134        }
Note: See TracChangeset for help on using the changeset viewer.