ruffle-rs / ruffle

A Flash Player emulator written in Rust
https://ruffle.rs
Other
15.76k stars 820 forks source link

Miter join should clip stroke when > miterlimit #13656

Open jindrapetrik opened 1 year ago

jindrapetrik commented 1 year ago

Describe the bug

Steps to reproduce:

What I see: The stroke is extended beyond miter value and is not clipped to the miter limit.

Example SWF file + also Flash CS6 source code. miter_join.zip

Screenshot of the problem: image (I drew a black line on place where it should be clipped)

Expected behavior

The stroke should be clipped at the miter limit value.

Flash uses behaviour that is called miter-clip in SVG 2 specs https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linejoin#miter-clip

Affected platform

Desktop app

Operating system

Windows 11

Browser

No response

Additional information

No response

torokati44 commented 1 year ago

This is one of the things that I aimed to solve with #11062 (and https://github.com/RazrFalcon/tiny-skia/pull/91)...