mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
Copy and Cut made the system clipboard's formats in the frame that ran them. The formats include the SVG markup and a PNG of the selection at 1 px per pt, up to 4,096 px a side. In a release build on Windows, Copy of 50,002 rectangles on a 1600 x 1200 pt page took 1.00 s in its frame. The thread that writes background saves and exports now makes the formats from a copy of the clipboard, and the app writes them in a later frame. The same Copy takes 0.18 s in its frame, and the SVG and PNG are the same bytes. While that thread has a save, an export, a print or a recovery copy to finish, Copy and Cut make and write the formats at once. A later Copy or Cut, or text copied in a field or with the Type tool, drops formats that are not written yet. Until they are written, Paste on the canvas takes the internal clipboard, and while a text field or the Type tool has the keyboard the app waits for them. Docs: docs/mcp.md, docs/target-app-parity.md.