Changeset 2853 in osm for applications/editors/josm/plugins
- Timestamp:
- 2007-05-09T23:39:04+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mappaint/src/mappaint/MapPaintVisitor.java
r2808 r2853 20 20 import org.openstreetmap.josm.data.osm.OsmPrimitive; 21 21 import org.openstreetmap.josm.data.osm.visitor.SimplePaintVisitor; 22 23 import java.awt.event.MouseEvent; 24 22 25 23 26 /** … … 181 184 if (ls.shown) return; 182 185 ls.shown=true; 186 if (ls.incomplete) 187 return; 183 188 Point p1 = nc.getPoint(ls.from.eastNorth); 184 189 Point p2 = nc.getPoint(ls.to.eastNorth); 190 185 191 // checking if this segment is visible 186 192 if ((p1.x < 0) && (p2.x < 0)) return ; … … 189 195 if ((p1.y > nc.getHeight()) && (p2.y > nc.getHeight())) return ; 190 196 Graphics2D g2d = (Graphics2D)g; 191 if (ls.incomplete)192 return;193 197 if (ls.selected) 194 198 col = getPreferencesColor("selected", Color.YELLOW); … … 204 208 if (showDirection) { 205 209 double t = Math.atan2(p2.y-p1.y, p2.x-p1.x) + Math.PI; 206 207 210 g.drawLine(p2.x,p2.y, (int)(p2.x + 10*Math.cos(t-PHI)), (int)(p2.y + 10*Math.sin(t-PHI))); 211 g.drawLine(p2.x,p2.y, (int)(p2.x + 10*Math.cos(t+PHI)), (int)(p2.y + 10*Math.sin(t+PHI))); 208 212 } 209 213 g2d.setStroke(new BasicStroke(1)); … … 247 251 if (!osm.deleted) 248 252 osm.visit(this); 249 253 250 254 for (final OsmPrimitive osm : data.nodes) 251 255 if (!osm.deleted) … … 259 263 } 260 264 } 265
Note:
See TracChangeset
for help on using the changeset viewer.