mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-16 12:03:31 +00:00
Image Trace: the seam fills' clip stays within the traced paths' box
The Seam Fills group's clipping path was the image's box. A group with a clip is measured by its clipping path, so on a trace with transparent or ignored margins the expanded trace measured as the whole image, and selection, alignment and resizing used that box. The clipping path is now the image's box cut to the box of the traced paths: on a turned image it has up to eight corners, and the anchor limit counts eight for it. docs/mcp.md, the params text and the progress line describe the clip.
This commit is contained in:
+5
-4
@@ -3834,10 +3834,11 @@ already walks Image Trace. Short agent entry points:
|
||||
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. 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 or outlines 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,
|
||||
edge. The group clips the strokes or outlines to the image's box within the box of the traced paths, and its
|
||||
bounds lie within that 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 fills. Both Expand commands keep the group, and `byColor` leaves it under every
|
||||
color's group; `byColor` refuses a trace whose seam fills' group was moved above a path. The strokes are separate
|
||||
objects, in a trace and after Expand: recoloring, moving or deleting a traced path leaves them as they are, and
|
||||
|
||||
@@ -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; 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, 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 within the traced paths' 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