Moves every craft-libs rev (Cargo.toml, Cargo.lock, apps/vectorcraft-web,
xtask pdf_deps) from 138ce9929e to craft-libs main 6b67abe4b3. The egui,
winit and acadrust revs match the ones that craft-libs rev pins.
- Canvas: the drag-session restart after a Removed cancel (resume_carry
and CanvasCache::removed_press) is removed; craft-libs #5281 keeps the
session running while the canvas is hidden for a pass.
- DXF export: blocks_compat is removed; group blocks are written through
craft_dxf::drawing::Block, Drawing::blocks and Codes::insert
(craft-libs #5381), so Drawing::blocks now holds them.
- DXF import: VectorCraft's copy of the REGION reader (import/acis.rs and
the region helpers in reader.rs) is removed; regions are read with
craft_dxf::acis (craft-libs #5513), capped at the import's element limit.
The hex and size checks of the binary data are tested in craft-dxf.
- CGM import: the cgm feature is removed, so binary CGM files open and
place in every build (craft-libs #5410). The reader's notes on unread
fonts, appended text, continuous alignment, marker types and character
sets now come back as warnings too. docs/mcp.md describes the import.
- Canvas: the anchor marks draw a mark's fill and edge as one shape and
leave out other paths' handles that cannot reach the canvas, as
BezierOverlay does since craft-libs #4938, so they keep painting what
the overlay paints.
- Native files: craft-vectorcraft-format's VERSION is 5 (craft-libs
#5366). Saves for version 4 keep placed documents, Color Halftone's Max
Radius in pixels and Twist angles as before (new PLACED_SINCE), and only
live stars become paths there (LIVE_STAR_SINCE). A version 4 file from
0.21.0 or later still opens with its Twist angles as saved. Save As
lists version 5, and the version option defaults to 5.
- Layers panel test: icons share packed atlas pages since craft-libs
#4275, so the test tells icons apart by texture and atlas rectangle.
craft-libs main now holds craft-geom, craft-pathops and craft-trace
(storytold/craft-libs#2260, RFC-0030 step 1). The pin moves first, as its
own change, so the cutover that deletes VectorCraft's copies only swaps
crates.
API changes since f9e5cecc, behaviour kept:
- craft-dxf's Drawing has block definitions; VectorCraft writes none.
- craft-cdr reads text as Object::Text and counts what a CMX read left out;
CDR text stays left out under the existing unsupported-objects warning,
as it was when the reader dropped it.
A restored selection loads its paints for new art only when the journal
records it with a selection command that loads them on replay. An
Objects on Path member, recorded as object.objectsOnPath.selectMember,
now keeps the paints as they are, as a symbol part already does.
The 3D effects' `render` object takes `colorModel` (`document`, the default,
`grayscale` or `bitmap`). Grayscale gives each pixel of the rendered image the
Rec. 709 luma of its color, and Bitmap makes it black or white, after the
background and with each pixel's transparency kept, as Effect › Rasterize does
with the same model ids. Edge pixels are mapped from their straight color
before the coverage is rounded. Grayscale and Bitmap images are stored as gray
PNGs, and the model is part of the rendered image's cache key.
Any other value is refused with an error and leaves the object and the undo
history unchanged. The setting is saved with the effect.
Render Settings › Raster Settings… gets a Color row (RGB, Grayscale, Bitmap).
It opens blank for a selection that holds different models, and OK sets the
picked model on every selected object in one undo step.
Docs: docs/three-d.md, docs/mcp.md, docs/target-app-parity.md, params text.
Restoring a selection now clears the marker a defaults-only paint left,
as every top-level command does, so new art takes the restored
selection's appearance live as it does when the journaled select.set
replays. A restored symbol part no longer loads its paints for new art,
as symbol.instance.selectPart, the step the journal records for it,
does not.
Deleting a saved profile kept only the stored ids, so a profile saved after
the last move was missing from the order passed to set_profile_order and the
default order stayed stored. Delete now builds the whole list as it shows and
stores it only when it differs from the default.
The visual bounds of a stroke with arrowheads added a square around each
end point, as wide as the head's reach. With the arrowhead's align set to
"Tip on the end point", the head lies back along the path, so the
selection box reached past the tip by the head's whole length, leaving
empty room in front of the arrow. The bounds now take the box of each
head's outline from the same geometry the canvas paints, so the box ends
at the tip. The arrowhead geometry moves from vectorcraft-effects to
vectorcraft-doc so that the bounds code can use it; vectorcraft-effects
re-exports the same items.
The fade outside the artboards filled each of its pieces on its own, and
each faded out along the edges it shares with the next, so thin lighter
lines ran from the artboard's corners to the edges of the canvas. The
pieces are now filled as one unfeathered mesh (Draw::data_fill_tiled).
Fixes#10221Fixes#10225
Co-authored-by: FredApps <[email protected]>
Rows of the Profile drop-down below Uniform can be dragged to a new
place, and stroke.widthProfile.move {name, to} does the same from a
script. Uniform stays first. The order is kept with the preferences
(widthProfileOrder) and is stored only while it differs from the
default one.
- move takes a profile's id or its label, and refuses Uniform, an
unknown name and a `to` past the last row.
- Moving a profile to the place it already has changes nothing.
- A deleted saved profile leaves the order, so one saved later under
the same name goes to the end of the list.
- Reset Profiles also puts the built-ins back in their first order,
and is enabled when only the order changed.
Ported from the reordering part of #10920.
Co-authored-by: erolkarino <[email protected]>
FreeBSD CI runs `cargo test --workspace`, which runs a crate's tests as
threads of one process; Linux CI runs nextest, one process per test. Four
vectorcraft-engine tests failed only in the shared process:
- Events plug-ins are installed in the process-wide registry, so every
installed one reacts to every session's changes and spends handlers of
each session's frame budget (MAX_FRAME_HANDLERS, 4). With other tests'
plug-ins installed at the same time, the plug-in a test counts on was
left for a later frame and its handler never ran.
a_plugin_installed_before_the_delivery_gets_no_earlier_events,
a_save_reaches_the_plugin_when_its_document_closes_first and
background_installs_during_a_drag_record_the_settled_baseline failed
this way. The tests that install events plug-ins now hold a test lock
(hold_event_plugins) while their session lives; sessions on one thread
share it.
- a_stale_placed_item_is_not_a_relative_object and
a_stale_placed_item_is_refused_as_the_relative_object_of_move used the
same fixture folder name, and each test empties its folder first, so
one deleted the other's a.png. The second one now uses its own folder.
`cargo test -p vectorcraft-engine --lib` on Linux reproduces all of them
before this change.
When a failed DWG Replace gives the user's selection back in the active
document, the journal now records that selection (through the same steps
an interaction uses, in open undo groups too), so a recorded action
replays later commands on the restored objects. The paints for new art
load from the restored selection as they do after select.set, so the
next shape does not take the swapped object's paints.
File > Open refuses an RTF file that ends inside a group as damaged
instead of opening the text read before the end; File > Place still
places that text. Binary data and bytes after the document's closing
brace are skipped, as the reader skips them.
Text Import Options for a file File > Open asks about now waits while
any dialog is open, as Missing Fonts does, so the two never show at
once.
The File > Open filter test uses the extensions and formats this build
reads, so it holds where no DWG decoder is built in.
Every craft-libs rev moves from 4f3e34d0dd, the head of craft-libs#5489, to craft-libs main.
The egui and winit revs are the ones that craft-libs rev pins, unchanged.
- Opacity fields (Control bar, Color Wheel, Gradient) show the stored fraction times 100 again.
craft-libs#5466 makes the number field step on from a value such as 50.999999 %, so
panels::shown_percent is removed.
- The Blend Options Ramp and Shift sliders, the Image Trace rows and the Divider field use
SliderField::edit_target (craft-libs#5024) in place of the id-salt workarounds. A value typed
for one object and not yet committed is still dropped when another is selected.
- CDR import: craft-libs now reads bitmaps as their own object kind. They are not placed; the
warnings name them with the other objects not read, and a PowerClip frame that clips only a
bitmap is named as a frame that opened empty.
`document.rasterEffectsSettings` read `"१e2"` and `"१e+2"` as 100 ppi:
`ascii_digits` treats `e` and `+` as the end of a number, so each side
could use its own digit set. The resolution now goes through
`vectorcraft_doc::ascii_digits_one_number`, which requires one digit set
for the whole value. `"१e२"` still reads as 100, and `"1e२"`, `"१e2"`
and `"१e+2"` are refused.
The clip-outline check behind `pathItems.removeAll()` measured each
subpath by its signed area. The loops of a figure eight turn opposite
ways and cancel, so the check treated the outline as enclosing nothing,
although both fill rules fill it. A subpath whose signed area is within
roundoff of zero is now measured by the area it fills under nonzero.
A subpath whose points all lie on one line still encloses nothing.