Ignore:
Timestamp:
2016-08-22T21:16:36+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13413 - Clean ImproveWayAccuracyAction, add new class MapViewPath (patch by michael2402, modified) - gsoc-core

Location:
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/ArrowPaintHelper.java

    r10829 r10875  
    33
    44import org.openstreetmap.josm.gui.MapViewState.MapViewPoint;
     5import org.openstreetmap.josm.gui.draw.MapPath2D;
    56import org.openstreetmap.josm.tools.Utils;
    67
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r10856 r10875  
    2121import java.awt.font.TextLayout;
    2222import java.awt.geom.AffineTransform;
    23 import java.awt.geom.GeneralPath;
    2423import java.awt.geom.Path2D;
    2524import java.awt.geom.Point2D;
     
    6362import org.openstreetmap.josm.gui.MapViewState.MapViewPoint;
    6463import org.openstreetmap.josm.gui.NavigatableComponent;
     64import org.openstreetmap.josm.gui.draw.MapPath2D;
     65import org.openstreetmap.josm.gui.draw.MapViewPath;
    6566import org.openstreetmap.josm.gui.mappaint.ElemStyles;
    6667import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
     
    13921393        // only highlight the segment if the way itself is not highlighted
    13931394        if (!way.isHighlighted() && highlightWaySegments != null) {
    1394             GeneralPath highlightSegs = null;
     1395            MapViewPath highlightSegs = null;
    13951396            for (WaySegment ws : highlightWaySegments) {
    13961397                if (ws.way != way || ws.lowerIndex < offset) {
     
    13981399                }
    13991400                if (highlightSegs == null) {
    1400                     highlightSegs = new GeneralPath();
    1401                 }
    1402 
    1403                 Point2D p1 = mapState.getPointFor(ws.getFirstNode()).getInView();
    1404                 Point2D p2 = mapState.getPointFor(ws.getSecondNode()).getInView();
    1405                 highlightSegs.moveTo(p1.getX(), p1.getY());
    1406                 highlightSegs.lineTo(p2.getX(), p2.getY());
     1401                    highlightSegs = new MapViewPath(mapState);
     1402                }
     1403
     1404                highlightSegs.moveTo(ws.getFirstNode());
     1405                highlightSegs.lineTo(ws.getSecondNode());
    14071406            }
    14081407
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java

    r10829 r10875  
    3030import org.openstreetmap.josm.gui.MapViewState.MapViewPoint;
    3131import org.openstreetmap.josm.gui.NavigatableComponent;
     32import org.openstreetmap.josm.gui.draw.MapPath2D;
    3233
    3334/**
Note: See TracChangeset for help on using the changeset viewer.