#189 Add line width steps of 1.5 and 2.5 px

open
nobody
None
5
2014-11-23
2013-05-05
Andrei_n
No

For better line styling, steps of 1.5 & 2.5 px width should be included.

The attached map has river widths of 1 - 2 px made in Open JUMP (left), and 1 - 1.5 px in Inkscape (right).

Discussion

  • Andrei_n
    Andrei_n
    2013-05-05

     
    Attachments
  • Jukka Rahkonen
    Jukka Rahkonen
    2014-11-23

    By looking at http://sourceforge.net/p/jump-pilot/code/HEAD/tree/core/trunk/src/com/vividsolutions/jump/workbench/ui/renderer/style/BasicStyle.java
    it looks like fractional line width are supported by using setFractionalLineWidth instead of setLineWidth:

    public void setLineWidth(int lineWidth) {
    //Don't use BasicStroke.JOIN_ROUND or JOIN_BEVEL -- when the line
    //width is 1, one of the corners will not be drawn. [Jon Aquino]
    lineStroke = createLineStroke(lineWidth);
    }
    public void setFractionalLineWidth(float lineWidth) {
    lineStroke = createLineStroke(lineWidth);
    }

    Probably there is no way to use setFractionalLineWidth(float lineWidth) at the moment. I was testing to edit the layer line width from the saved project file but project file cannot be opened because only integers are accepted from that place. Same thing with the SLD imported, it also defined line width as integer.