Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom miterlimit is not applied #36

Closed
christianAppl opened this issue Mar 17, 2021 · 1 comment
Closed

Custom miterlimit is not applied #36

christianAppl opened this issue Mar 17, 2021 · 1 comment

Comments

@christianAppl
Copy link

christianAppl commented Mar 17, 2021

Custom miterlimits are seemingly not applied, when drawing pathes. This is caused by a minor flaw in one of the if statements in "SVGGraphics2D.strokeStyle()"

The statement's (assumed) intended behaviour:
Only if the absolute difference between the set miterlimit and the default miter limit(4) surpasses 0.001 a custom miter limit shall be appended to the style String.

For this reason:

It is:

if (Math.abs(DEFAULT_MITER_LIMIT - miterLimit) < 0.001) {
    b.append("stroke-miterlimit: ").append(geomDP(miterLimit));        
}

But it should be:

if (Math.abs(DEFAULT_MITER_LIMIT - miterLimit) > 0.001) {
   b.append("stroke-miterlimit: ").append(geomDP(miterLimit));        
}
jfree added a commit that referenced this issue Mar 17, 2021
@jfree
Copy link
Owner

jfree commented Mar 17, 2021

Good spot, I've committed the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants