Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 9004)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 9005)
@@ -451,5 +451,5 @@
     }
 
-    protected void drawArea(OsmPrimitive osm, Path2D.Double path, Color color, MapImage fillImage, boolean disabled, TextElement text) {
+    protected void drawArea(OsmPrimitive osm, Path2D.Double path, Color color, MapImage fillImage, Float extent, boolean disabled, TextElement text) {
 
         Shape area = path.createTransformedShape(nc.getAffineTransform());
@@ -462,5 +462,13 @@
                 }
                 g.setColor(color);
-                g.fill(area);
+                if (extent == null) {
+                    g.fill(area);
+                } else {
+                    Shape clip = g.getClip();
+                    g.clip(area);
+                    g.setStroke(new BasicStroke(2 * extent));
+                    g.draw(area);
+                    g.setClip(clip);
+                }
             } else {
                 TexturePaint texture = new TexturePaint(fillImage.getImage(disabled),
@@ -559,8 +567,11 @@
      * @param color The color to fill the area with.
      * @param fillImage The image to fill the area with. Overrides color.
+     * @param extent if not null, area will be filled partially; specifies, how
+     * far to fill from the boundary towards the center of the area;
+     * if null, area will be filled completely
      * @param disabled If this should be drawn with a special disabled style.
      * @param text The text to write on the area.
      */
-    public void drawArea(Relation r, Color color, MapImage fillImage, boolean disabled, TextElement text) {
+    public void drawArea(Relation r, Color color, MapImage fillImage, Float extent, boolean disabled, TextElement text) {
         Multipolygon multipolygon = MultipolygonCache.getInstance().get(nc, r);
         if (!r.isDisabled() && !multipolygon.getOuterWays().isEmpty()) {
@@ -572,5 +583,5 @@
                 drawArea(r, p,
                         pd.selected ? paintSettings.getRelationSelectedColor(color.getAlpha()) : color,
-                                fillImage, disabled, text);
+                        fillImage, extent, disabled, text);
             }
         }
@@ -582,9 +593,12 @@
      * @param color The color to fill the area with.
      * @param fillImage The image to fill the area with. Overrides color.
+     * @param extent if not null, area will be filled partially; specifies, how
+     * far to fill from the boundary towards the center of the area;
+     * if null, area will be filled completely
      * @param disabled If this should be drawn with a special disabled style.
      * @param text The text to write on the area.
      */
-    public void drawArea(Way w, Color color, MapImage fillImage, boolean disabled, TextElement text) {
-        drawArea(w, getPath(w), color, fillImage, disabled, text);
+    public void drawArea(Way w, Color color, MapImage fillImage, Float extent, boolean disabled, TextElement text) {
+        drawArea(w, getPath(w), color, fillImage, extent, disabled, text);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/AreaElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/AreaElemStyle.java	(revision 9004)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/AreaElemStyle.java	(revision 9005)
@@ -25,9 +25,11 @@
     public MapImage fillImage;
     public TextElement text;
+    public Float extent;
 
-    protected AreaElemStyle(Cascade c, Color color, MapImage fillImage, TextElement text) {
+    protected AreaElemStyle(Cascade c, Color color, MapImage fillImage, Float extent, TextElement text) {
         super(c, 1f);
         CheckParameterUtil.ensureParameterNotNull(color);
         this.color = color;
+        this.extent = extent;
         this.fillImage = fillImage;
         this.text = text;
@@ -38,4 +40,5 @@
         MapImage fillImage = null;
         Color color = null;
+        Float extent = null;
 
         IconReference iconRef = c.get(FILL_IMAGE, null, IconReference.class);
@@ -69,4 +72,5 @@
                 }
                 color = new Color(color.getRed(), color.getGreen(), color.getBlue(), alpha);
+                extent = c.get(FILL_EXTENT, null, float.class);
             }
         }
@@ -79,5 +83,5 @@
 
         if (color != null)
-            return new AreaElemStyle(c, color, fillImage, text);
+            return new AreaElemStyle(c, color, fillImage, extent, text);
         else
             return null;
@@ -96,10 +100,10 @@
                 }
             }
-            painter.drawArea((Way) osm, myColor, fillImage, painter.isInactiveMode() || osm.isDisabled(), text);
+            painter.drawArea((Way) osm, myColor, fillImage, extent, painter.isInactiveMode() || osm.isDisabled(), text);
         } else if (osm instanceof Relation) {
             if (color != null && (selected || outermember)) {
                 myColor = paintSettings.getRelationSelectedColor(color.getAlpha());
             }
-            painter.drawArea((Relation) osm, myColor, fillImage, painter.isInactiveMode() || osm.isDisabled(), text);
+            painter.drawArea((Relation) osm, myColor, fillImage, extent, painter.isInactiveMode() || osm.isDisabled(), text);
         }
     }
@@ -117,4 +121,6 @@
         if (!Objects.equals(color, other.color))
             return false;
+        if (extent != other.extent)
+            return false;
         if (!Objects.equals(text, other.text))
             return false;
@@ -126,4 +132,5 @@
         int hash = 3;
         hash = 61 * hash + color.hashCode();
+        hash = 61 * hash + (extent != null ? Float.floatToIntBits(extent) : 0);
         hash = 61 * hash + (fillImage != null ? fillImage.hashCode() : 0);
         hash = 61 * hash + (text != null ? text.hashCode() : 0);
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/StyleKeys.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/StyleKeys.java	(revision 9004)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/StyleKeys.java	(revision 9005)
@@ -10,4 +10,5 @@
     String DASHES_OFFSET = "dashes-offset";
     String FILL_COLOR = "fill-color";
+    String FILL_EXTENT = "fill-extent";
     String FILL_IMAGE = "fill-image";
     String FILL_OPACITY = "fill-opacity";
