mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-14 19:26:56 -04:00
Image Trace: Shapes finds rounded rectangles and shapes in aliased, blurred and scanned art
- A sharp corner may fall up to 0.75 px short within 3 px of where it should be: anti-aliasing and blur take that much off a corner (not on a thin bar, which is all corners). - A rounded rectangle gets the radius that fits its outline best, searched around the one its area says, instead of that one alone. - A rectangle's direction is tried along its longest straight side, the longer axis of its area and the pixel grid: a blurred one may have no straight side. - A regular polygon's sides, corners and size are read from the outline's shape (how its distance from the middle goes round, and its area), not from how many anchors the fitter gave it. - An outline without anti-aliasing is known to half a pixel: it gets half as much room again. Plain shapes found with Shapes on, all sizes and variants: Default 57% -> 98%, 6 Colors 62% -> 100%. The harness counts false shapes: none on any input but one thin line (a rectangle 2 px wide) whose trace is 0.70 px off with or without Shapes.
This commit is contained in:
1 parent
fe83800ed5
commit
c6d9822f26
6 files changed
+658
-603
No files matched your search
+543
-541
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user