Stroke line joins have bevelled corners when miter is specified.

Description

Users have complained about line join style.
There are getting bevelled corners when requesting miter.
I thought it was a problem with our sld. However did a bit of digging
and current geotools miter-limit of 1 seems a bit low.
It will automatically bevel a line-join even with 90 degree angle.

Java default is 10 according to docs
"default miterlimit value of 10.0f causes all angles less than
11 degrees to be trimmed.
This java default might have caused issues with 'spiky lines at some point' but 1 seems very conservative.
Trimming miters converts
the decoration of the line join to bevel."

http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/cecd70d27b27/src/share/classes/java/awt/BasicStroke.java

Can we allow mitering of angles of 70 degrees and above?
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-miterlimit
stroke-miterlimit = miterLength/stroke-width = 1 /sin ( θ/2 )

1/sin((pi()/180 * 70)/2) = ~1.74
So roughly a miter limit of = 1.75.
Cheers
murray
pull request - https://github.com/geotools/geotools/pull/2349

Environment

None

Assignee

Unassigned

Reporter

Murray King

Triage

None

Components

Priority

Medium
Configure