Changeset 3685 in josm


Ignore:
Timestamp:
2010-11-29T23:13:54+01:00 (13 years ago)
Author:
bastiK
Message:

fixed #5245 - strange lines in wireframe view (activate clipping unconditionally, in MapPaintVisitor this is already the case)

File:
1 edited

Legend:

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

    r3594 r3685  
    192192
    193193        //profilerN = 0;
    194         for (final OsmPrimitive osm : data.getSelected())
     194        for (final OsmPrimitive osm : data.getSelected()) {
    195195            if (!osm.isDeleted()) {
    196196                osm.visit(this);
    197197                //        profilerN++;
    198198            }
     199        }
    199200        displaySegments();
    200201
     
    469470
    470471    protected void drawSegment(GeneralPath path, Point p1, Point p2, boolean showDirection) {
    471         boolean drawIt = false;
    472         if (Main.isOpenjdk) {
    473             /**
    474              * Work around openjdk bug. It leads to drawing artefacts when zooming in a lot. (#4289, #4424)
    475              * (It looks like int overflow when clipping.) We do custom clipping.
    476              */
    477             Rectangle bounds = g.getClipBounds();
    478             bounds.grow(100, 100);                  // avoid arrow heads at the border
    479             LineClip clip = new LineClip(p1, p2, bounds);
    480             drawIt = clip.execute();
     472        Rectangle bounds = g.getClipBounds();
     473        bounds.grow(100, 100);                  // avoid arrow heads at the border
     474        LineClip clip = new LineClip(p1, p2, bounds);
     475        if (clip.execute()) {
    481476            p1 = clip.getP1();
    482477            p2 = clip.getP2();
    483         } else {
    484             drawIt = isSegmentVisible(p1, p2);
    485         }
    486         if (drawIt) {
    487478            path.moveTo(p1.x, p1.y);
    488479            path.lineTo(p2.x, p2.y);
Note: See TracChangeset for help on using the changeset viewer.