mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-08 09:31:03 +00:00
When the layers fail the comparison with the file's own page because some objects draw differently (an object in another color, or one that only one side draws), the import finds each top-level object whose bounds hold a patch of such pixels (the smallest one that holds it) and replaces it with the page's art in its bounds, in the same way as an unread object. It then compares the layers with the page again. When that comparison passes, the layers stay, and a warning names the layer or sublayer of each replaced object (`<Layer>` for one without a name) and how many were replaced on it. Like the warning for unread objects, this warning counts as a loss, so an export or Save As to the file's own path needs `acknowledgeLoss: true`. A replaced wrap object keeps its wrap options, and area type is wrapped again around the page's art. Placed files at their other placement are tried too when the first placement can't be kept. The file still comes in as its PDF part, with the same reason, when only edges or type differ, when a difference lies outside every top-level object, when more than half of the top-level objects (or more than 64) hold one, when such an object is or holds type or holds a wrap object inside a group, when the page's type of a text object that stays would be copied into a replacement, when the page's art can't replace an object for the reasons it can't replace an unread one, when matching the differences to the objects would take too much work, or when the second comparison still fails. Trusting the editing data keeps the objects as read.