Changeset 1956 in josm for trunk/src


Ignore:
Timestamp:
2009-08-11T18:11:18+02:00 (15 years ago)
Author:
stoecker
Message:

add hidden option to change width of GPX lines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java

    r1910 r1956  
    77import static org.openstreetmap.josm.tools.I18n.trn;
    88
     9import java.awt.BasicStroke;
    910import java.awt.Color;
    1011import java.awt.Component;
    1112import java.awt.Graphics;
     13import java.awt.Graphics2D;
    1214import java.awt.GridBagLayout;
    1315import java.awt.Point;
     
    420422        boolean direction = Main.pref.getBoolean("draw.rawgps.direction");
    421423        // don't draw lines if longer than x meters
     424        int lineWidth = Main.pref.getInteger("draw.rawgps.linewidth",0);
     425
    422426        int maxLineLength;
    423427        if (this.isLocalFile) {
     
    448452        // allows to tweak line coloring for different speed levels.
    449453        int colorTracksTune = Main.pref.getInteger("draw.rawgps.colorTracksTune", 45);
     454
     455        if(lineWidth != 0)
     456        {
     457            Graphics2D g2d = (Graphics2D)g;
     458            g2d.setStroke(new BasicStroke(lineWidth,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND));
     459        }
     460
    450461        /****************************************************************
    451462         ********** STEP 2a - CHECK CACHE VALIDITY **********************
Note: See TracChangeset for help on using the changeset viewer.