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

RoundRect and other uses of Grow with jsRound produce incorrect result #276

Closed
andersmelander opened this issue Feb 4, 2024 · 4 comments
Assignees
Labels

Comments

@andersmelander
Copy link
Member

It appears that Grow has a problem with the jsRound join style.

The following rounded rectangle was constructed with:

Grow(Rectangle(...), 1.0, jsRound, True);

billede

@andersmelander andersmelander self-assigned this Feb 4, 2024
@andersmelander
Copy link
Member Author

Rather than trying to fix Grow I will replace it with the corresponding functionality provided by Clipper (and about time too. see #47).

@andersmelander
Copy link
Member Author

Here is the same rounded rectangle using Clipper:
billede

@andersmelander
Copy link
Member Author

andersmelander commented Feb 4, 2024

After updating Clipper to the newest version (AngusJohnson/Clipper2@609d873) I have measured a 5 to 10% drop in thin and thick line drawing performance.

There also appears to be some problems with mitering of line joints:

  1. It looks as if the miter isn't applied if it would make the miter smaller than the line width:
    billede
    billede

  2. Mitering switches on/off at MiterLimit=14.5 regardless of line width.

@andersmelander
Copy link
Member Author

Above two issues are tracked in #277 and #278. Since they are minor I will merge the branch now.

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

No branches or pull requests

1 participant