A curved fill with more points than one polygon holds is first flattened
more coarsely. That loses detail, so the export now adds a warning for it,
and docs/mcp.md names the warning with the others.
craft-libs moves to the current head of storytold/craft-libs#5541
(c192150685), which stops counting polygon points at the limit and sets a
black foreground before each pixel map.
The picture header, PaintPoly and DirectBitsRect records and PackBits
move to craft_metafile::write::PictWriter (storytold/craft-libs#5541),
next to the PICT reader, so other apps can write the format. VectorCraft
keeps flattening, cutting to the frame, non-zero fills, stroke outlines
and image placement.
Every craft-libs dependency moves from 4f3e34d0dd to 71dac21c25, the
head of craft-libs#5541, which is that commit plus the writer.
The picture frame is in whole points, but the frame in device units was
rounded from the artboard's own size, so a reader scaled the drawing by
their ratio: on a 100.4 pt artboard art at x = 80 opened near 79.7. The
device frame is now the picture frame times the device units a point,
and art is cut to that frame.
With an add-on dialog previewing (Arrange in Grid, for example),
File > Place ran inside the preview's interaction, because every
`file.*` command other than `file.documentColorMode` was treated as one
that reads the drawing on show. The placed art went into the preview
document with no undo step of its own, and Cancel removed it.
`file.place` now runs on the document without the preview, as other
edits do: it records its own undo step and stays after Cancel and OK.
Save, Export, Copy and the other `file.*` commands still act on the
drawing as the preview shows it.
Docs: docs/mcp.md (undo/redo row).
A fill with more points than one polygon holds is flattened more
coarsely, and a small figure of two curves could then shrink to two
points and be left out. Each figure now keeps its finer outline when
the coarser one would drop it.
The warnings and docs/mcp.md now give the polygon limits as 8,189 and
8,187 points, since a polygon's size is a signed 16-bit count.
The Layers panel footer showed Create New Layer as `file-plus` and
Create New Sublayer as a plain `+`. Clicking the `+` to add a layer
made a sublayer inside the current layer, which the panel shows as a
row with a disclosure triangle under it.
Create New Layer now shows `dc-new-item`, the icon New Swatch, New
Brush, New Symbol and the other panels' new-item buttons show, and
Create New Sublayer shows a new `dc-new-sublayer` icon: a layer row with
a new-item square nested under it. The commands the buttons run are
unchanged.
The icon change follows Milo-IZ's #10651.
Takes main's craft-libs rev 4f3e34d0dd. Character Style Options and Paragraph Style Options canvas support and their two tests move to #10953, which waits on storytold/craft-libs#5510.
CI's test-lint step rejected the 500 % case of
the_frame_limit_grows_with_the_monitor_dpi, which compared the clamped
rect with a tuple of numbers. The test now checks that only the bottom
edge moves and that it hangs below the work area by the same border the
top edge hangs above the monitor.
File › Export As and document.export {format: "pict"} write a version 2
QuickDraw picture (.pct) of an artboard, or one per artboard with Use
Artboards, with the extended header at up to 16 device units a point.
- Fills are PaintPoly polygons. A path of several figures is one
polygon that runs back along the line between its figures, so the
even-odd fill QuickDraw gives polygons keeps its holes. Non-zero fills
are first resolved into figures that don't overlap, and art is cut to
the picture's frame so every coordinate fits 16 bits. A fill too
complex to resolve is written as it is, with a warning.
- Strokes are written as their filled outlines (line_outline, with
dashes, caps, joins and miter limit).
- Images are DirectBitsRect pixel maps in tiles of at most 1,024
pixels, rows packed with PackBits, composited over white. Mirrored and
quarter-turned images keep their placement, and an image reaching far
past the frame keeps its columns in place.
- Clipping masks, gradients, patterns and transparency are written as
WMF writes them, with the same warnings. Artboards over 32,767 points
on a side are refused.
The writer follows the opcode tables of Inside Macintosh: Imaging With
QuickDraw, and the tests read every picture back through the PICT
reader.
The gate's test-lint step flags an all() assertion with no length check in dashes_start_at_each_lines_base_point. The test now asserts the row at y 50 holds more than the four pieces it compares.
Remove Anchor Points mapped each subpath's next anchor to the path as
drawn with `LiveCorners::drawn_anchor`, which counted the anchors of
every earlier subpath again for each one. `LiveCorners::drawn_anchors`
maps the whole set while walking the subpaths once.
The docs now say that Remove Anchor Points selects the next anchor of
the uncut outline, which can be an anchor added on a side as well as a
corner.
The detailed missing-items row for File formats still said DWG was
missing with DXF as the substitute. It now lists the DWG limits that
remain: the web build and FreeBSD for aarch64, R1.x and R2.x drawings,
and DWG export before version 2000.