The `Tool` implementation's `busy`, `pointer`, `key`, `claims_key`, `overlays`
and `cursor` in shape.rs, and `pointer` and `cursor` in select.rs, are the ones
this pull request edits; each now has a doc comment, so the docstring coverage
of the functions the diff touches is complete.
- The 45° move assertion compares dx and dy with a small tolerance instead of
exact equality (the matrix's floats are rounded), keeping the non-zero check
and the message.
- The engine test helpers say what they do, so the docstring coverage of the
functions this pull request touches is complete.
The roadmap's status line and revision history now record the shape tools'
centre-point move and corner rotate (#5477), and the parity status line no
longer names the Transform tab-order fix, which is its own pull request.
The Selection tool's cursor now checks the ruler guides before a selected
object's centre point, as a press does. Tests: a ruler guide under the centre
point keeps the pointer and drags; on a box too thin for its centre to clear the
handles the handles take both; a shape-tool move from the centre snaps and shows
the hollow arrow; and Alt pressed mid-drag copies the shape through the engine.
The Selection tool's cursor now checks the bounding-box handles before a
selected object's centre point, as a press does (on a thin box the centre lies
within a handle's reach). The shape tools' tests cover a Live Corners widget
that lands on another selected shape's centre (the widget rounds), Alt pressed
mid-drag (the preview copies and the copy cursor shows), and the engine tests
check the copy's place and both gestures' Undo and Redo. The cursor catalog says
which arrow a drag of the selection shows.
- The Selection tool takes a Shift-press on a selected object's centre point
too: a Shift-drag moves the selection held to 45° steps, and a Shift-click
there takes the object out of the selection, as a Shift-press on the object
does.
- One rotate zone for the Selection tool and the shape tools
(`select::rotate_zone`): a press on a bounding-box handle is not a turn, so
the shape tools' zone matches the Selection tool's classification exactly.
- The shape tools' hover cursor follows the press order (corner and pie widgets,
then the centre point, then the rotate zone), and a move of the selection
shows the Selection tool's feedback: SelectionCopy with Alt, ArrowHollow while
it snaps.
- Engine-level tests for the whole gesture (`crates/engine/src/tests/shapetools.rs`):
repeated previews and one undo step, Alt copy, Escape then release, a turn
about the centre, the corner widget still rounding, and an unfilled shape
moved by the Selection tool.
- docs: evidence in target-app-parity.md's Shapes bullet and the M2 milestone,
and the Move cursor's entry names the copy and snap cursors.
A press on the centre point of the selected shape now moves the selection, as
asked (#5477), so the Constrain Angle test's repeated draws from the same point
moved the polygon drawn before them. It deselects first: nothing selected, the
press draws.
The Artboard tool's own Control bar drew the W/H Constrain Proportions link
between W and H, so with that tool Tab stopped on it before H, as the object
Control bar did before the last commit. It reserves the link's place and makes
the button after the fields too, and the link now toggles with Space or Enter
when it has the keyboard, as a dialog's button does.
Tests: `one_tab_moves_from_a_field_to_the_next` covers the Artboard Control bar
(W to H in one press), and `the_control_bar_link_toggles_by_click` Tabs from H
to the link and toggles it with Enter.
A shape just drawn keeps its bounding box with the Rectangle, Rounded Rectangle,
Ellipse, Polygon and Star tools, but its centre point (Attributes › Show Center)
did nothing and the box's handles only drew: a press anywhere started a new
shape, and with the Selection tool a press on the centre of an unfilled shape
started a marquee.
- The Selection tool now takes a press on a selected object's centre point as
the start of a move (held by that point, so it snaps and Alt copies), as
Direct Selection has since #4891. A click there still makes the object the
key object of a multi-selection.
- The shape tools take it too, and take a press in the rotate zone just outside
a bounding-box corner (the Selection tool's own zone and cursor) as the start
of a rotation about the box's centre. Live Corners widgets keep the corners
themselves, so a press on a corner still rounds it; every other press still
draws a new shape. Escape cancels, as for the Selection tool's drags.
`hit_center` moves from direct.rs to select.rs, shared by the three tools.
A review found the link lost its keyboard focus when it stopped being a tab
stop. It is focusable again, and the Control bar now keeps the link's place
between W and H but makes the button after the H field, so Tab still goes from
W straight to H and finds the link after it (as the Transform and Properties
panels already draw it). Tests: Shift+Tab goes back one field too, and a click
on the Control bar's link still toggles the preference.
The Blob Brush Tool Options test that expected two Tabs between the Roundness
field and the tip preview now expects one, as every field does. Docs: the Tab
entry in target-app-parity.md, both revision histories and the M1 milestone.
A numeric field's label is a scrub zone laid over the label (a drag scrubs the
field, a click focuses it). It was registered with `Sense::click_and_drag()`,
which is focusable, so every field had a second, invisible tab stop: Tab went
from X to W's label zone and only then to W. The zone is now `CLICK | DRAG`,
not focusable, and the W/H Constrain Proportions link — a button between W and
H in the Control bar — is no longer a tab stop either, so Tab goes from W
straight to H. The preference stays reachable from Preferences › General.
Test: `one_tab_moves_from_a_field_to_the_next` (Transform panel, Properties
panel's Transform section and Control bar).
The Community links can fall below the first scroll viewport at 1000x700
when the fonts differ, so the test measured nothing. 1000x900 keeps every
link visible.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The first commit centred the headings but left the New / Open buttons
and the community links on the left, as `horizontal` fills the width.
The buttons' row is now padded by its measured width, and the Home
screen's links are centred (label only, no icon; About keeps its
left-aligned icon rows). The test now measures where the centred text
lies and checks the buttons, the Discord button and the links.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0113uEh3VQ6et4zDMZ9cqzkf
Part of #4684 (unify the UI with PhotoCraft). The Home screen's welcome,
New / Open buttons and Community block are centred, as PhotoCraft's
Home screen is, and the large Discord button takes the theme's accent
instead of Discord's own colour. Preset cards, Recent Files and the
wording are unchanged.
Still open from #4684: shortcut hints on the Home buttons, PhotoCraft's
PRO and STUDIO themes, the Preferences layout and the title bar.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0113uEh3VQ6et4zDMZ9cqzkf
A new test binary opens a document of 13 type objects with the plans a
font face keeps and again while every shaped segment makes its own plan.
The document, its cached bounds and baselines included, and the first
frame's pixels must be the same. `test_fonts::keep_shape_plans` switches
the plans off; it exists only in tests and with the `test-fonts` feature.
The engine's open test now builds objects of one script and direction
that differ in kerning and language, and lays each one out in a font
database of its own, so a plan used for the wrong features fails its
comparison. It no longer sets Arabic, which could fall back to a system
font in one database and not the other.
Every shaped segment built its own harfrust shaping plan, although a
plan depends only on the face, direction, script, language and features.
Opening a document lays out each type object once, so a document of many
short objects built thousands of identical plans.
A font face now keeps up to 32 plans, oldest dropped first, and shapes
with the one that matches. Feature ranges still come from the shape
call, so text with the same features over other ranges shares a plan.
The glyphs, bounds and baselines do not change.
Docs: docs/target-app-parity.md.
The clipping path around a transparent image flattened for a version 7
.ai followed 2 pt cells, a visible staircase. It now follows the rendered
pixels (in blocks only past 4 million), grown by one pixel so the whole
anti-aliased edge is inside, through the middle of each pixel edge and
simplified with Douglas-Peucker, so slopes and curves are sloped lines.
Comments only. A saved Soft Mix holds Command 11 and a Mix of the Mixing
Rate divided by 100, and a saved Mix can fall outside the 0.01 to 1 the
reader takes, which keeps the drawn look.
A group whose style holds Effect › Pathfinder › Intersect, Exclude, Subtract,
Minus Back, Divide, Outline, Trim, Merge, Crop, Hard Mix or Soft Mix now opens
with its members editable and the effect live, as Add already did
(https://helpx.adobe.com/illustrator/desktop/manage-objects/reshape-transform-objects/combine-objects-using-pathfinder-effects.html).
The Command numbers 1 to 10 are VectorCraft's own reader rules, learned from
saved files. Soft Mix's number 11, and reading its Mix from 0.01 to 1 as a
Mixing Rate of Mix times 100, are also VectorCraft's own reader rules.
These still open as the drawn look:
- Trap, and the effect on a path, on type, on a layer or on a fill or stroke.
- Any operation whose saved Pathfinder Options (Precision, Remove Redundant
Points, Divide and Outline Will Remove Unpainted Artwork), ConvertCustom,
Mix or Trap settings differ from the values the reader accepts, although
only Soft Mix uses Mix and none of these operations uses the Trap settings.
The import fuzz test now also gives the style every option with any Mix, and
checks that a live Soft Mix's rate is from 1 to 100.
Export All Open Documents read the active artboard recorded for each
document, which was kept current only for the active one. A document
whose artboard changed in its view while another tab was active wrote
that stale artboard as the file's active one. Before each command the
app now records every open document's active artboard from that
document's own view.
A .ai file that File > Export As, its dialog or a control request writes
to a path now names the view's active artboard, as document.export and
document.serialize do. The UI export records the view's artboard and
takes its document from fileio::export_doc, which applies
DocState::active_artboard to the export's copy; document.export and
document.serialize use the same function.
The app now records the view's active artboard before every command,
including the commands the UI handles itself, so a .ai copy from Save a
Timestamped Copy or Export All Open Documents names it too. Before,
these files named the artboard the document opened on, or the first.
The open document is unchanged.
A file that takes longer than 0.4 s to open shows a modal progress window
with its name, a moving bar (reading reports no steps), how many more
files wait, Cancel (file.cancelOpen: the file doesn't open) and Continue
in Background (file.openInBackground). It never opens over another dialog
or progress window.
The editing copy of a .ai or .ait file that VectorCraft saves or exports
now has `%_<n> /Int (CropAreaActive) ,` after the ArtboardArray in its
recorded part, and marks that artboard as the selected one. The app
records its view's active artboard before each command
(DocState::active_artboard; an index past the last artboard is the last,
as in the Artboards panel); without a view, the artboard the document
opened on (Document::opened_artboard) is written, else the first. A .ai
file read from its editing copy opens on that artboard. Before, the copy
named no active artboard and always marked the first as selected.
Docs: docs/mcp.md, docs/file-format-parity.md, the editingData option text.
Bulgarian was not among the text languages, so Bulgarian text could not
be tagged and fonts drew their Russian-style Cyrillic. Bulgarian (bg)
is now in the language list (Character panel, character styles,
text.setFormat by name or tag, the Hyphenation preference's default
language), with CLDR's quotes, „…“ at either level. Shaped as bg, the
fonts' locl forms for BGR apply: in the bundled Source Sans 3 Italic,
в, д, ж, з, к, л and ю take their Bulgarian forms.
Fixes#5945