mirror of
https://github.com/aphrody-labs/vectorcraft.git
synced 2026-10-14 11:29:03 +00:00
Each region's outline was fitted on its own, so the edge between two regions was fitted twice, a little differently, and left hairline gaps and overlaps. - An outline is cut at its junctions: the pixel corners where three or more regions meet, where two parts of a region touch by a corner only, and where an edge reaches the image's border (each side of the image is a neighbour of its own, so the image's corners stay exact). A junction lies where the edges around it say, the same for every region around it. - Each piece between two junctions is the whole edge between two regions. Both get exactly the same points for it (shifts are rounded to 1/1024 px so that the two sides agree to the last bit; whether a piece is hard is decided by the piece alone) and it is fitted the same way from either side (from its end further left), so it is one and the same curve in both paths. A loop without junctions is fitted clockwise from its leftmost point: a shape's outline and the hole it leaves in the shape around it are one curve too. - Stacked layers (Overlapping) share no edges and are cut at the image's border only. On each preset's own inputs, all sizes and variants (docs/image-trace-quality.md), before -> after: - Default: gaps 22.2 -> 0.8 px, overlaps 22.4 -> 0.5 px - 3 Colors: gaps 48.6 -> 0.0, overlaps 29.4 -> 0.0; outlines 0.087 -> 0.104 px off on average - 6 Colors: gaps 39.0 -> 0.2, overlaps 35.7 -> 0.3; 0.137 -> 0.140 px off, largest 1.09 -> 1.34 - 16 Colors: gaps 34.5 -> 0.2, overlaps 26.4 -> 0.2; 0.133 -> 0.141 px off, largest 1.09 -> 1.31