mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
The file had an empty prolog, so a PostScript interpreter stopped at its first operator: it couldn't be printed, placed or previewed by anything that runs PostScript. The prolog's procedure set (VectorCraft_Legacy, written from the PostScript Language Reference and the version 7 specification) now gives every operator the writer emits its meaning: paths and their painting with separate fill and stroke colours and overprints, the fill rule, compound paths painted as one path, clipping groups and masks, guides that don't print, layers that are hidden or don't print marking nothing, and images drawn from the hex samples on the comment lines after XI. Gradients fill with the colour set before them (the first stop's), and the type and encoding operators take their operands and mark nothing. VectorCraft opens a file with that prolog from its program, as before: its page has flat gradients and no type. Every file the writer's tests write is now run through import_with(bytes, false) and must draw what the document it was written from draws: its paths, fills, strokes and images in the same places and colours, with type left out (type the writer outlines is compared as its glyphs' outlines), gradients as their first stop, layers that don't print left out and hidden objects shown when the options write them visible. A new test prints the sample with every layer shown. The engine's flattened-image test also opens the file as PostScript.