Changeset 602 in josm
- Timestamp:
- 2008-04-12T11:21:26+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r598 r602 320 320 if (lines && old != null) { 321 321 322 // break out if a maxLineLength is set and the line is longer. 323 if (maxLineLength > -1){ 324 if (trkPnt.latlon.distance(oldWp.latlon) < maxLineLength){ 325 g.drawLine(old.x, old.y, screen.x, screen.y); 326 327 if (direction) { 328 double t = Math.atan2(screen.y-old.y, screen.x-old.x) + Math.PI; 329 g.drawLine(screen.x,screen.y, (int)(screen.x + 10*Math.cos(t-PHI)), (int)(screen.y + 10*Math.sin(t-PHI))); 330 g.drawLine(screen.x,screen.y, (int)(screen.x + 10*Math.cos(t+PHI)), (int)(screen.y + 10*Math.sin(t+PHI))); 331 } 332 }else{ 333 g.drawRect(screen.x, screen.y, 0, 0); 322 // draw line, if no maxLineLength is set or the line is shorter. 323 if (maxLineLength == -1 || trkPnt.latlon.distance(oldWp.latlon) <= maxLineLength){ 324 g.drawLine(old.x, old.y, screen.x, screen.y); 325 326 if (direction) { 327 double t = Math.atan2(screen.y-old.y, screen.x-old.x) + Math.PI; 328 g.drawLine(screen.x,screen.y, (int)(screen.x + 10*Math.cos(t-PHI)), (int)(screen.y + 10*Math.sin(t-PHI))); 329 g.drawLine(screen.x,screen.y, (int)(screen.x + 10*Math.cos(t+PHI)), (int)(screen.y + 10*Math.sin(t+PHI))); 334 330 } 331 }else{ 332 g.drawRect(screen.x, screen.y, 0, 0); 335 333 } 336 334
Note:
See TracChangeset
for help on using the changeset viewer.