Commit bf91f7d
committed
Fix zero-length
Preserve intentional zero-length geometry through `dash()` so `stroke()`
can apply its cap style instead of dropping it as a degenerate segment.
Emit cap-only geometry for open and closed zero-length subpaths,
including degenerate line, quadratic, and cubic commands. `Butt` caps
remain empty, while `Round`, `Square`, and mixed caps produce the
corresponding full or half shape.
Keep dash starts in the half-open range `[0, path_length)`, avoiding
spurious output at exact segment and open-path boundaries. Preserve
explicit zero-length dashes as `MoveTo(p)`/`LineTo(p)` pairs, and treat
zero-sum or non-finite dash inputs as undashed without relying on `NaN`
normalization.stroke and dash handling1 parent ca27349 commit bf91f7d
2 files changed
Lines changed: 691 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| |||
317 | 322 | | |
318 | 323 | | |
319 | 324 | | |
| 325 | + | |
320 | 326 | | |
321 | 327 | | |
322 | 328 | | |
| |||
0 commit comments