Ignore:
Timestamp:
2010-12-03T00:36:07+01:00 (15 years ago)
Author:
framm
Message:
  • add preference to draw outlines for polygons only, overriding any style settings. this helps tracing from aerial imagery when you have landuse=residential everywhere obscuring the view.
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

    r3291 r3691  
    2929    private boolean fillTaggedNode;
    3030    private boolean fillConnectionNode;
     31    private boolean outlineOnly;
    3132    private Color selectedColor;
    3233    private Color relationSelectedColor;
     
    7879        fillTaggedNode = Main.pref.getBoolean("mappaint.node.fill-tagged", true);
    7980        fillConnectionNode = Main.pref.getBoolean("mappaint.node.fill-connection", false);
     81
     82        outlineOnly = Main.pref.getBoolean("draw.data.area_outline_only", false);
     83
    8084    }
    8185
     
    187191        return fillTaggedNode;
    188192    }
     193
     194    public boolean isOutlineOnly() {
     195        return outlineOnly;
     196    }
    189197}
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPainter.java

    r3653 r3691  
    2828
    2929public class MapPainter {
     30
    3031    private final Graphics2D g;
    3132    private final NavigatableComponent nc;
     
    3536    private final boolean showNames;
    3637    private final boolean showIcons;
     38    private final boolean outlineOnly;
    3739
    3840    private final Color inactiveColor;
     
    5860    private static final double sinPHI = Math.sin(PHI);
    5961
    60     public MapPainter(MapPaintSettings settings, Graphics2D g, boolean inactive, NavigatableComponent nc, boolean virtual, double dist, double circum) {
     62    public MapPainter(MapPaintSettings settings, Graphics2D g,
     63        boolean inactive, NavigatableComponent nc, boolean virtual,
     64        double dist, double circum) {
     65
    6166        this.g = g;
    6267        this.inactive = inactive;
     
    6570        this.showNames = settings.getShowNamesDistance() > dist;
    6671        this.showIcons = settings.getShowIconsDistance() > dist;
     72        this.outlineOnly = settings.isOutlineOnly();
    6773
    6874        this.inactiveColor = PaintColors.INACTIVE.get();
     
    249255        /* set the opacity (alpha) level of the filled polygon */
    250256        g.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), fillAlpha));
    251         g.fillPolygon(polygon);
     257
     258        if (outlineOnly) {
     259            g.drawPolygon(polygon);
     260        } else {
     261            g.fillPolygon(polygon);
     262        }
     263           
    252264
    253265        if (name != null) {
Note: See TracChangeset for help on using the changeset viewer.