mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-16 12:03:31 +00:00
Image Trace: seam fills on a stretched image stay within 0.75 image px of their edge
On an image stretched more one way than another, a seam stroke was as wide as 1.5 pixels at the larger scale, so across the less stretched direction it reached far past its edge: on a 40 x 20 image scaled 20x across, a stroke along a horizontal edge covered 15 pixels on each side, over transparent rows too. On such an image, the seam fills are now each stroke's outline in image pixels (butt caps, round joins), filled with the stroke's paint. An image scaled alike in every direction keeps strokes. The anchor limit counts the outlines' anchors. Outline views and Expand by color recognize a seam fills group of filled outlines as they do one of strokes, and Expand by color again recognizes the unclipped seam fills group of a trace made before the seam fills were clipped.
This commit is contained in:
+3
-2
@@ -3832,8 +3832,9 @@ already walks Image Trace. Short agent entry points:
|
||||
An Abutting trace with Fills (not Flat Logo) also holds a clip group named `Seam Fills` under its paths. For each
|
||||
color it holds one stroke along the edges where a filled path of that color meets a filled path drawn after it, in
|
||||
that color (a gradient path's stroke takes its gradient), with butt caps and round joins. The stroke is 1.5 image
|
||||
pixels wide, VectorCraft's own width, at the image's larger scale when the image is stretched more one way. The group
|
||||
clips the strokes to the image's box. Where a shared edge ends at, or runs within 0.75 image pixels of, a transparent
|
||||
pixels wide, VectorCraft's own width. On an image stretched more one way than another, the group holds each stroke's
|
||||
outline in image pixels as a filled path instead; the outline covers 0.75 image pixels on each side of its edge. The
|
||||
group clips the strokes to the image's box. Where a shared edge ends at, or runs within 0.75 image pixels of, a transparent
|
||||
area or a color left out, its stroke can reach up to 0.75 image pixels into that area. Paths that became live shapes
|
||||
(`shapes`) take no part. The traced paths and their shared edges are the same with or without the group. A trace
|
||||
whose paths have more than about half of the trace's anchor limit (8,000,000, 2,000,000 on the web) has no seam
|
||||
|
||||
@@ -1510,7 +1510,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- **Image Trace, Document Library color groups:** with Document Swatches, the panel's Colors menu and `"colorGroup"` trace with one color group's colors instead of every swatch, as the public panel documentation describes Document Library; code-drawn tests in `crates/engine` and the panel.
|
||||
- **Image Trace, Document Library colors:** with Document Swatches, traced fills and strokes use the displayed colors of process, global, spot and tint swatches without links, so editing a swatch leaves the trace unchanged; swatch-library colors are also unlinked; code-drawn tests in `crates/engine`.
|
||||
- **Image Trace, flattened slivers:** in a Color, Grayscale or Black and White trace with Fills, a traced region whose outline straightens onto one line (a single pixel, or a one-pixel row along an edge, its pieces shared with the regions beside it) is left out instead of becoming a selectable path with no area, which paints nothing. Snap Curves To Lines straightens more outlines, so it leaves out more of these. Without Fills, the region's 1 px stroke draws it, and it is kept. Code-drawn tests in `crates/trace`.
|
||||
- **Image Trace, Abutting seam fills:** an Abutting trace with Fills holds a `Seam Fills` clip group under its paths, with strokes along the edges two filled paths share, in the lower path's color, 1.5 image pixels wide (VectorCraft's own width) and clipped to the image's box. The paths and their shared edges are unchanged. Tests: `seam::tests` in `crates/trace`, `image_trace_abutting_seam_fills_sit_under_the_paths` in `crates/engine`.
|
||||
- **Image Trace, Abutting seam fills:** an Abutting trace with Fills holds a `Seam Fills` clip group under its paths, with strokes along the edges two filled paths share, in the lower path's color, 1.5 image pixels wide (VectorCraft's own width) and clipped to the image's box; on an image stretched more one way than another, each stroke's outline in image pixels is a filled path instead. The paths and their shared edges are unchanged. Tests: `seam::tests` in `crates/trace`, `image_trace_abutting_seam_fills_sit_under_the_paths` and `image_trace_seam_fills_on_a_stretched_image_stay_near_their_edge` in `crates/engine`.
|
||||
- **Image Trace, Auto Color rare colours:** the Automatic palette keeps colours too rare for its area count when they are distinct (Oklab) and drawn as coherent regions, at most six, protected from mixed-colour merging and Noise; code-drawn stem, highlight, low-contrast and scattered-noise tests (see [quality notes](image-trace-quality.md#auto-color-keeps-rare-colours)).
|
||||
- **Image Trace, nearly flat dark grounds:** with a Limited palette of 9 to 16 colors (16 Colors, and Document Library without swatches), by VectorCraft's own rule, a cut whose two sides both have a dark gray mean (Oklab lightness under 0.30, chroma under 0.03) and lie less than 0.03 apart in Oklab has its gain scaled by (distance / 0.03)². A near-black ground with faint noise then traces in one color, and the color it would have taken goes to another cut. Code-drawn tests `a_nearly_flat_dark_ground_keeps_one_color`, `only_a_limited_palette_of_nine_to_sixteen_colors_weighs_alike_sides` and `a_dark_colored_figure_on_a_nearly_flat_dark_ground_keeps_its_color` in `crates/trace`.
|
||||
- **Image Trace, Document Library keeps neutral tones neutral:** each pixel takes the library color nearest in Oklab with differences in hue and chroma counted three times, so a gray or a muted brown traces as a neutral library color instead of a saturated one of similar lightness; a code-drawn test of gray and brown patches with a black, light and blue library in `crates/trace`.
|
||||
|
||||
Reference in New Issue
Block a user