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

MiterClip flips between Miter and Bevel instead of clipping #923

Open
timmb opened this issue Nov 7, 2024 · 0 comments
Open

MiterClip flips between Miter and Bevel instead of clipping #923

timmb opened this issue Nov 7, 2024 · 0 comments
Labels

Comments

@timmb
Copy link
Contributor

timmb commented Nov 7, 2024

According to the docs, LineJoin should behave the same as in the SVG specification. This means:

  • Miter falls back to Bevel when the miter-limit is exceeded
  • MiterClip crops the miter at the point where miter-limit is exceeded.

However, the behaviour I'm seeing with StrokeTessellator is that both Miter and MiterClip fall back to Bevel when the limit is exceeded.

Example

With

StrokeOptions {
            start_cap: Butt,
            end_cap: Butt,
            line_join: MiterClip,
            line_width: 30.0,
            variable_line_width: None,
            miter_limit: 7.1,
            tolerance: 0.1,
        }

this is the rendered join:
image

Increasing the miter limit simple changes the point where it flips to the bevel shown.

Note

This looks the same as #573, however that issue was resolved with a PR, so I'm confused. I'm using lyon = "1.0.1". I also tried specifically using lyon_tessellation = "1.0.15". Perhaps it regressed?

@nical nical added the bug label Nov 11, 2024
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

2 participants