Commit Graph

673 Commits

Author SHA1 Message Date
bflatastic 96f1b6852a Merge wp/F1
# Conflicts:
#	crates/doc/src/node.rs
#	crates/engine/src/cmd/appearance.rs
#	crates/engine/src/cmd/paint.rs
#	crates/ui-egui/src/chrome.rs
#	crates/ui-egui/src/panels/transparency.rs
2026-10-04 22:07:49 +07:00
bflatastic 546559d8a1 M3.17: dialog modules in rustfmt order
The swatch and gradient merges left the module list unsorted, which cargo fmt --check rejects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 22:02:27 +07:00
bflatastic 0b547ec597 M4.13: raster exports check the format's size limit first and share the renderer's pixel budget
The encoder kept its own copy of the renderer's pixel budget and checked it after
render::raster_size, so a WebP too wide for its 14-bit sizes reported the generic limit
(fileio test oversized_raster_exports_are_refused). Only the WebP side limit stays local.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 22:02:26 +07:00
bflatastic 62569f8a9d M3.19: a negative dash entry makes the pattern invalid, so the line draws solid
The merged dasher clamped negative entries to zero, which turned [-5, 3] into dots instead of the
solid line SVG and PDF draw for an invalid pattern (render test invalid_dash_pattern_strokes_solid).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 22:02:26 +07:00
bflatastic 721bb483c3 Merge wp/D1
# Conflicts:
#	crates/engine/src/cmd/appearance.rs
#	crates/engine/src/cmd/gradient.rs
#	crates/engine/src/cmd/paint.rs
#	crates/engine/src/cmd/stroke.rs
#	crates/engine/src/lib.rs
#	crates/engine/src/tooling.rs
#	crates/render/src/lib.rs
#	crates/tools/src/lib.rs
#	crates/tools/src/xform/gradient.rs
#	crates/ui-egui/src/panels/stroke.rs
2026-10-04 22:01:05 +07:00
bflatastic 41f2af932c Merge wp/C1
# Conflicts:
#	crates/doc/src/appearance.rs
#	crates/effects/src/stroke/width.rs
#	crates/engine/src/lib.rs
#	crates/pdf/src/export.rs
#	crates/render/src/lib.rs
2026-10-04 21:47:58 +07:00
bflatastic efc0ac31d9 Merge wp/B1
# Conflicts:
#	crates/engine/src/cmd/swatch.rs
#	crates/ui-egui/src/dialogs/mod.rs
#	crates/ui-egui/src/panels/mod.rs
#	docs/control-protocol.md
2026-10-04 21:47:07 +07:00
bflatastic 1ae0c22c26 Merge wp/A1 2026-10-04 21:46:02 +07:00
bflatastic 0af6734b70 Merge M3/M4 wave 0: neutral labels and brands gate, per-area paint modules, one engine loader/encoder (M3.7, M3.8, M4.10-M4.13)
# Conflicts:
#	crates/engine/src/cmd/file.rs
#	crates/mcp/src/headless.rs
#	crates/mcp/src/tools.rs
#	crates/ui-egui/src/io.rs
2026-10-04 21:46:01 +07:00
Brandon Thomas ead8f72208
Merge pull request #11 from storybored379/pr/svg-import-physical-units
SVG import: root sizes in mm/cm/in/pt open at their physical size
2026-10-04 10:16:45 -04:00
Brandon Thomas 3326b1aaac
Merge pull request #10 from storybored379/pr/svg-export-area-type-lines
SVG export: area type keeps its wrapped lines and alignment
2026-10-04 10:16:42 -04:00
Brandon Thomas 6b93a3dded
Merge pull request #9 from storybored379/pr/raster-export-size-limit
Raster export: refuse sizes the renderer can't produce instead of crashing
2026-10-04 10:16:39 -04:00
Brandon Thomas 4be1e009ec
Merge pull request #8 from storybored379/pr/svg-import-tspan-line-gap
SVG import: tspan line breaks follow the baseline gap (none on the same baseline, bounded far gaps)
2026-10-04 10:16:35 -04:00
Brandon Thomas a4696edbe8
Merge pull request #7 from storybored379/pr/invalid-dash-pattern
Stroke dashes: an invalid dash pattern draws a solid stroke instead of hanging the renderer
2026-10-04 10:16:32 -04:00
Brandon Thomas cbf5dc99bb
Merge pull request #6 from storybored379/pr/svg-import-text-on-path
SVG import: <textPath> comes back as type on a path
2026-10-04 10:16:28 -04:00
Brandon Thomas 8164d7c3fb
Merge pull request #5 from storybored379/pr/mcp-headless-open-pdf-ai
MCP: headless open_file reads .pdf and PDF-compatible .ai, as File ▸ Open does
2026-10-04 10:16:24 -04:00
Brandon Thomas 439f99e491 xtask: rustfmt version.rs (fmt gate was red on main)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 10:16:06 -04:00
Brandon Thomas a1430cfc1e
Merge pull request #12 from storytold/pr/license-standard
Licensing: MIT OR Apache-2.0 files, NOTICE, ArtCraft brand terms
2026-10-04 10:08:55 -04:00
Brandon Thomas ef5beece81 Licensing: MIT OR Apache-2.0 files, NOTICE, ArtCraft brand terms
Adds LICENSE-MIT, LICENSE-APACHE and docs/brand/LICENSE-brand.txt from the Crafting Apps
licensing standard. NOTICE follows the standard template (copyright, licence, brand carve-out)
and keeps the third-party list, now noting the Feather-derived Lucide icons (also MIT) and the
egui default fonts compiled into the app. ASSETS.md gives the docs/brand/ files their trademark
terms and marks the 21 Feather-derived Lucide icons. README uses the standard License and credits
section; AGENTS.md/CLAUDE.md point to the licence and brand files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 10:05:13 -04:00
bflatastic ad82e6e9a9 M3.27: Color Picker reads colours with the engine's color_value (one parser; CMYK and grey in percent as the paint commands take them) instead of its own copy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:24:22 +07:00
bflatastic c071dcd4d0 M3.28: proxies look through groups like the paint commands (a group shows its contents' paint, and contents that differ make a "?" proxy), the toolbar and panels share the engine's Session::proxy_paints, Magic Wand and Select Text by Font bump the revision so the cached "?" state follows them; double-click proxy test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:22:05 +07:00
bflatastic ff9af2628a M3.29: Live Paint Bucket and Appearance item colours feed the recent colours; the last-colour/gradient commands read "Apply Last Color" / "Apply Last Gradient" (no clash with Window > Gradient); `,` and `.` keyboard test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:20:19 +07:00
bflatastic 6d2dc7cbbc M3.28: Color panel behaviour — the mode follows the colour's own model (the last mode picked returns for colours in its model), Alt-clicking the spectrum, None/Black/White, swatches, recent colours or Color Guide chips paints the inactive proxy, Hide Options leaves the proxy and spectrum, RGB/HSB show the out-of-gamut warning (click to correct), Shift-clicking the spectrum cycles modes, Shift-dragging a slider moves the others in tandem, and a mixed selection draws "?" proxies (paint.proxies reports fillMixed/strokeMixed)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:01:58 +07:00
bflatastic f21161ce8c M3.27: Color Picker dialog — double-clicking a Fill/Stroke proxy (toolbar, Color, Swatches, Properties) or ui.colorPicker {stroke?, color?} opens a colour field with an H/S/B/R/G/B channel slider, HSB/RGB/Lab/CMYK fields and hex, Only Web Colors, out-of-gamut (corrected through color.convert) and out-of-web warnings, New/Original chips and a Color Swatches list; OK runs paint.setFill / paint.setStroke (CMYK in CMYK documents)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:01:58 +07:00
bflatastic 8a871d98a9 M3.29: proxy paint commands — paint.invert / paint.complement recolour the active proxy of each selected object keeping its colour model (the defaults when nothing is selected), paint.lastColor (,) and paint.lastGradient (.) re-apply the last solid colour or gradient (the toolbar chips draw and run them), swap and default work on type, and recent colours live in the Session, fed by every paint command (MCP, eyedropper, live previews on commit) and listed by paint.recent
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:01:58 +07:00
bflatastic 2ed962e7d0 M3.16: the eyedropper samples type gradients in text space
Shift-sampling a type object's run gradient projected the document point onto a vector kept in
text space, so placed gradients on moved or turned type sampled the wrong colour. The eyedropper
now reads the paint through Node::proxy_paint and samples in the paint's own space and box (text
space for runs, the stroke-inflated box for strokes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:59:03 +07:00
bflatastic cca1d11032 M3.14: gradient swatches and new art fit a placed gradient to themselves
Lossless gradient params carried a saved gradient's vector (document coordinates of the art it
came from) into swatch applications and the default paint, so a swatch applied elsewhere, or the
next shape drawn, got a gradient placed off the object. Applying a gradient swatch now fits it to
each object (keeping its aspect, on type in text space), and the default for new art keeps all
but the placement. Saving a swatch stays lossless.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:58:05 +07:00
bflatastic 6ebffb9156 M3.24: Clear Appearance and Reduce to Basic add no fill or stroke rows to a group
A group's own stack now stays empty after Clear (and keeps only the rows it had after Reduce to
Basic), so the proxies keep showing the defaults for it. The Layers target-dot helper no longer
takes over the thumbnail function's doc comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:52:46 +07:00
bflatastic d3dc4a2af3 M3.17: the stop popover survives its opening double-click, and the selected stop belongs to its gradient
The double-click that opens the popover lands outside it in the same frame, so the popover
closed as soon as it opened; only a later click elsewhere closes it now. The selected stop
remembers the document, first selected object and proxy it was picked on (Session::selected_stop),
so selecting other art or toggling Fill/Stroke no longer lets Delete or the arrows edit a stop
on a different gradient.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:52:28 +07:00
bflatastic 1b3e7110a3 M3.21: active-row edits of the other kind stay on the painted leaves, item transparency is one undo step
- A fill row no longer turns stroke edits (stroke.set, setAdvanced, paint.setStroke, gradients) into
  a new stroke on a selected group's own stack: an active row only stands for edits of its kind.
- Removing, duplicating or moving items of other objects (`ids`) no longer re-points the active row.
- transparency.set with an item touches the item only for opacity/blend (isolate or knockout alone
  is one undo step) and rejects unknown blend modes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:50:46 +07:00
bflatastic 8910f8fd1e M3.12: the dialog Cancel button reuses dialogs::cancel; the Swatches panel no longer clones its selection every frame
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:45:50 +07:00
bflatastic d1d133bf09 M3.13: swatch.newGroup falls back to "Color Group" for a blank name, never gives a swatch its own group's name, and takes mesh point colours from the artwork
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:45:49 +07:00
bflatastic e9e4b94ed0 M3.10: default swatch names never read "-0" (components are clamped first); one numbering helper for free and new swatch names
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:45:47 +07:00
bflatastic 984eb7f10c M3.26: effects crate docs list the shared clip_outline helper
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:45:04 +07:00
bflatastic 745d50f76e M3.25: appearance.setItem takes ids without a selection; undo/redo through mask editing tested
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:45:04 +07:00
bflatastic 014ee0382f M3.20: visual bounds cover arrowheads so overhanging heads are not culled; one arrowhead-weight helper
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:40:41 +07:00
bflatastic 4283820a30 M3.19: dash patterns too fine to advance draw solid instead of hanging on zero-length paths
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:40:39 +07:00
bflatastic 3786cfaf36 M3.17: interactive gradient annotator — drag the start handle or the bar to move the gradient, the end handle to change length and angle, just past the end to rotate (Shift snaps to 45°); a bar click adds a stop, stops drag along the bar, off it to delete (never below two), Alt-drag copies, diamonds move midpoints; a click inside selected art applies the gradient from that point; double-clicking a stop opens a popover (Color/Swatches, Opacity, Location); the selected stop lives in the session (gradient.selectStop), shared by the tool, the Gradient and Color panels and agents, and takes Delete/Backspace and ←/→ ahead of their shortcuts (Tool::claims_key, also headless); stop chips draw as Overlay::Swatch with generated add/remove-stop cursors; the stop math moves into the color crate
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:39:36 +07:00
bflatastic 3692b9d233 M3.24: basic appearance, Layers target dots, Mixed Appearances and Clear resets opacity
An appearance is basic with at most one fill and one stroke, none hidden or
with its own opacity, blend mode or effects, and no object effects; Reduce
to Basic keeps the topmost visible fill and stroke. The Layers panel fills
an object's target circle for any non-default transparency (blend mode,
isolation, knockout or an opacity mask: Node::has_default_transparency).
A multi-selection whose objects differ shows "Mixed Appearances" with no
rows. The Appearance panel's object row and the Control bar name the
selection from one source, and type objects are "Type". Expand Appearance
is only in the Object menu. Clear Appearance also resets the object's
opacity and blend mode. Tests cover addFill/addStroke, setItem/removeItem,
clear, reduceToBasic and graphicStyle.apply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:30:03 +07:00
bflatastic 7da0bfb1c6 M3.13: New Swatch and New Color Group dialogs — New Swatch reuses the Swatch Options fields prefilled from the active colour (its default name follows the colour), goes into the selected colour group, Alt-click skips it and Cmd/Ctrl makes a spot colour; New Color Group makes a group from the selected swatches or the selected artwork's colours, optionally as global swatches the art links to and with swatches for tints
swatch.new takes mode and group; swatch.newGroup takes fromArtwork, toGlobal and includeTints and reports the group's swatches and the paints it linked. Adds a shared radio widget and the ui.newSwatch / ui.newColorGroup openers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:26:57 +07:00
bflatastic 4f685be57a M3.26: clipping sets with any clip shape
Clip groups clip by compound paths (with their holes), even-odd paths, text
outlines and groups (the union of their members) on screen, in raster
export, in SVG and in PDF alike, through one shared region:
Node::clip_outline (the model walk) and effects::clip_outline (text
outlined, several shapes united), cached per clipping path in the
renderer. Nothing to clip by hides the clipped art everywhere, and clicks
hit a clip group only inside its clipping region. Make Clipping Mask takes
a compound path or text object on top (it loses its paint) and Release
gives it back unchanged in kind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:23:57 +07:00
bflatastic b6b87ee9b6 M3.23: per-item Opacity popups and one grouped blend-mode widget
Clicking an Opacity row in the Appearance panel (a fill's or stroke's, or
the object's) opens a popup with the same blend-mode dropdown, opacity
field and slider as the Transparency panel (widgets::opacity_blend), and
edits that item through transparency.set. The blend-mode dropdown draws a
separator between the BlendMode::group() groups, also for the blend-mode
parameters of effect dialogs and inline effect editors. Fills and strokes
of type objects composite with their own opacity and blend mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:21:28 +07:00
bflatastic 5ae7bfb8ca M3.20: arrowheads: hollow outlines, tip/extend alignment, one opacity for line and head
Hollow heads draw as rings (the open arrow as a chevron) and closed paths get
no heads. The stroke stops under each head, so it never shows through a hollow
head or past the tip; stroke.set {arrowAlign: "extend"|"tip"} chooses whether
the tip extends past the end point (default) or sits on it with the stroke
shortened. Line and heads share one paint box (a gradient runs on into the
head) and take the stroke and object opacity once, as one layer on the canvas
and one group in PDF. StrokeLayer.arrow_align is a new defaulted field, so
older files load unchanged. The Stroke panel's Align buttons get two generated
icons and are disabled when the stroke has no head.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:20:40 +07:00
bflatastic 23f19a861b M3.19: dotted lines: zero-length dashes draw discs or squares
The shared stroke geometry now has its own arc-length dash generator: a dash
of length 0 becomes a dot that a round cap paints as a disc and a projecting
cap as a square turned along the path (a butt cap paints nothing). Dashes
restart per subpath, join across the start of closed subpaths, and a pattern
too fine for the path draws solid. The canvas and raster export use it through
line_outline; the stroke.set params doc says how to get dots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:18:13 +07:00
bflatastic 09d7aaa7f4 M3.18: shared stroke-geometry module for arrowheads, width profiles and the profile preset catalogue
Arrowheads, width-profile outlines and dashed line outlines now come from
vectorcraft_effects::stroke (stroke_pieces, line_outline, width_outline), used by
the canvas and PDF export alike; the renderer caches profile outlines too. Width
profiles are a doc-level catalogue (WidthProfile::PRESETS, preset, preset_id,
id_of) shared by stroke.set and the Stroke panel; stroke.set rejects unknown
profile ids and its params doc lists the arrowhead names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:16:17 +07:00
bflatastic aa1b592935 M3.16: the Gradient tool follows the active proxy and type objects — the tool and annotator edit the fill or the stroke by the focused proxy (ToolContext.fill_active); paint.setGradientGeom takes stroke? (default: the active proxy) and index? (one appearance item), sets type objects' vectors on their runs in text space and keeps the aspect the document shows; paint.setFill/setStroke vectors on type move into text space; aspect edits place run gradients on the layout bounds; run strokes (and type appearance strokes) fit the stroke-inflated box on screen and in PDF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:16:12 +07:00
bflatastic 3082be6ecf M3.12: delete swatches and colour groups — Shift/Cmd-click selects several swatches and groups in the panel, Delete asks first (Alt-click skips), swatch.delete {names} removes them in one undo step and art using a deleted global swatch keeps its colour, unlinked
Adds a shared confirmation dialog (`confirm`) that runs a command on OK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:15:46 +07:00
bflatastic 543d09985d M3.22: effects apply to the active fill or stroke and item effect rows are editable
effect.apply, effect.remove, effect.setParams and the new effect.duplicate
take item (omitted: the Appearance panel's active item, else the object;
null: the object's own effects), so the fx button, the Effect menu, Apply
Last Effect and the effect dialogs (effect.dialog {item}) put the effect on
the selected fill or stroke. effect.list reports each object's item effects
and the active item. appearance.addEffect is an alias of effect.apply.
In the Appearance panel, item effect rows sit under their fill or stroke
with working eyes and inline editors, and can be selected for Duplicate
and Delete; a selected effect row is remembered per object.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:15:40 +07:00
bflatastic b117566fc2 M3.25: opacity-mask editing and transparency command reach
While a mask is edited, the Transparency panel and its commands act on the
masked object (Release leaves editing first). Mask commands and
transparency.set take ids and work without a selection; Make Opacity Mask
with one object adds an empty mask and enters editing. Opacity is 0..100 in
every command. transparency.info reports the panel's values with null for
mixed ones, shown blank. Saves and exports never include the editing layer
(Document::without_edit_modes; mask_edit is not serialized).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:10:21 +07:00
storybored379 6b159467a2 SVG import: tspan line breaks follow the baseline gap (none on the same baseline, bounded far gaps)
Text import turns the gap between an absolutely positioned <tspan y> and the previous line into
that many line breaks, with two problems:

- At least one break was added even when the tspan sits on the current baseline. Styled or
  kerned runs written with x and y on every tspan (as Illustrator writes them) were split into one
  line per run: "Hello <tspan y=same>world</tspan>" came back as "Hello \nworld".
- The count had no upper bound. A tspan with y="1e15" (or any y far below its text) asked for
  ~10^14 '\n' characters, and opening the file aborted the app, the MCP server or
  `vectorcraft-cli` with "memory allocation failed" after eating all memory.

A tspan less than half a line from the current baseline now adds no break, the gap is capped at
10 000 line breaks, and a non-finite gap counts as one; other gaps are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 01:32:48 -07:00