Changeset 11054 in josm
- Timestamp:
- 2016-09-26T23:29:19+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintSettings.java
r10662 r11054 346 346 return outlineOnly; 347 347 } 348 349 @Override 350 public String toString() { 351 // This is used for debugging exceptions. 352 return "MapPaintSettings [useRealWidth=" + useRealWidth + ", showDirectionArrow=" + showDirectionArrow 353 + ", showOnewayArrow=" + showOnewayArrow + ", defaultSegmentWidth=" + defaultSegmentWidth 354 + ", showOrderNumber=" + showOrderNumber + ", showHeadArrowOnly=" + showHeadArrowOnly 355 + ", showNamesDistance=" + showNamesDistance + ", useStrokesDistance=" + useStrokesDistance 356 + ", showIconsDistance=" + showIconsDistance + ", selectedNodeSize=" + selectedNodeSize 357 + ", connectionNodeSize=" + connectionNodeSize + ", unselectedNodeSize=" + unselectedNodeSize 358 + ", taggedNodeSize=" + taggedNodeSize + ", fillSelectedNode=" + fillSelectedNode 359 + ", fillUnselectedNode=" + fillUnselectedNode + ", fillTaggedNode=" + fillTaggedNode 360 + ", fillConnectionNode=" + fillConnectionNode + ", outlineOnly=" + outlineOnly + ", selectedColor=" 361 + selectedColor + ", relationSelectedColor=" + relationSelectedColor + ", highlightColor=" 362 + highlightColor + ", inactiveColor=" + inactiveColor + ", nodeColor=" + nodeColor + ", taggedColor=" 363 + taggedColor + ", connectionColor=" + connectionColor + ", taggedConnectionColor=" 364 + taggedConnectionColor + "]"; 365 } 366 367 348 368 } -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r11027 r11054 83 83 import org.openstreetmap.josm.tools.ImageProvider; 84 84 import org.openstreetmap.josm.tools.Utils; 85 import org.openstreetmap.josm.tools.bugreport.BugReport; 85 86 86 87 /** … … 242 243 } 243 244 245 /** 246 * This stores a style and a primitive that should be painted with that style. 247 */ 244 248 public static class StyleRecord implements Comparable<StyleRecord> { 245 249 private final StyleElement style; … … 297 301 public StyleElement getStyle() { 298 302 return style; 303 } 304 305 /** 306 * Paints the primitive with the style. 307 * @param paintSettings The settings to use. 308 * @param painter The painter to paint the style. 309 */ 310 public void paintPrimitive(MapPaintSettings paintSettings, StyledMapRenderer painter) { 311 style.paintPrimitive( 312 osm, 313 paintSettings, 314 painter, 315 (flags & FLAG_SELECTED) != 0, 316 (flags & FLAG_OUTERMEMBER_OF_SELECTED) != 0, 317 (flags & FLAG_MEMBER_OF_SELECTED) != 0 318 ); 319 } 320 321 @Override 322 public String toString() { 323 return "StyleRecord [style=" + style + ", osm=" + osm + ", flags=" + flags + "]"; 299 324 } 300 325 } … … 1828 1853 try { 1829 1854 for (final OsmPrimitive osm : input) { 1830 if (osm.isDrawable()) { 1831 osm.accept(this); 1855 try { 1856 if (osm.isDrawable()) { 1857 osm.accept(this); 1858 } 1859 } catch (RuntimeException e) { 1860 throw BugReport.intercept(e).put("osm", osm); 1832 1861 } 1833 1862 } 1834 1863 return output; 1864 } catch (RuntimeException e) { 1865 throw BugReport.intercept(e).put("input-size", input.size()).put("output-size", output.size()); 1835 1866 } finally { 1836 1867 MapCSSStyleSource.STYLE_SOURCE_LOCK.readLock().unlock(); … … 1934 1965 } 1935 1966 1936 for (StyleRecord r : allStyleElems) { 1937 r.style.paintPrimitive( 1938 r.osm, 1939 paintSettings, 1940 this, 1941 (r.flags & FLAG_SELECTED) != 0, 1942 (r.flags & FLAG_OUTERMEMBER_OF_SELECTED) != 0, 1943 (r.flags & FLAG_MEMBER_OF_SELECTED) != 0 1944 ); 1967 for (StyleRecord record : allStyleElems) { 1968 try { 1969 record.paintPrimitive(paintSettings, this); 1970 } catch (RuntimeException e) { 1971 throw BugReport.intercept(e).put("record", record); 1972 } 1945 1973 } 1946 1974 … … 1948 1976 1949 1977 benchmark.renderDone(); 1978 } catch (RuntimeException e) { 1979 throw BugReport.intercept(e) 1980 .put("data", data) 1981 .put("circum", circum) 1982 .put("scale", scale) 1983 .put("paintSettings", paintSettings) 1984 .put("renderVirtualNodes", renderVirtualNodes); 1950 1985 } finally { 1951 1986 data.getReadLock().unlock();
Note:
See TracChangeset
for help on using the changeset viewer.