Commit Graph
6 Commits
Author SHA1 Message Date
dotCooCoo 4ec7f67b2e Merge #649 (fix/linesweeper-example-viewbox) into integration/linesweeper 2026-11-09 13:42:09 -08:00
dotCooCoo b83d51acd3 Merge #646 (fix/linesweeper-example-fill-rule) into integration/linesweeper 2026-11-09 13:40:40 -08:00
dotCooCoo 6ca0223808 linesweeper: the curve_metrics example's SVG shows the left half of each curve
The example's curves span x = -1 to 1 and each row is translated only in
y, but the viewBox started at x = 0, so the left half of every curve was
cut off. The viewBox now starts at x = -1.5. A test in the example checks
that every curve fits in the viewBox, and scripts/test-pdf-backends.sh
runs it. README.craft.md and SOURCE.json record the change.
2026-11-06 23:15:56 -08:00
dotCooCoo f94872456a linesweeper: visualize_op draws its inputs with the even-odd fill rule
The example's binary_op call uses FillRule::EvenOdd, but it drew the two
input paths without a fill-rule attribute, so SVG viewers filled them with
the nonzero default. A path with a hole wound the same way as its outer
contour was drawn solid while the operation treated the hole as empty.

The input paths now carry fill-rule="evenodd", taken from the rule the
operation uses. scripts/test-pdf-backends.sh runs the example's tests, and
README.craft.md, SOURCE.json and NOTICE record the change.
2026-11-06 23:15:38 -08:00
dotCooCoo a9f8597431 linesweeper: example SVG strokes scale with the bounding box's width
The boolean_op, visualize_op and winding-numbers examples set the SVG
stroke width to (max_y - min_y).max(max_x - max_y) / 512, which uses
max_x - max_y for the width. A bounding box from (0, 1000) to
(512, 1001) got a stroke width of 1/512 instead of 1. The width is now
max_x - min_x.

visualize_op computes the width in a stroke_width function with a test,
and scripts/test-pdf-backends.sh runs that example's test. The other two
examples do not compile in this copy. README.craft.md and SOURCE.json
record the change.
2026-11-06 23:12:02 -08:00
dotCooCoo f14cc7f21e linesweeper: keep a copy of the crates.io 0.5.0 package in vendor/
Add the linesweeper 0.5.0 package to vendor/ with no file changed, so
that a fix to it can reach the Craft apps through this repository
without waiting for a linesweeper release. The GitHub repository its
manifest names is archived, and its README says development moved off
GitHub.

Leave out the test font (fonts live in craft-fonts), the logo artwork,
the snapshot images and the package's repository tooling. SOURCE.json
lists each with its hash.

Add a workspace exclude, a [patch.crates-io] entry, SOURCE.json with
the archive hash and per-file hashes, NOTICE and ATTRIBUTION.md rows,
and the package's tests in the backend test script. craft-prepress's
flatten feature now builds against the copy, so Cargo.lock drops the
package's registry source and checksum.
2026-11-06 19:05:18 -08:00