Changeset 5024 in osm for applications/editors/josm
- Timestamp:
- 2007-10-15T23:35:04+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mappaint/src/mappaint/MapPaintVisitor.java
r4847 r5024 31 31 protected boolean zoomLevelDisplay; 32 32 protected boolean fillAreas; 33 protected int fillAlpha; 33 34 protected Color untaggedColor; 34 35 protected Color textColor; … … 168 169 Polygon polygon = new Polygon(); 169 170 Point p; 171 // set the opacity (alpha) level of the filled polygon 172 Color coloura = new Color( colour.getRed(), colour.getGreen(), colour.getBlue(), fillAlpha); 173 170 174 for (Node n : w.nodes) 171 175 { … … 175 179 176 180 g.setColor( w.selected ? 177 selectedColor : colour );181 selectedColor : coloura); 178 182 179 183 g.fillPolygon(polygon); … … 306 310 fillAreas = Main.pref.getBoolean("mappaint.fillareas", true); 307 311 312 /* XXX - there must be a better way to get a bounded Integer pref! */ 313 try { 314 fillAlpha = Integer.valueOf(Main.pref.get("mappaint.fillalpha", "50")); 315 if(fillAlpha < 0) { 316 fillAlpha = 0; 317 } 318 if(fillAlpha > 255) { 319 fillAlpha = 255; 320 } 321 } catch (NumberFormatException nfe) { 322 fillAlpha = 50; 323 } 324 308 325 Collection<Way> noAreaWays = new LinkedList<Way>(); 309 326
Note:
See TracChangeset
for help on using the changeset viewer.