Changeset 3685 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2010-11-29T23:13:54+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/SimplePaintVisitor.java
r3594 r3685 192 192 193 193 //profilerN = 0; 194 for (final OsmPrimitive osm : data.getSelected()) 194 for (final OsmPrimitive osm : data.getSelected()) { 195 195 if (!osm.isDeleted()) { 196 196 osm.visit(this); 197 197 // profilerN++; 198 198 } 199 } 199 200 displaySegments(); 200 201 … … 469 470 470 471 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()) { 481 476 p1 = clip.getP1(); 482 477 p2 = clip.getP2(); 483 } else {484 drawIt = isSegmentVisible(p1, p2);485 }486 if (drawIt) {487 478 path.moveTo(p1.x, p1.y); 488 479 path.lineTo(p2.x, p2.y);
Note:
See TracChangeset
for help on using the changeset viewer.