A star with a radius on each corner stores its corner list in its
shape settings entry. A 1000-point star's entry is longer than the
4,096-byte read limit, so it was dropped on read and the star lost its
pie angles and arc mode on the next edit. The limit is now 128 KiB,
which holds the longest entry a 1000-point star can write.
A whole star draws every point, so its pie angles no longer stop it
from being stored as a live star. Angles configured on any whole shape
are stored with it, so a later arc mode change uses them.
A corner list longer than the old corner count drops its entries past
the last corner before it is spread, so the corners a new point or
side count adds are sharp and keep the default kind.
A live star whose ratio is below 0.01, which object.setLiveShape takes,
lost its inner radius and its live shape when addon.shapes.configure
changed another value: the stored ratio was clamped to 0.01 when the
star was drawn and no longer counted as live. Any ratio from 0 to 1 now
draws and stays live as it is.
A corner list shorter than the star's or polygon's corners counted as
one shared radius, so a new point or side count gave the missing corners
the first corner's radius. The missing corners now stay sharp.
A ratio that changes which corners a rounded star cuts is now an error
with radius or kind in the same call, as points is, since the corners
selected before it no longer name the same corners. The anchor selection
is dropped by the same check.
With two direction handles picked, a Cmd/Ctrl+Shift press on one of them
drags that handle alone with its opposite handle mirrored and its angle
constrained. Shift kept the press from counting as a press on one of
several picked handles, so the press did not record the picks, and its
release after a drag, or Escape during it, left only the pressed handle.
The press now records the picks for any mirroring press on one of several
picked handles, with or without Shift. Shift still keeps a drag from
moving every picked handle, and a Shift-click still adds or removes the
pressed handle.
A Cmd/Ctrl press on one of several picked direction handles drags that
handle alone so its opposite handle mirrors. The press cleared the picked
handles, and neither the release nor Escape restored them, so after the
drag only the pressed handle could be picked again.
The press now records that it is such a mirroring press. Its release
after a drag, and Escape during the drag, restore the handles that were
picked when the press began. A drag without Cmd/Ctrl still moves every
picked handle, and a click still picks the pressed handle alone.
With two or more direction handles picked, a press without Shift on one
of them started a drag of all the picked handles (path.moveHandles),
which never mirrors. A Cmd/Ctrl press that Direct Selection now keeps on
a shown handle therefore translated every picked handle instead of
mirroring the opposite one.
press_handle now drags the pressed handle alone when the press mirrors
(Cmd/Ctrl without Alt, and not the press that lent the tool from another
tool), so the drag mirrors its opposite handle and the other picked
handles stay where they are. A drag without Cmd/Ctrl still moves every
picked handle.
With Direct Selection chosen, Cmd/Ctrl lends the Selection tool for the
press. That loan also took presses on the end of a shown direction handle,
so a Ctrl-drag on a handle moved the whole object (and anything selected
with it), or drew a marquee where no object was under the handle. Only Ctrl
added after the drag began mirrored the opposite handle.
A new Tool::keeps_cmd_press lets the active tool keep a Cmd/Ctrl press.
Direct Selection keeps one without Alt on the end of a shown handle of a
path, of type on a path, or of a selected blend spine anchor, so the drag
mirrors the opposite handle, with Shift constraining it. The session's
lent_tool_at asks it, so the press, the cursor and the status bar agree. A
press elsewhere, on a handle of the bounding box the lent Selection tool
shows, or with Cmd+Alt (Group Selection) is still lent as before.
docs/gaps.md and docs/ui-parity.md describe the press.
Rustdoc builds each doc test as its own crate, without the workspace's
`unsafe_code = "deny"` and without a library's `#![forbid(unsafe_code)]`,
so a doc test holding an `unsafe` block passed `cargo test --doc`.
- Every library root now carries `#![doc(test(attr(forbid(unsafe_code))))]`,
or `deny` in cad, eps and metafile, which rely on the workspace lint.
- `cargo xtask layers` reports a library whose doc tests are missing the
attribute, or use `deny` where the library forbids unsafe code.
- AGENTS.md names the rule next to the `unsafe` allowlist.
A shape's stored add-on settings read their side or point count from the
file with no upper bound, and a live star or polygon made from them took
that count as it was, so a document could ask for billions of points.
The count is now clamped to 2-1000 when it is read, as the Polygon and
Star tools clamp it, the live polygon and star made from it are kept to
3-1000 sides and 2-1000 points, and shapes::star keeps to 1000 points.
A star drawn with the Star tool, shape.star or addon.shapes.star was a
plain path, so its point count could not change after it was drawn.
- LiveShape::Star keeps the outer and inner radii, the point count
(2 to 1000, clamped when read from a file) and Live Corners' radii and
kinds. Its corners keep the radius they shared through a new count.
- object.setLiveShape takes `points` (2 to 1000) and `ratio` (inner
radius over outer radius, above 0 and up to 1), one undo step each and
none when nothing changes. A new layout drops the star's selected
anchors and segments; `points` with `radius` or `kind` is an error.
- The side widget shows on a live star and sets 3 to 20 points.
- Star Properties in the Transform panel and the Properties panel's
Transform section have a Points field with a 3 to 20 slider and a
Ratio field.
- Shape Tools' configure keeps a whole star live.
Fixes#4339
Assertions that ran all() over a list that could be empty now check the
list's length first: mesh points, image inks, glyph origins, imported
text, the PDF mesh and arrowhead paths, and the resampled CMYK pixels.
An image that takes a Warp from its art style is checked to keep none of
the look's fills and strokes, instead of checking each of none.
The convolve-matrix tests check that the filtered rectangle is imported,
not only that the import returned Ok. The fan-out clip path test moves
to a unit test that counts the clip paths read. The self-nesting symbol
test checks that the other symbol comes back. The EPS level and preview
id test checks the param values and the trimming and case rules instead
of looping over every value. The ignored PDF text-heavy timing run says
why it is ignored.
A gradient that repeats or reflects with no stops now paints as one
that pads. Before, PDF export wrote it as two 160 by 160 images and EPS
wrote three runs of a conic where one that pads writes one;
`Gradient::is_spread` is false without stops. `paint.setFill`'s params
still report the spread.
Tests whose all() passed on an empty list now check the list's length or
that it is not empty:
- huge_circles_bridge_with_finite_anchors_or_are_refused (pathops bridge)
- smooth_rounds_corners (pathops ops): the four corners stay, smoothed
- a_held_rotation_turns_the_art_around_its_pin (tools ARAP): one point
per mesh vertex
- the_eraser_drag_area_matches_the_release_when_pressure_or_a_mode_starts_during_the_drag
(tools gesture): one released point per press
- every_effect_casts_a_shadow, inflate_cells_across_a_hole_edge_are_cut_to_the_shape,
a_plane_has_only_a_front_and_a_hollow_solid_none and
perspective_runs_0_to_160_degrees_with_the_eye_outside_the_object (three-d)
- a_file_two_branches_include_is_followed_from_the_shallower_one
(scriptcheck): one row per include line
- pens_pick_colors_and_widths (cad HP-GL): four widths
- junk_pressure_brushes_draw_finite_art (brush): all 12 cases draw
Round trips that hold by construction (parse finds the id in ALL) are
replaced with one saved name that must parse and one that must not:
follow_names_parse (pathops shared edge), the shape kinds (pathops
shapes), surfaces_parse_from_their_ids (three-d), the Quick Pen actions
(tools), names_parse_and_serialize_as_names (plugins) and the brush
variation modes, which also compare the serde names with the ids.
crop_keeps_an_instance_whose_art_reaches_the_region (cad) names the
entities written instead of checking that some were.
the_saved_engine_preference_is_found (app) pins the GPU choices the
preferences offer to the three the app reads.
timing_unite_1000_circles (pathops) gets an ignore reason and checks
that Unite gives one shape.
Each changed assertion fails when the code under test is broken (an id
renamed, a list emptied, a flush or instance dropped) and passes when it
is restored.
Five assertions accepted any positive value, so a wrong result could pass:
- host_tests: the evaluator site column and the thrown error's column are
now 3, where the indented call and throw start.
- promise_tests: rejections relayed through Promise.all, Promise.race and
a catch handler report column 3, not any column above 0.
- xmp_tests: the sample packet's padding is exactly 1.
- corners tests: a 10 pt radius at a 120 degree polygon corner spans
10 pt, within 1e-6, instead of anything in (5, 10.5].
Several tests returned early when the code under test gave back nothing,
so the regression they guard against passed. Each of those guards now
checks only what the host provides (an installed face, the bundled
fonts), and the output itself is asserted:
- PDF live text: the lam-alef face is no longer picked by whether its
type imports (#6072); Insert Kashidas asserts the kashida and the
imported type.
- Effects and Expand Appearance on type assert the outlines and the
drawn type when the default face is installed.
- The OpenType panel's Stylistic Sets test asserts sets with the
bundled fonts.
- Thumbnail worker tests assert that the worker starts; the memory
peak test asserts a reading.
- The json2 test checks the interpreter's Date, replace and RegExp on
every run, before looking for json2.js.
- Devanagari arrow keys and the Arabic narrow-area wrap assert the
layout they set up.
The parity doc, docs/dimensions.md and two comments said the box shown
while hovering a path with Alt held goes through the path's outermost
points. It follows the box the strokes paint, which reaches 0.5 pt past
those points for a centered 1 pt stroke.
With Alt held, the Dimension tool's box over a path and the dimension of
the whole path it places now reach the outside of the path's strokes
whether Use Preview Bounds is on or off. Before, they did so only with
Use Preview Bounds on, and with it off they went through the outermost
points of the path.
Every dimension of a whole path the tool places now records
`"preview": true` in its extent source. Dimensions saved without it keep
measuring between the outermost points, and `dimension.create` still
defaults `preview` to false.
Dragging a point of a selected path with the Curvature tool gave the
point the handles of the circle through it and its neighbors, while the
neighbors kept their own tangents. Stretching a circle's top point far up
made those handles reach well past the circle's sides, so the shape swung
out wider than the circle before it narrowed toward the point.
Each handle of the moved point is now no longer than the handle of the
circular arc tangent to it and to the neighbor's handle on that segment.
Where the neighbor is on the circle the tool follows, that arc is the
circle and the handles do not change. The shortening fades out as the
two handle lines meet near the neighbor or turn parallel, so the handles
change continuously during a drag.
Leaving the Shape Builder saved every one of its options, so preferences
from earlier versions hold pickColorFrom "artwork" whether or not it was
picked, and kept the old default after Color Swatches became the default.
The preferences now carry toolSettingsVersion, written as 1 once a tool
setting is stored. Applying preferences without it changes a saved
Shape Builder pickColorFrom "artwork" to "swatches" and writes the
version, so Artwork picked after that is kept at the next launch. A
saved "swatches" and preferences without a saved pickColorFrom are
unchanged.
Docs: docs/mcp.md and the tool options params text.
While the Shape Builder is active, a fill picked from a swatch or a color
changes only the current fill, and the selected art keeps its own. With
Pick Color From set to Artwork, a merge takes the look of the art, so the
picked color never reached the merged shape and the tool looked as if it
could not fill.
Pick Color From now defaults to Color Swatches: a merge fills with the
picked color, and the Left and Right arrow keys step through the color
swatches. A pickColorFrom saved with the preferences is kept, so a saved
Artwork stays Artwork; preferences saved without one take Color Swatches.
The shapeBuilder.merge command still defaults to artwork when its
pickColorFrom is left out.
Docs: docs/mcp.md and the tool options params text.
With one object selected and the Selection tool active, or while Global
Edit is on, every frame copied each highlighted outline out of the kept
list and made one overlay per object, which the canvas flattened and
stroked again. With 10,000 matching objects that was most of a 27 ms
frame.
highlights and similar now return the kept outlines as a shared
Highlights, grouped by layer color with a revision that changes only when
the outlines are found again. The session sends one Overlay::Outlines per
color, and the canvas shows it as a SelectionOutline keyed by that
revision, so the lines are stroked again only when the outlines or the
view change.
With Use Preview Bounds on, dragging a bounding-box handle with the
Selection tool, a shape tool or Free Transform lined up the outside of
the selection's stroke with the other art's geometric bounds, which
Smart Guides use for the targets. A stroked object then stopped half a
stroke short of the edge it showed a guide for, the same mismatch moves
had before.
- The handle still drags the visual box, and the edges of the
selection's geometric bounds line up with the targets and with even
spacing. The margins between the two boxes keep their size unless
Scale Strokes & Effects is on, when they scale with the box. Snap to
Grid and Snap to Pixel still use the bounds the box shows, and the
Slice Selection tool is unchanged.
- Tool contexts carry the Scale Strokes & Effects preference.
- New tests drag the right-middle handle of a rectangle with a 20 pt
stroke toward another rectangle with the Selection tool and with Free
Transform.
Part of #6436
- Every craft-libs crate moves from 610c86792a to f762f98a (craft-libs
main), which adds the fixed corner-widget inset, the ruler corner's
plus, popover padding, and a native window's move recorded once.
- The status bar's Zoom field uses ZoomField::status_bar, so it draws
without an outline in the status bar's look.
- The Rotate View compass is placed in CanvasScrollbars::clear_of
instead of a copy of the scroll bars' sizes.
- The tools' corner-widget inset is public, and a test holds it equal
to CornerWidgets::INSET, the inset the canvas draws the widgets at.
With Use Preview Bounds on, a move lined up the outside of the selection's
stroke with the other art's geometric bounds, which Smart Guides always
use for the targets. A stroked object then stopped half a stroke short of
the edge it showed a guide for, or overlapped it by that much. The moved
selection's geometric bounds now line up with the targets' geometric
bounds whatever Use Preview Bounds says. Snap to Grid, Snap to Pixel and
the ruler guides still use the bounds the bounding box shows.
Part of #6436.
Each preview runs on the document as the interaction began, and spine edits
pin the spine from that document (live::pin_spine). Shift now measures the
45 degree steps from that anchor, so the handles the command writes stay on
the steps after a previewed move. docs/mcp.md says when pointer_gesture's
Shift moves the anchor and when it constrains the handles.