Changeset 2602 in osm for applications
- Timestamp:
- 2007-04-19T22:59:49+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mappaint/src/mappaint/MapPaintVisitor.java
r2597 r2602 81 81 } 82 82 } 83 84 if(area) 85 { 86 drawWayAsArea(w,colour); 87 } 88 else 89 { 90 int orderNumber = 0; 91 for (Segment ls : w.segments) 92 { 93 orderNumber++; 94 if (isSegmentVisible(ls)) 83 boolean fillAreas = Main.pref.getBoolean("mappaint.fillareas", true); 84 85 if (area && fillAreas) 86 drawWayAsArea(w, colour); 87 int orderNumber = 0; 88 for (Segment ls : w.segments) 89 { 90 orderNumber++; 91 if (isSegmentVisible(ls)) 92 { 93 if (area && fillAreas) 94 //Draw segments in a different colour so direction arrows show against the fill 95 drawSegment(ls, w.selected ? getPreferencesColor("selected", Color.YELLOW) : getPreferencesColor("untagged",Color.GRAY), width); 96 else 97 drawSegment(ls, w.selected ? getPreferencesColor("selected", Color.YELLOW) : colour, width); 98 if (!ls.incomplete && Main.pref.getBoolean("draw.segment.order_number")) 95 99 { 96 if (!ls.selected) // selected already in good color 97 drawSegment(ls, w.selected ? 98 getPreferencesColor("selected", Color.YELLOW) : colour, 99 width); 100 if (!ls.incomplete && Main.pref.getBoolean("draw.segment.order_number")) 100 try 101 101 { 102 try 103 { 104 drawOrderNumber(ls, orderNumber); 105 } 106 catch (IllegalAccessError e) {} //SimplePaintVisitor::drawOrderNumber was private prior to rev #211 102 g.setColor(w.selected ? getPreferencesColor("selected", Color.YELLOW) : colour); 103 drawOrderNumber(ls, orderNumber); 107 104 } 105 catch (IllegalAccessError e) {} //SimplePaintVisitor::drawOrderNumber was private prior to rev #211 108 106 } 109 107 } … … 133 131 getPreferencesColor("selected", Color.YELLOW) : colour); 134 132 135 if(Main.pref.getBoolean("mappaint.fillareas", true)) 136 g.fillPolygon(polygon); 137 else 138 { 139 Graphics2D g2d = (Graphics2D)g; 140 g2d.setStroke(new BasicStroke(2)); 141 g.drawPolygon(polygon); 142 g2d.setStroke(new BasicStroke(1)); 143 } 133 g.fillPolygon(polygon); 144 134 } 145 135 … … 234 224 // Shows areas before non-areas 235 225 public void visitAll(DataSet data) { 236 237 for (final OsmPrimitive osm : data.ways) {238 if(!osm.deleted && MapPaintPlugin.elemStyles.isArea(osm))239 osm.visit(this);240 }241 242 226 for (final OsmPrimitive osm : data.segments) 243 227 if (!osm.deleted) 244 228 osm.visit(this); 245 246 247 for (final OsmPrimitive osm : data.ways) { 248 if(!osm.deleted && !MapPaintPlugin.elemStyles.isArea(osm)) 249 osm.visit(this); 250 } 229 230 for (final OsmPrimitive osm : data.ways) 231 if (!osm.deleted && MapPaintPlugin.elemStyles.isArea(osm)) 232 osm.visit(this); 233 234 for (final OsmPrimitive osm : data.ways) 235 if (!osm.deleted && !MapPaintPlugin.elemStyles.isArea(osm)) 236 osm.visit(this); 251 237 252 238 for (final OsmPrimitive osm : data.nodes)
Note:
See TracChangeset
for help on using the changeset viewer.