Changeset 2941 in josm for trunk/src/org
- Timestamp:
- 2010-02-05T15:37:09+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Bounds.java
r2845 r2941 172 172 return true; 173 173 } 174 175 /** 176 * The two bounds intersect? Compared to java Shape.intersects, if does not use 177 * the interior but the closure. (">=" instead of ">") 178 */ 179 public boolean intersects(Bounds b) { 180 return b.getMax().lat() >= minLat && 181 b.getMax().lon() >= minLon && 182 b.getMin().lat() <= maxLat && 183 b.getMin().lon() <= maxLon; 184 } 185 174 186 175 187 /** -
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r2907 r2941 613 613 for (GpxTrack trk: data.tracks) { 614 614 for (GpxTrackSegment trkSeg: trk.getSegments()) { 615 if (trkSeg.getBounds(). asRect().intersects(box.asRect())) {615 if (trkSeg.getBounds().intersects(box)) { 616 616 visibleSegments.add(trkSeg.getWayPoints()); 617 617 }
Note:
See TracChangeset
for help on using the changeset viewer.