mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-10 13:01:29 +00:00
Vendored hayro-interpret patch 61. - A degenerate subpath (a single-point closed path, or points that all coincide) is stroked as a dot of the line width with round caps and not at all with butt or projecting square caps (8.5.3.2). The zero-length `l` is no longer nudged a ten-thousandth of a point (which gave square caps a direction to draw a square in), and `x y m h` keeps its `h` (kurbo's `is_empty` counts only segments, so it was dropped and the subpath painted nothing). Other subpaths and zero-length dashes are untouched. - A dash array that is all zero, or has a negative or non-finite entry, is kept as `[]`, a solid line (8.4.3.6). `[0 0]` used to become `[0.01 0.01]`, a faint half-covered line. - A negative or non-finite line width from `w` or `/LW` is kept as 0, the thinnest line (8.4.3.2), so no device sees a width below zero. The renderer already drew it as a one-pixel line in the stroke colour. Tests: crates/render/tests/it/stroke_geometry.rs (pixel checks and a recording device). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0175FWj4xFhMhSH3UpMU8DSC