Changeset 16100 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2020-03-09T00:35:05+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/RenderingHelper.java
r15731 r16100 11 11 import java.awt.image.BufferedImage; 12 12 import java.io.IOException; 13 import java.io.PrintStream; 13 14 import java.util.Collection; 14 15 import java.util.HashMap; … … 19 20 import org.openstreetmap.josm.data.ProjectionBounds; 20 21 import org.openstreetmap.josm.data.osm.DataSet; 22 import org.openstreetmap.josm.data.osm.OsmPrimitive; 21 23 import org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer; 22 24 import org.openstreetmap.josm.data.projection.Projection; … … 24 26 import org.openstreetmap.josm.gui.NavigatableComponent; 25 27 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource; 28 import org.openstreetmap.josm.gui.mappaint.styleelement.StyleElement; 26 29 import org.openstreetmap.josm.io.IllegalDataException; 27 30 import org.openstreetmap.josm.tools.CheckParameterUtil; … … 41 44 private Color backgroundColor; 42 45 private boolean fillBackground = true; 46 private PrintStream debugStream; 43 47 44 48 /** … … 183 187 smr.setStyles(elemStyles); 184 188 smr.render(ds, false, bounds); 189 190 // For debugging, write computed StyleElement to debugStream for primitives marked with debug=yes 191 if (debugStream != null) { 192 for (OsmPrimitive primitive : ds.allPrimitives()) { 193 if (!primitive.isKeyTrue("debug")) { 194 continue; 195 } 196 debugStream.println(primitive); 197 for (StyleElement styleElement : elemStyles.get(primitive, scale, nc)) { 198 debugStream.append(" * ").println(styleElement); 199 } 200 } 201 } 202 185 203 return image; 186 204 } 187 205 206 void setDebugStream(PrintStream debugStream) { 207 this.debugStream = debugStream; 208 } 188 209 }
Note:
See TracChangeset
for help on using the changeset viewer.