Ignore:
Timestamp:
2017-03-21T15:47:29+01:00 (7 years ago)
Author:
michael2402
Message:

See #10176: Allow icons in multipolygons, use even/odd winding rule for icon placement position in multipolygons

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r11759 r11761  
    7474import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
    7575import org.openstreetmap.josm.gui.mappaint.styleelement.AreaElement;
     76import org.openstreetmap.josm.gui.mappaint.styleelement.AreaIconElement;
    7677import org.openstreetmap.josm.gui.mappaint.styleelement.BoxTextElement;
    7778import org.openstreetmap.josm.gui.mappaint.styleelement.BoxTextElement.HorizontalTextAlignment;
     
    11331134                    MapViewPath path = new MapViewPath(mapState);
    11341135                    path.appendFromEastNorth(pd.get());
     1136                    path.setWindingRule(MapViewPath.WIND_EVEN_ODD);
    11351137                    consumer.accept(path);
    11361138                }
     
    16021604            StyleElementList sl = styles.get(osm, circum, nc);
    16031605            for (StyleElement s : sl) {
    1604                 if (drawMultipolygon && drawArea && s instanceof AreaElement && (flags & FLAG_DISABLED) == 0) {
     1606                if (drawMultipolygon && drawArea && (s instanceof AreaElement || s instanceof AreaIconElement) && (flags & FLAG_DISABLED) == 0) {
    16051607                    output.add(new StyleRecord(s, osm, flags));
    16061608                } else if (drawMultipolygon && drawArea && s instanceof TextElement) {
     
    16151617            StyleElementList sl = styles.get(osm, circum, nc);
    16161618            for (StyleElement s : sl) {
    1617                 if (!(drawArea && (flags & FLAG_DISABLED) == 0) && s instanceof AreaElement) {
    1618                     continue;
    1619                 }
    1620                 output.add(new StyleRecord(s, osm, flags));
     1619                if ((drawArea && (flags & FLAG_DISABLED) == 0) || !(s instanceof AreaElement)) {
     1620                    output.add(new StyleRecord(s, osm, flags));
     1621                }
    16211622            }
    16221623        }
Note: See TracChangeset for help on using the changeset viewer.