Files
pdfcraft/crates/render
mtlcl410andClaude Opus 5.5 e5051ca139 M2: degenerate subpaths, all-zero dash arrays and negative line widths stroke as ISO 32000-2 8.5.3.2 / 8.4.3 say
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
2026-10-30 15:07:21 +08:00
..