Commit Graph

107 Commits

Author SHA1 Message Date
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
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
storybored379 152228d76d Raster export: refuse sizes the renderer can't produce instead of crashing
PNG/JPEG/WebP export renders the artboard at the requested scale with no size check. The CPU
rasteriser addresses at most 65535 pixels a side (and panics at that edge), so a large artboard at
a print resolution, e.g. the maximum 16383 pt artboard at 300 ppi (~68 000 px), or a screenshot at
scale 16, panicked inside vello_common: the desktop app or the MCP server exited and unsaved work
was lost.

`vectorcraft_render::raster_size` checks the pixel size first (at most 32 768 px a side and 268
megapixels, like Rasterize already refuses oversized images) and the export paths return an error
that names the size: `document.export` / `exportSelection` / `serialize`, the MCP `export` and
`screenshot` tools, File ▸ Export and the control protocol's `ui.render`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 01:25:18 -07:00
storybored379 c20b7deec5 Stroke dashes: an invalid dash pattern draws a solid stroke instead of hanging the renderer
A dash pattern with a negative value (for example [-5, 3], from `stroke.set` or a PDF `d`
operator) was handed to the dasher whenever any value was positive. When the values sum to zero
or less the dasher never advances, so rendering the document hung forever (canvas, screenshot,
PNG/JPEG export, `vectorcraft-cli convert`).

PDF (32000-1 §8.4.3.6) and SVG (`stroke-dasharray`) both define such a pattern as invalid and the
stroke as solid. `Dash::is_dashed` now says whether a pattern draws dashes (finite, non-negative,
not all zero), and the renderer, the width-profile outline, the SVG and PDF exporters and the PDF
importer use it, so an invalid pattern is drawn, written and read back as a solid stroke everywhere
(the PDF exporter used to clamp negatives to 0, writing zero-length dashes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 01:25:17 -07:00
storybored379 4ac7095601 SVG import: <textPath> comes back as type on a path
VectorCraft exports type on a path as <text><textPath href="#text-path-N"
startOffset="…%"> with the path in <defs>, but the XML text fallback read
every <text> as point type at the text element's x/y. Text on a path
therefore re-imported as a straight line at (0, 0), above the artboard
and mostly out of view, and lost its path.

Resolve the textPath's href (SVG 2 href or xlink:href) to the <path>,
bake the text's user-space transform (and the path's own transform) into
it, and read startOffset (a percentage, or a length along the path) into
TextKind::OnPath.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 01:17:34 -07:00
storybored379 1fd9b79a9d MCP: headless open_file reads .pdf and PDF-compatible .ai, as File ▸ Open does
Headless `open_file` (and `file.open` through run_command) had its own
loader that stopped at .vectorcraft and .svg, so an agent could not open
a PDF or an .ai file without the desktop app, although the engine and
`vectorcraft-cli` already import them through vectorcraft-pdf.

The headless loader now imports .pdf, .ai and any file starting with
%PDF through vectorcraft_pdf::import_with_report (default options, as
File ▸ Open uses), and returns the import warnings like the SVG path.
The open_file tool description lists the new types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 01:17:34 -07:00
BFlat 604c20ed90
Merge pull request #3 from storytold/revert-readme-habits
Docs: revert the README habits sentence
2026-10-04 01:16:35 +07:00
bflatastic e08ced735e Docs: drop the README's list of specific Illustrator habits (too detailed for the overview); the control-protocol note on the save prompt stays 2026-10-04 01:16:12 +07:00
BFlat b538b0a84a
Merge pull request #2 from storytold/docs-workflow-updates
Docs: workflow fixes from #1 (README, control protocol)
2026-10-04 00:57:41 +07:00
bflatastic 62681d2b80 Docs: README names the Illustrator habits that now work (corner widget dragging, Alt-click pivot on an anchor, middle-mouse pan, save prompt before closing); control protocol: file.close / closeAll / app.quit open a saveChanges dialog per modified document and how agents answer it 2026-10-04 00:55:55 +07:00
Brandon Thomas 4ddc422e51 Release 0.1.1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 09:55:30 -04:00
Brandon Thomas f188863b10 README: tagline names the Adobe app it reimplements; standard Adobe trademark and non-affiliation notice
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 12:24:12 -04:00
Brandon Thomas e608d5a26b README: Crafting Apps table in five columns (icon, app, purpose, GitHub, Website)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 12:19:01 -04:00
Brandon Thomas 065d095597 README: drop the old DrawCraft name; VectorCraft links to /apps/vectorcraft
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 12:18:12 -04:00
Brandon Thomas 4af5e80a41 README: app icons in the Crafting Apps table
Drop the app icon from the top of the README, matching PhotoCraft, and
show each app's icon next to its name in the Crafting Apps table in place
of the coloured name badges. The table is now identical across all seven
apps apart from the "you are here" row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 12:17:13 -04:00
Brandon Thomas 2d0b055c7e Make ported packaging scripts executable (fixes exit 126)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-02 12:03:30 -04:00
BFlat 1531cb0d11
Merge pull request #1 from storytold/live-corners-pan-close-prompt
Live Corners dragging, transform pivot snapping, middle-mouse pan, save prompt on close
2026-10-02 23:00:22 +07:00
bflatastic b8701977d4 M4.9: Save / Don't Save / Cancel before closing modified documents — File → Close, Close All, a tab's ×, Quit and the window's close button ask once per modified document (shown first); Cancel stops the whole close/quit, a cancelled Save As keeps the document open; closing keeps per-document views aligned; agents answer the saveChanges dialog with ui.dialog.confirm (discard: true for Don't Save) 2026-10-02 22:42:50 +07:00
bflatastic 3f1f3383d3 M11.6: middle-button drag pans the view with any tool (no tool events, grabbing cursor while panning; a left press during the pan is ignored); headless canvas test 2026-10-02 22:42:50 +07:00
bflatastic cf775072be M1.10: Rotate/Reflect/Scale/Shear reference point snaps — a click or Alt-click within 5 px of an anchor or object centre (of the selection or the object under the pointer) pivots exactly there, so Alt-clicking a corner flips/rotates from that corner; hovering shows the anchor/center label first; follows View → Snap to Point or Smart Guides (snap_to_point now reaches the tools) 2026-10-02 22:42:50 +07:00
bflatastic 8276d0a303 M2.10: Live Corners — drag a live rectangle's corner widget (Selection or Direct Selection) to round or sharpen all four corners as one undo step (object.setLiveShape preview, radius readout, follows rotated/scaled shapes, square to fully round); widgets drawn from the same geometry the tools hit-test, hidden on tiny shapes and with View → Hide Corner Widget; corner-radius cursor 2026-10-02 22:42:49 +07:00
Brandon Thomas 0e24110259 Fix macOS Info.plist: remove document-types block cleanly (route B)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-02 11:36:23 -04:00
Brandon Thomas da8a14dd04 Signed release pipeline (macOS/Windows/Linux/Web); README community note
Ports photocraft's release workflow + packaging (signing, notarization,
MSI/DMG/deb/rpm/AppImage/web), adds `cargo xtask version`. File-type
associations omitted for now (route B); app keeps its own .desktop. Fresh
WiX UpgradeCode. README 'about' note updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-02 11:35:29 -04:00
Brandon Thomas 7b37dd1da5 M7.6: tab stops and the Tabs panel — left/center/right/decimal stops (align-on character), default stops every ½ inch, text.tabs.set/get/clear, ruler (click adds, drag moves, drag off deletes), Repeat Tab / Delete Tab / Clear All Tabs; control characters no longer draw .notdef boxes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 10:13:24 -04:00
Brandon Thomas 437320509d app icon: regal engraved dragon (owner's ArtCraft drawing), Dock/taskbar/launcher wiring, palette docs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 09:45:30 -04:00
Brandon Thomas dabd179d5a M7.4: Text Wrap flows on both sides of an object (lines split into every free span, left to right, sharing the baseline; exact interval intersection across the line band)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 09:28:04 -04:00
Brandon Thomas fa2d901a7e M2.9: Shaper tool — rough rectangles, ellipses, triangles/polygons/diamonds and lines become clean live shapes (geom::recognize), squares/circles snap; a scribble deletes the objects it crosses
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 09:10:44 -04:00
Brandon Thomas 55e24d6622 M11.4: text-thread connectors on selected threaded frames + View → Hide/Show Text Threads, Hide/Show Gradient Annotator, Type → Show Hidden Characters (spaces, ¶, #), Effect → Last Effect… (reopens the last effect's dialog)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 08:51:33 -04:00
Brandon Thomas dcc5a006a2 M3.6: opacity-mask editing mode — click the mask thumbnail to edit the mask art on a temporary isolated layer with any tool; the mask updates live after every edit; the object thumbnail (or transparency.stopEditingOpacityMask) leaves the mode
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 08:40:18 -04:00
Brandon Thomas 5026dad446 M11.5: View → New View… / Edit Views… (saved views in the document, up to 25, listed at the bottom of the View menu; view.saved.* commands)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 08:16:36 -04:00
Brandon Thomas 8e735f1de9 M11.3: View → Snap to Pixel (drawing points and moved selections land on whole pixels)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 08:16:36 -04:00
Brandon Thomas 16a73dc02a M12.7: Object → Create Object Mosaic… (trace::mosaic tile averages; columns/rows, new size, spacing, gray, delete raster; follows the image transform)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 08:16:36 -04:00
Brandon Thomas 5a36fa1a9b M6.1: a panic inside the curve sweep (rare near-degenerate input) becomes PathOpsError::Degenerate instead of crashing (found by the randomized export test)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 08:16:35 -04:00
Brandon Thomas bfa46e6cb4 M9.4: raster effects in PDF export — shadows/outer glows as images under the untouched vector object, inner glow/feather/blur as images, at the document's resolution; Effect → Document Raster Effects Settings… (document.rasterEffectsSettings: screen/medium/high/ppi); engine::export_pdf used by app, CLI and MCP
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 07:58:10 -04:00
Brandon Thomas 9f20c36f33 Roadmap: parity estimate — ~65% feature parity (weighted over 22 areas), ~50% including fidelity and hardening; ~330–500 h of Opus 5.5 to feature parity and ~440–670 h to full parity for one agent (~85–140 h / ~115–190 h with 4–6 agents); inventories and milestone estimates reconciled
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 07:51:36 -04:00
Brandon Thomas 9b0fe0ca5d M1.9: agent integrations — MCP tools add_text, apply_effect, pathfinder, transform, create_graph, text_wrap, export {selection, outlineText}; CLI convert (IN → OUT, effects kept) and info; SVG export Convert to Outlines (text as glyph paths); TextObject pathEffect key camelCase
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 07:50:20 -04:00
Brandon Thomas 1d493c7f06 M12.6: Graphs — the nine graph tools (Column, Stacked Column, Bar, Stacked Bar, Line, Area, Scatter, Pie, Radar), Object → Graph → Type… and Data… (CSV), series groups with legend, regenerate in place keeping moves/scales
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 00:16:23 -04:00
Brandon Thomas 13d0aef57f M1.5: commands that default to the current layer validate the remembered id (reused after undo it could name a compound path: Send to Current Layer moved art into it, Delete Layer could delete it)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 00:16:23 -04:00
Brandon Thomas 1e7b4308ec M0.2: hit-test distance exact on cusp-like cubics (nearest-point accuracy 1e-9; proptest regression)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 00:16:23 -04:00
Brandon Thomas c878ac994c M11.4: View → Hide/Show Corner Widget; Type → Recent Fonts (last 10 applied fonts, persisted)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 23:46:20 -04:00
Brandon Thomas 69be79bbf1 M4.4: File → Export Selection… (selected art cropped to its bounds as PNG/JPG/WebP/SVG/PDF), Save as Template… and New from Template… (templates open as untitled documents)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 23:46:20 -04:00
Brandon Thomas 3b48776607 M5.2: render perf — drop shadows/outer glows from a cached CPU-blurred raster composited per draw (600 shadows: ~300–1500 ms → 17–70 ms/frame); object blend modes on single plain fills applied per draw instead of a full-viewport layer; effect catalogue indexed once (lookups 300× faster)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 23:31:22 -04:00
Brandon Thomas 4745f39c6c M7.4: Object → Text Wrap (Make, Release, Text Wrap Options: offset, invert): area type flows around wrap objects above it in the same layer, re-resolved after every edit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 22:48:49 -04:00