Changeset 9008 in josm


Ignore:
Timestamp:
2015-11-15T13:25:47+01:00 (8 years ago)
Author:
bastiK
Message:

see #12104 - mapcss: partial filling of areas (fill-extent) for fill-image

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

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

    r9005 r9008  
    479479                    g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha));
    480480                }
    481                 g.fill(area);
     481                if (extent == null) {
     482                    g.fill(area);
     483                } else {
     484                    Shape clip = g.getClip();
     485                    BasicStroke stroke = new BasicStroke(2 * extent);
     486                    g.clip(stroke.createStrokedShape(area));
     487                    g.fill(area);
     488                    g.setClip(clip);
     489                }
    482490                g.setPaintMode();
    483491            }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/AreaElemStyle.java

    r9005 r9008  
    7272                }
    7373                color = new Color(color.getRed(), color.getGreen(), color.getBlue(), alpha);
    74                 extent = c.get(FILL_EXTENT, null, float.class);
    7574            }
    7675        }
     
    8180            text = TextElement.create(env, PaintColors.AREA_TEXT.get(), true);
    8281        }
     82
     83        extent = c.get(FILL_EXTENT, null, float.class);
    8384
    8485        if (color != null)
Note: See TracChangeset for help on using the changeset viewer.