Ignore:
Timestamp:
2007-05-05T19:38:16+02:00 (18 years ago)
Author:
damians
Message:

Added standard style loading
Dashed areas
Added standard/elemstyles.xml, will be loaded on start if needed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/mappaint/src/mappaint/MapPaintVisitor.java

    r2708 r2768  
    9191                                if (area && fillAreas)
    9292                                        //Draw segments in a different colour so direction arrows show against the fill
    93                                         drawSegment(ls, w.selected ? getPreferencesColor("selected", Color.YELLOW) : getPreferencesColor("untagged",Color.GRAY),Main.pref.getBoolean("draw.segment.direction"), width);
     93                                        drawSegment(ls, w.selected ? getPreferencesColor("selected", Color.YELLOW) : getPreferencesColor("untagged",Color.GRAY),Main.pref.getBoolean("draw.segment.direction"), width,true);
    9494                                else
    95                                         drawSegment(ls, w.selected ? getPreferencesColor("selected", Color.YELLOW) : colour,Main.pref.getBoolean("draw.segment.direction"), width);
     95                                        if (area)
     96                                                drawSegment(ls, w.selected ? getPreferencesColor("selected", Color.YELLOW) : colour,Main.pref.getBoolean("draw.segment.direction"), width,true);
     97                                        else
     98                                                drawSegment(ls, w.selected ? getPreferencesColor("selected", Color.YELLOW) : colour,Main.pref.getBoolean("draw.segment.direction"), width,false);
    9699                                if (!ls.incomplete && Main.pref.getBoolean("draw.segment.order_number"))
    97100                                {
     
    158161        // Altered - now specify width
    159162        @Override protected void drawSegment(Segment ls, Color col,boolean showDirection) {
    160                         drawSegment(ls,col,showDirection,1);
     163                        drawSegment(ls,col,showDirection,1,false);
    161164        }
    162165
    163166
    164167        // Altered - now specify width
    165         private void drawSegment (Segment ls, Color col,boolean showDirection, int width) {
     168        private void drawSegment (Segment ls, Color col,boolean showDirection, int width,boolean dashed) {
    166169                //do not draw already visible segments
    167170                if (ls.shown) return;
     
    174177                g.setColor(col);
    175178                //g.setWidth(width);
    176                 g2d.setStroke(new BasicStroke(width));
     179                if (dashed)
     180                        g2d.setStroke(new BasicStroke(width,BasicStroke.CAP_BUTT,BasicStroke.JOIN_ROUND,0,new float[] {9},0));
     181                else
     182                        g2d.setStroke(new BasicStroke(width));
     183
    177184                Point p1 = nc.getPoint(ls.from.eastNorth);
    178185                Point p2 = nc.getPoint(ls.to.eastNorth);
Note: See TracChangeset for help on using the changeset viewer.