Changeset 25910 in osm for applications
- Timestamp:
- 2011-04-27T18:01:10+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/ImproveWayAccuracy
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/ImproveWayAccuracy/build.xml
r25899 r25910 103 103 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.iwa.IWAPlugin" /> 104 104 <attribute name="Plugin-Date" value="${version.entry.commit.date}" /> 105 <attribute name="Plugin-Icon" value="images/favicon.png" /> 105 106 <attribute name="Plugin-Description" value="Can be useful when you are improving accuracy of existing ways. The idea of the plugin is to substitute dragging and dropping nodes with clicking to quicken the editing process." /> 106 <attribute name="Plugin-Icon" value="images/favicon.png" />107 107 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/ImproveWayAccuracy" /> 108 <attribute name="ru_Plugin-Link" value="http://wiki.openstreetmap.org/wiki/RU:JOSM/Plugins/ImproveWayAccuracy" /> 108 109 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" /> 109 110 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" /> -
applications/editors/josm/plugins/ImproveWayAccuracy/src/org/openstreetmap/josm/plugins/iwa/IWAMode.java
r25903 r25910 89 89 90 90 private final Color guideColor; 91 private final BasicStroke selectTargetWayStroke; 92 private final BasicStroke moveNodeStroke; 93 private final BasicStroke addNodeStroke; 91 94 92 95 private boolean selectionChangedBlocked = false; … … 111 114 112 115 guideColor = PaintColors.HIGHLIGHT.get(); 116 selectTargetWayStroke = new BasicStroke(2, BasicStroke.CAP_ROUND, 117 BasicStroke.JOIN_ROUND); 118 float dash1[] = { 4.0f }; 119 moveNodeStroke = new BasicStroke(1.0f, BasicStroke.CAP_BUTT, 120 BasicStroke.JOIN_MITER, 10.0f, dash1, 0.0f); 121 addNodeStroke = new BasicStroke(1, BasicStroke.CAP_BUTT, 122 BasicStroke.JOIN_MITER); 113 123 } 114 124 … … 216 226 // Non-native highlighting is used, because sometimes highlighted 217 227 // segments are covered with others, which is bad. 218 g.setStroke(new BasicStroke(2, BasicStroke.CAP_ROUND, 219 BasicStroke.JOIN_ROUND)); 228 g.setStroke(selectTargetWayStroke); 220 229 221 230 List<Node> nodes = targetWay.getNodes(); … … 239 248 // that is going to be moved. 240 249 // Non-native highlighting is used here as well. 241 g.setStroke(new BasicStroke(1, BasicStroke.CAP_ROUND,242 BasicStroke.JOIN_ROUND));243 250 244 251 // Finding endpoints 245 252 Point p1 = null, p2 = null; 246 253 if (candidateSegment != null) { 254 g.setStroke(addNodeStroke); 247 255 p1 = mv.getPoint(candidateSegment.getFirstNode()); 248 256 p2 = mv.getPoint(candidateSegment.getSecondNode()); 249 257 } else if (candidateNode != null) { 258 g.setStroke(moveNodeStroke); 250 259 List<Pair<Node, Node>> wpps = targetWay.getNodePairs(false); 251 260 for (Pair<Node, Node> wpp : wpps) { … … 262 271 GeneralPath b = new GeneralPath(); 263 272 if (p1 != null) { 264 b.moveTo(p1.x, p1.y);265 b.lineTo(mousePos.x, mousePos.y);266 } else {267 273 b.moveTo(mousePos.x, mousePos.y); 268 } 269 if (p2 != null) 274 b.lineTo(p1.x, p1.y); 275 } 276 if (p2 != null) { 277 b.moveTo(mousePos.x, mousePos.y); 270 278 b.lineTo(p2.x, p2.y); 279 } 271 280 g.draw(b); 272 281 … … 415 424 } 416 425 426 mousePos = null; 417 427 updateCursor(); 418 428 updateStatusLine();
Note:
See TracChangeset
for help on using the changeset viewer.