Ignore:
Timestamp:
2015-12-11T17:36:59+01:00 (10 years ago)
Author:
bastiK
Message:

mapcss partial fill: move threshold parameter ([9063]) into the mapcss style
(new property fill-extent-threshold)

  • add support for this parameter when area is unclosed
  • smaller extent for unclosed areas

(see #12104)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java

    r9087 r9099  
    633633            return IN_DOWNLOADED_AREA.evaluate(e.osm);
    634634        }
     635
     636        static boolean completely_downloaded(Environment e) {
     637            if (e.osm instanceof Relation) {
     638                return !((Relation) e.osm).hasIncompleteMembers();
     639            } else {
     640                return true;
     641            }
     642        }
     643
     644        static boolean closed2(Environment e) {
     645            if (e.osm instanceof Way && ((Way) e.osm).isClosed())
     646                return true;
     647            if (e.osm instanceof Relation && ((Relation) e.osm).isMultipolygon())
     648                return MultipolygonCache.getInstance().get(Main.map.mapView, (Relation) e.osm).getOpenEnds().isEmpty();
     649            return false;
     650        }
    635651    }
    636652
Note: See TracChangeset for help on using the changeset viewer.