Changeset 12161 in josm for trunk/src/org/openstreetmap/josm/data/validation
- Timestamp:
- 2017-05-15T15:43:30+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/PaintVisitor.java
r12131 r12161 3 3 4 4 import java.awt.Color; 5 import java.awt.Graphics ;5 import java.awt.Graphics2D; 6 6 import java.awt.Point; 7 7 import java.util.HashSet; … … 18 18 import org.openstreetmap.josm.data.osm.visitor.AbstractVisitor; 19 19 import org.openstreetmap.josm.gui.MapView; 20 import org.openstreetmap.josm.gui.draw.MapViewPath; 21 import org.openstreetmap.josm.gui.draw.SymbolShape; 20 22 import org.openstreetmap.josm.tools.Utils; 21 23 … … 27 29 public class PaintVisitor extends AbstractVisitor implements ValidatorVisitor { 28 30 /** The graphics */ 29 private final Graphics g;31 private final Graphics2D g; 30 32 /** The MapView */ 31 33 private final MapView mv; … … 44 46 * @param mv The Mapview 45 47 */ 46 public PaintVisitor(Graphics g, MapView mv) {48 public PaintVisitor(Graphics2D g, MapView mv) { 47 49 this.g = g; 48 50 this.mv = mv; … … 121 123 122 124 if (!paintedPoints.contains(pp)) { 123 Point p = mv.getPoint(n);125 MapViewPath circle = new MapViewPath(mv.getState()).shapeAround(n, SymbolShape.CIRCLE, 10); 124 126 125 127 if (selected) { 126 128 g.setColor(getHighlightColor(color)); 127 g.fill Oval(p.x - 5, p.y - 5, 10, 10);129 g.fill(circle); 128 130 } 129 131 g.setColor(color); 130 g.draw Oval(p.x - 5, p.y - 5, 10, 10);132 g.draw(circle); 131 133 paintedPoints.add(pp); 132 134 }
Note:
See TracChangeset
for help on using the changeset viewer.