Commit Graph

39 Commits

Author SHA1 Message Date
bflatastic 9920156bb6 Fix #122: colour adjustment live effects (Effect > Color Adjustments)
The issue asked for non-destructive colour adjustments in the Effect menu
and the Appearance panel that work on vector paints, live type and
embedded images. Only the destructive Edit Colors commands existed, and
the live-effect pipeline only knew geometry and raster effects.

Effect > Color Adjustments adds six effects (adjust.*). They recolour,
in stack order, everything an object paints with: fills and strokes
(gradient stops too), type, gradient meshes, embedded images and a
group's members, each colour keeping its model. The Edit Colors walk over
an object's colours moved to vectorcraft_doc::recolor so the commands
and the live effects share it. The renderer draws adjusted art through
its object-effect path (recoloured images cached within a memory
budget), exports bake the adjusted colours (images as recoloured
copies), and Expand Appearance makes them permanent. The effect dialog
shows sliders, a channel menu and a draggable Curves graph, all previewed
live as one undo step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 00:42:26 +07:00
bflatastic a844503e4c Fix #122: Mirror & Cut, Line Cut and Rectangle Cut tools
The issue asked for one-step symmetric shapes, splitting all selected art
along a line and cropping art to a rectangle as real geometry. Only the
freehand Knife and the Scissors existed, and neither works on compound
paths as one shape.

New commands path.mirrorCut, path.lineCut and path.rectCut cut the
selected paths and compound paths (inside groups too) with pathops
booleans against a half-plane or rectangle, and split open paths with
the Knife/Path Eraser helpers. Mirror & Cut reflects the kept half and
unites it with itself (open halves are joined on the axis). The draw2
piece helpers now rebuild compound paths too. Three tools (Eraser group,
original icons) preview the cut live while dragging and commit it as one
undo step; Mirror & Cut's axis and kept side are tool options shown in
the Control bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 00:42:26 +07:00
bflatastic 96604acffb Fix #39: rotated objects keep their angle and a rotated bounding box
Rotating an object baked the rotation into its geometry and kept nothing
else, so the bounding box, the handles and the Transform/Properties
panels fell back to the page-aligned box (the Rotate field went back to 0).

Root cause: nodes carried no record of their own axes. Each node now
keeps `bbox_angle` (append-only, written only when non-zero), which every
transform turns with the object (mirroring transforms keep the nearer of
the two possible boxes). The geometry is still baked. The selection's box
(`Document::oriented_bounds`) stands at the angle the selected objects
share. The Selection tool hit-tests and scales its handles in that frame,
and the canvas draws it rotated. `object.setBounds` measures W/H and the
reference point along it. `object.rotate {absolute}` turns the selection
to an angle, which the panels' Rotate field now shows and sets. Object >
Transform > Reset Bounding Box (previously a no-op) clears the angle in
one undo step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 23:49:36 +07:00
bflatastic 258337cf7c M14.3: the Home button shows the Home screen over open documents
It used to open the New Document dialog. Now it runs the new app.home UI command:
the Home screen replaces the canvas while the documents stay open as tabs;
choosing a tab, or a document opening, closing or becoming active, returns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:43:48 +07:00
bflatastic d4c4361b4a M14.1: long menus scroll inside the window and use all the height they have
Menu bar menus, their submenus, panel menus, the effects menu groups and library
submenus are as tall as their items down to the window's bottom edge, and scroll
only past that (widgets::menu_scroll), instead of running off screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:43:48 +07:00
bflatastic 79581c7ff5 M4.87: PDF 1.3 compatibility: transparency flattened with the chosen preset
compatibility "1.3" writes a %PDF-1.3 file (its XMP metadata says 1.3
too) without transparency: a copy of the document is flattened first
with flattenerPreset (stored with PDF presets; empty is High Resolution)
and the flattener options over it, see-through image pixels counting as
transparency and rasterized areas clipped to their regions so no soft
mask is needed. Page groups are left out and the writer refuses a file
that would still have transparency. PDF/X-1a and PDF/X-3 share this
path (their version is now PDF 1.3; 1.4 is still accepted and written
as 1.3), and with it the preset, the header and metadata code and the
transparency check. Passwords at PDF 1.3 encrypt with 40-bit RC4
(revision 2). The Save PDF dialog lists PDF 1.3 and picks the flattener
preset under Advanced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 18:05:36 +07:00
bflatastic 8961824876 M4.86: PDF page thumbnails and fast web view (linearised files)
Embed Page Thumbnails gives every page a /Thumb image: the page drawn on
white, 106 px on its long side, without the layers the page leaves out
(the engine draws them; vectorcraft_pdf::page_areas says what each page
shows; PDF/X files get grey ones). Optimize for Fast Web View writes a
linearised file: the objects are put in linearised order and numbering,
encrypted when a password asks (the encryption dictionary goes with the
catalog, PDF layers' groups too), then laid out with the linearization
dictionary, both cross-reference tables and the page offset and shared
object hint tables (the hint stream encrypted like any other). Their
"not applied yet" warnings are gone. Reading the objects back uses the
lexer of encrypt.rs (syntax.rs adds what rewriting needs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 18:05:36 +07:00
bflatastic a09cbe58c8 M4.83: overprinting fills and strokes overprint in PDF
Advanced > Overprint: Preserve (the default; document.exportPdf
advanced.overprint) writes each overprinting fill and stroke (an object's
own, a character's, a type object's) with a graphics state of /OP true
/op true /OPM 1 (/OPM 0 in PDF/A); Discard writes none. White ones knock out
when Document Setup's Discard White Overprint is on, as in print. Mask art
never overprints. File > Print's composite PDF honours Print > Advanced >
Overprints: Preserve the same way (separations keep multiplying plates).

Each overprinting fill or stroke is drawn as a form marked to overprint
(crates/pdf/src/forms.rs); after writing, its content starts by setting the
overprinting graphics state, and the PDF/X self-check runs on the result.
The engine's "overprint is not written to PDF yet" warning and print's
"overprints print as knockouts in composite output" warning are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:39:28 +07:00
bflatastic 0e4d3f6871 M4.82: PDF export writes top-level layers as PDF layers
Create PDF layers from top-level layers (document.exportPdf createLayers, the
Save PDF dialog's General option) now writes an optional content group per
top-level layer (template layers are left out): named as the layer, off when
the layer is hidden, /PrintState /OFF when its Print option is off, locked
when it is locked, listed top first, with a print auto-state (not under a
standard). The file reopens with those layers.

The PDF writer has no optional content, so each layer is drawn as a form of
its own (no transparency group, so it draws as in place) starting with a mark;
after writing, the uses of the layers' forms are wrapped in /OC ... BDC/EMC
and the catalog gets /OCProperties (crates/pdf/src/forms.rs, through the
shared patch writer and the PDF syntax reader of encrypt.rs). PDF 1.4 and a
knockout page group write plain page content with a warning; the dialog greys
the option at 1.4. The "not written yet" warning is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:39:28 +07:00
bflatastic 1f922fcbbc M4.81: Print advanced options: overprints, flattener, printer profile, bitmap
The pdf crate's PrintSettings gains advanced {printAsBitmap,
overprints: preserve|discard|simulate, flattenerPreset} and
color.profile, all defaulting so saved print_setup values still load.
Composite output discards overprints (no /OP) or simulates them as
Overprint Preview draws them; separations keep them. A printer profile
converts composite colours with the chosen intent (a CMYK one writes
device CMYK) and separations separate with a CMYK one. The engine
flattens transparency with the preset, or renders each printed region
as one image for Print as Bitmap, before PDF or PostScript layout.
The Print dialog's Advanced and Color Management sections show them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:27:00 +07:00
bflatastic 1b9b37454b M4.80: Print Tiling tool and View > Show Print Tiling
View > Show Print Tiling (view.printTiling) draws the pages of the
document's print settings on the canvas, dashed and numbered, from
print.preview's own layout (print.tiling), so the canvas and the
printed job agree. The Print Tiling tool replaces the no-op tool: a
drag places the first page's imageable corner (print.tiling.set,
saved as print_setup.tileOrigin, one undo step); a double click on
the canvas or the tool button resets it. Tiles start at the origin
and extend to cover the art; the Print dialog shows the tool's
placement with a Reset button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:26:59 +07:00
bflatastic a825aed763 M4.84: PDF/X-1a, PDF/X-3 and PDF/X-4 files written as their standards say
document.exportPdf {standard: pdfX1a|pdfX3|pdfX4} and the PDF/X presets now
write conforming files instead of being refused:

- every PDF/X file gets a /GTS_PDFX output intent (by default the CMYK
  profile in effect, embedded), TrimBox, Trapped, GTS_PDFXVersion (and
  GTS_PDFXConformance for X-1a), a title and dates; editing data,
  passwords and, in X-1a/X-3, PDF layers are refused
- PDF/X-1a converts every colour and image to a CMYK destination,
  untagged, with CMYK spot alternates; X-3 and X-4 tag colours with ICC
  profiles
- X-1a and X-3 are written as PDF 1.3 and their transparency is flattened
  first (High Resolution preset; images with see-through pixels count,
  rasters stay opaque); X-4 keeps transparency, is PDF 1.6 at most and
  names the standard in its XMP metadata
- the written file is checked against its standard (soft masks,
  transparency groups, opacity, blend modes, RGB in X-1a, fonts not
  embedded) and refused rather than mislabelled
- choosing a standard sets the latest compatibility it allows and turns
  off what it forbids (engine and Save PDF dialog)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:19:11 +07:00
Brandon Thomas 2b48392c36 Roadmap: honest assessment, the gap list and where we're going
- ROADMAP: a new "Honest assessment (2026-10-05)" section with:
  - scores by dimension (breadth, depth, large missing subsystems, interaction
    fidelity, look and feel, file interop, bundled content, performance,
    robustness, platforms, automation) and how far to trust the self-graded scores;
  - the prioritized gap list with one-agent hour sizes;
  - the direction (next, then, alongside, 1.0).
- ROADMAP: the parity rows for files, export, print, links and UI chrome are
  re-derived after M4 (feature parity ~74% on the rubric, 68–74% honest range;
  ~230–350 h to feature parity, ~335–520 h to full parity, one agent), the M4 and
  M11 milestone rows and the inventories are updated, and "Shipped so far" lists M4
  and the robustness work.
- README Status: where we are, what's missing, where we're going.
- AGENTS.md / CLAUDE.md: sessions start from the gap list; landing a task updates
  the assessment, the parity row and the README status in the same PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 06:11:03 -04:00
bflatastic b9fa2d27fd Roadmap: M3 complete (M3.7–M3.98)
M3 is done: the M3 row, the shipped list (swatches, colour, gradients, strokes,
appearance, masks, transparency, graphic styles, and the title bar) and the
colour, stroke and appearance parity rows cover everything that landed through
#62, with the few known gaps named. M6 notes the Boolean precision fix and M14
the custom title bar and content-sized dialogs. The totals are summed from the
rows again (they had drifted), and the method note records M3's measured pace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 05:57:21 +07:00
bflatastic edeb1cb548 Roadmap: M3 stage 2 (M3.30–M3.39, M3.42–M3.48)
The M3 row, the shipped list and the colour, stroke and appearance parity rows
cover Swatches panel depth, Gradient panel depth and rebased gradients, stroke
export parity and Outline Stroke fidelity, corner-fitted dashes, appearance
editing depth and effects on every object kind, knockout and page groups, and
graphic style links. Remaining estimates are recalibrated on the measured
throughput of the first two M3 waves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:54:21 +07:00
bflatastic cb68229bda Docs: name the reference app again in ROADMAP and docs/mcp.md
The ROADMAP and the MCP docs say Illustrator/Adobe again where they compare
VectorCraft with it (the rewording in #15 and the create_graph row). The
vendor-name gate keeps checking what users and agents read in the app (Rust
string literals, Cargo descriptions, packaging) and the non-Markdown files
under docs/, and no longer scans Markdown pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:19:45 +07:00
bflatastic b1d41d156a Roadmap and README: M3.7–M3.29 (stage 1 of M3)
ROADMAP: the M3 row lists what landed (swatches, colour picker and panel,
proxy commands, gradient transforms and annotator, stroke geometry, dotted
lines, arrowheads, appearance targeting, mask reach, clipping by any shape)
and what is pending; a "Paint and appearance" block in Shipped so far; the
colour, stroke and appearance parity rows and the totals re-derived from the
detailed M3 plan, calibrated on its first wave; the reference app is no longer
named. README: the open/export formats from the shared loader and the vendor
name step of cargo xtask ci.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:06:52 +07:00
bflatastic 8f9d6ef2bd Roadmap: M3/M4 wave 0 (one loader/encoder for every frontend, MCP export options, per-area paint modules, brands gate)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 12:02:52 +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 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 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 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 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 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 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
Brandon Thomas 09fc2eedd9 M4.3: live effects survive SVG, PDF and clipboard export (vectorcraft_effects::bake_document evaluates object, per-fill/stroke and Pathfinder effects on a copy; SVG raster effects become filters: drop shadow, outer/inner glow, Gaussian blur, feather)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 21:39:20 -04:00
Brandon Thomas 4878f1c5dd Rename DrawCraft → VectorCraft: crates (vectorcraft-*), apps, binaries, types, env vars, docs, examples (.vectorcraft); old .drawcraft files and preferences still load. Fix: text bounds exact after opening a file; selection no longer marks a document modified (dirty = content differs from the saved document). Screenshots and renders regenerated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 14:30:09 -04:00
Brandon Thomas d9df5b0135 M7.3/M7.7: threaded text (Type → Threaded Text: Create/Release Selection/Remove Threading; story re-flows after any edit touching its frames, deleted frames' text flows on), Fit Headline; roadmap
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 11:00:17 -04:00
Brandon Thomas 66855f309d M4.1: .drawcraft format v2 — default-valued fields omitted, anchors as {p: [x, y], in?, out?, kind?}; large documents saved compact. 50k paths: 56 → 35 MB, open 722 → 244 ms; v1 files still load
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 08:39:58 -04:00
Brandon Thomas 318a55350a M4.8: system clipboard — copy/cut publish SVG markup, paste adopts SVG from other apps (centred in view); Copy/Cut/Paste events handled off macOS; Place bypasses the clipboard hook
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 08:27:54 -04:00
Brandon Thomas f855da4fb8 M5: raster effects render on the multithreaded pipeline (each filter layer offscreen, composited with its blend/opacity; tested equal to single-threaded); fix inner glow blend isolated by its clip layer
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 00:41:55 -04:00
Brandon Thomas abe2ed7080 M1.9: headless CLI/MCP export PDF/JPG/WebP; app JPEG/WebP export; ui.screenshot errors instead of hanging without a presented frame; docs (roadmap re-estimate, agent guide: bench, locked screens, disk)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 00:30:38 -04:00
Brandon Thomas acb2566d89 Distortion tools (Width, Liquify, Puppet Warp, Perspective Grid), Patterns + Repeat, colour management (CMS, proofing, separations), Preferences/Shortcuts/Workspaces; original brand mark; fix filter panic in thumbnails; README demo scenes
- New original DrawCraft mark (gradient + pen nib) replaces the two-letter badge
- render: thumbnails and pattern tiles use a single-threaded context (vello's default is
  multithreaded and panics on filters); per-item raster effects detected
- Type tool state no longer leaks across documents
- ui.set {status} for clean screenshots
- README: new hero, feature shots, Made in DrawCraft gallery; examples/neon-drive, ribbons,
  feature-sheet; ASSETS.md updated; heading renamed to Crafting Apps

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 22:44:39 -04:00
Brandon Thomas d5acaa8946 ROADMAP: update status and estimates
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:02:34 -04:00
Brandon Thomas eaff89e1c0 ROADMAP.md: status, milestones and parity estimates
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 10:07:15 -04:00