Changeset 2987 in josm for trunk/src/org/openstreetmap/josm/data/osm/visitor
- Timestamp:
- 2010-02-14T20:23:18+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPainter.java
r2890 r2987 131 131 132 132 private void drawSegment(GeneralPath path, Point p1, Point p2, boolean showDirection, boolean reversedDirection) { 133 if (isSegmentVisible(p1, p2)) { 134 133 boolean drawIt = false; 134 if (Main.isOpenjdk) { 135 /** 136 * Work around openjdk bug. It leads to drawing artefacts when zooming in a lot. (#4289, #4424) 137 * (It looks like int overflow when clipping.) We do custom clipping. 138 */ 139 Rectangle bounds = g.getClipBounds(); 140 bounds.grow(100, 100); // avoid arrow heads at the border 141 LineClip clip = new LineClip(); 142 drawIt = clip.cohenSutherland(p1.x, p1.y, p2.x, p2.y, bounds.x, bounds.y, bounds.x+bounds.width, bounds.y+bounds.height); 143 p1 = clip.getP1(); 144 p2 = clip.getP2(); 145 } else { 146 drawIt = isSegmentVisible(p1, p2); 147 } 148 if (drawIt) { 135 149 /* draw segment line */ 136 150 path.moveTo(p1.x, p1.y);
Note:
See TracChangeset
for help on using the changeset viewer.