Changeset 2807 in osm
- Timestamp:
- 2007-05-06T23:59:34+02:00 (18 years ago)
- Location:
- applications/editors/josm/plugins/mappaint
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mappaint/src/mappaint/ElemStyleHandler.java
r2787 r2807 107 107 curIcon = new ImageIcon(imageFile); 108 108 } else { 109 try { 110 URL path = getClass().getResource("/standard/icons/"+atts.getValue(count)); 111 curIcon = new ImageIcon(Toolkit.getDefaultToolkit().createImage(path)); 112 } 113 catch (Exception e){ 109 114 URL path = getClass().getResource("/standard/icons/amenity.png"); 110 115 curIcon = new ImageIcon(Toolkit.getDefaultToolkit().createImage(path)); 116 117 } 111 118 } 112 119 } else if (atts.getQName(count).equals("annotate")) -
applications/editors/josm/plugins/mappaint/src/mappaint/MapPaintVisitor.java
r2796 r2807 65 65 @Override public void visit(Way w) { 66 66 double circum = Main.map.mapView.getScale()*100*Main.proj.scaleFactor()*40041455; // circumference of the earth in meter 67 boolean showDirection = Main.pref.getBoolean("draw.segment.direction") ; 68 if (Main.pref.getBoolean("mappaint.useRealWidth",false) && showDirection && !w.selected) showDirection = false; 67 69 Color colour = getPreferencesColor("untagged",Color.GRAY); 68 70 int width = 2; … … 94 96 if (area && fillAreas) 95 97 //Draw segments in a different colour so direction arrows show against the fill 96 drawSegment(ls, w.selected ? getPreferencesColor("selected", Color.YELLOW) : getPreferencesColor("untagged",Color.GRAY), Main.pref.getBoolean("draw.segment.direction"), width,true);98 drawSegment(ls, w.selected ? getPreferencesColor("selected", Color.YELLOW) : getPreferencesColor("untagged",Color.GRAY),showDirection, width,true); 97 99 else 98 100 if (area) 99 drawSegment(ls, w.selected ? getPreferencesColor("selected", Color.YELLOW) : colour, Main.pref.getBoolean("draw.segment.direction"), width,true);101 drawSegment(ls, w.selected ? getPreferencesColor("selected", Color.YELLOW) : colour,showDirection, width,true); 100 102 else 101 if (realWidth > 0 && Main.pref.getBoolean("mappaint.useRealWidth",false) ){103 if (realWidth > 0 && Main.pref.getBoolean("mappaint.useRealWidth",false) && !showDirection){ 102 104 int tmpWidth = (int) (100 / (float) (circum / realWidth)); 103 105 if (tmpWidth > width) width = tmpWidth; 104 106 } 105 107 106 drawSegment(ls, w.selected ? getPreferencesColor("selected", Color.YELLOW) : colour, Main.pref.getBoolean("draw.segment.direction"), width,false);108 drawSegment(ls, w.selected ? getPreferencesColor("selected", Color.YELLOW) : colour,showDirection, width,false); 107 109 if (!ls.incomplete && Main.pref.getBoolean("draw.segment.order_number")) 108 110 { … … 169 171 // Altered - now specify width 170 172 @Override protected void drawSegment(Segment ls, Color col,boolean showDirection) { 173 if (Main.pref.getBoolean("mappaint.useRealWidth",false) && showDirection && !ls.selected) showDirection = false; 171 174 drawSegment(ls,col,showDirection,1,false); 172 175 } … … 188 191 g2d.setStroke(new BasicStroke(width,BasicStroke.CAP_BUTT,BasicStroke.JOIN_ROUND,0,new float[] {9},0)); 189 192 else 190 g2d.setStroke(new BasicStroke(width)); 193 g2d.setStroke(new BasicStroke(width,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND)); 194 //g2d.setStroke(new BasicStroke(width)); 191 195 192 196 Point p1 = nc.getPoint(ls.from.eastNorth); -
applications/editors/josm/plugins/mappaint/styles/standard/elemstyles.xml
r2796 r2807 235 235 </rule> 236 236 237 <rule> 238 <condition k="military" v="danger_area" /> 239 <area colour="#b62c2c"/> 240 </rule> 237 241 238 242 <rule>
Note:
See TracChangeset
for help on using the changeset viewer.