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

fix: When lines reverse on themselves, mitering could be wrong #1365

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

manthey
Copy link
Contributor

@manthey manthey commented Feb 12, 2025

If a line reversed direction exactly, mitering logic could render only half the pixels that should have been rendered. In general, when lines nearly reverse on themselves, mitering is tricky. This add some thresholds, below which the lines aren't mitered but are just rendered. For opaque lines, this is a strict improvement, though some joints may no longer show rounded or truncated miters. For semi-transparent lines, this is in general an improvement, but there can be cases where they appear double rendered instead of joined. The behavior is still deemed an improvement, as they should never have only have half the pixels rendered.

If a line reversed direction exactly, mitering logic could render only
half the pixels that should have been rendered.  In general, when lines
nearly reverse on themselves, mitering is tricky.  This add some
thresholds, below which the lines aren't mitered but are just rendered.
For opaque lines, this is a strict improvement, though some joints may
no longer show rounded or truncated miters.  For semi-transparent lines,
this is in general an improvement, but there can be cases where they
appear double rendered instead of joined.  The behavior is still deemed
an improvement, as they should never have only have half the pixels
rendered.
@manthey manthey merged commit 81c2c67 into master Feb 12, 2025
12 checks passed
@manthey manthey deleted the mitering branch February 12, 2025 14:34
Copy link

🎉 This PR is included in version 1.14.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

1 participant