diff --git a/ROADMAP.md b/ROADMAP.md index 3bcde643..4548285d 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -4,7 +4,7 @@ VectorCraft is a clean-room, open-source, pure-Rust reimplementation of the Adob This file tracks **how far we are and what's left**. Time estimates are wall-clock hours of continuous Claude Opus 5.5 agent work (including builds and the CI gate), given both for **one agent** and for **4–6 parallel agents** on disjoint crates. They are counted from the remaining work (see [Parity estimate](#parity-estimate)), calibrated against measured throughput, and updated as work lands. -_Last updated: 2026-10-10 (after placed documents (File › Place of a `.vectorcraft` file, linked), M4.14–M4.98, M8.1–M8.20, M14.4–M14.7, the MCP prompts, resource templates, completions and logging, the 2026-10-07 issue fixes, the Layers panel rework and the 2026-10-08 community contributions: Pen and shape-tool modifiers, path editing, Layers, Artboards, Swatches/Brushes and dialogs, Japanese composition and PDF text, Hebrew/Arabic type, interface languages (Spanish among them), the font menu, saved selections, MCP and EPS, the missing-font export warning (#319), open paths in the Shape Builder (#374), PDF/`.ai` import keeping strokes live and hidden and nested layers (#372), per-corner Live Corners (#381), SVG type opening at the size it draws at (#396), the Wayland clipboard with copied-file paste (#398), ruler guides that can be selected, moved and deleted (#414), two batches of Preferences options that were stored but unused (#394), skeleton reads with `document.find` for large documents over MCP (#416) and anchors dragged with Direct Selection snapping to points, segments and smart guides, clipped SVG layers opening as clipping layers (#420), PDF/`.ai` layers read on pages of tens of millions of operators (#419), Document Color Mode putting RGB greys on the black plate on request and converting pattern tiles (#421) and movable dialogs with Offset Path's Joins dropdown (#423) and numeric fields scrubbed by dragging their label (#400), stroke weight presets in the stroke unit (#426), the Appearance panel's Opacity popup (#430), type on a path brackets, flip and Type on a Path Options that keep the type in place (#429), Layers rows dragged with a ghost and dropped on the trash or New Layer (#435), tool flyouts opening on a right or corner press (#436), tool flyouts torn off into floating toolbars (#437), the Shape Builder's erase mode deleting edges too (#439), installed fonts registered outside the font folders and fonts installed while the app runs listed in the font menus (#443), alike circular corners on rectangles that aren't square (#442), tool cursors as OS cursors so the pointer no longer trails over the canvas (#444), artboards copied and pasted with their art (#446), guides dragged out of the rulers snapping to the art's side midpoints and the artboards, artboard guides (#451), the toolbar's double arrow and Window › Toolbars › Double Column switching between one and two columns in any window height (#455), the Smart Guides display options and Snapping Tolerance (#394), Font Size and Leading combo boxes with preset lists in the Character and Properties panels and the Control bar (#458), screenshots pasted from the clipboard on macOS, Windows and the web (#457), the Properties panel's Fill and Stroke matching the Control bar's, Illustrator's Window menu panel keys (Shift+F7 for Align…) and Alt-wheel zoom whatever the wheel preference (Discord feedback), the point/area type widget (Discord feedback), groups in legacy Illustrator .ai files (Discord feedback), a rotating desktop log file (#465), image controls in the Control bar and Properties panel: Image Trace with its presets, Mask, Crop Image, Embed/Unembed, and an Image Trace object's preset, Expand and Release (Discord feedback), the Pen working as the Anchor Point tool with Alt held over a selected path's handles and anchors, and anchor buttons that convert, connect and cut paths at the selected anchors (Discord feedback), Japanese hanging punctuation (burasagari, #463), Escape leaving Presentation Mode with no screen mode saved across restarts, documents dropped on the desktop app opening as tabs of their own and a note that an `.ai` file's art off its artboards isn't in the part read (#472), Add/Delete Anchor Point tool icons drawn from the Pen tool's (#479), EPS import running more of PostScript Level 3 (patterns, Type 3 fonts, mesh shadings, masked images, VM and resource probes), and a preview that stands in saying why (Discord feedback, #466, #469, #474), chords with modifiers recorded in Edit › Keyboard Shortcuts (#487), Type Object Selection by Path Only (#394), Anti-aliased Artwork (#394), Show Pixel Grid (#394), pen and touch taps pressed and lifted within one frame clicking where they tapped and the Linux/Wayland pen-tablet workaround (#491), bounding-box resizes landing on the other objects' anchors and centres with labels, and the Rotate, Scale, Shear and Reflect tools snapping their drags (#482), Shift-drag marquees that toggle the objects or anchors they reach and a Lasso whose Alt subtraction keeps the rest of the selection (#483), the mouse wheel stepping the focused numeric field, the dialogs' and preferences' drag values made such fields (#485), Show The Home Screen When No Documents Are Open (#394), Numbers Without Units Are Points (#394), Auto-Collapse Iconic Panels (#394), the Contextual Task Bar moved by its handle and its More Options menu pinning and resetting its position, a designed macOS DMG window (#493), panels, panel groups and the Tools panel undocking into floating panels that move, stack and dock again (#495), the 0.5.0 startup crash on dual-GPU Linux desktops under Wayland fixed: the desktop's own GPU by default and a restart on the next GPU when one can't show the window (#502), path editing while drawing: Cmd/Ctrl with the Pen borrowing Direct Selection and drawing on afterwards, Pen+Alt reshaping segments, handles of a whole selected path dragging, and handle drags no longer re-gathering snap targets every move (#494), the Control bar's and Properties panel's Convert buttons for a path selected as a whole with Direct Selection, the Pen and the anchor tools (#504), the Pen closing a path dragged out of its first anchor every time, without flicker (#501), the Paste menu checking the system clipboard on a background thread on Linux so an X11 clipboard owner that never answers no longer freezes the window (#510), PDF/`.ai` import keeping a type object's outline stroke on the type, wrapped lines as area type, barcode digits in place and layers in the file's stacking order (#508), the Italian interface (#514), EPS images with several data sources read in turn (#498), `restore` undoing dictionary changes in EPS import (part of #505), the macOS menu bar laid out as a Mac app's (the VectorCraft menu with Settings, Language and Appearance, the system's Hide, Services and Window items; owner's request), Object › Image Trace › Make tracing with the Default preset instead of asking for a preset's name (#543), the rulers' unit menu (#528), Live Corners on stars, polygons and pen paths (#511), the drawing tools snapping to Smart Guides as the Selection tool does, with Construction Guides (#506), the in-window menus' Select All, Cut, Copy and Paste acting on the text field they were opened from (#516), Windows rendering through DX12 before Vulkan (#545), Image Trace tracing colour layers in parallel and refusing traces too large for memory, with the canvas outlining huge selections by their bounds (#525), SVGs of chosen artboards holding only the art over each artboard (#550), the font menu scrolling only its list, under a search field and filters that stay put (#555), a click on an object of a selection making it the key object that Align aligns to and Distribute Spacing spaces from, drawn with a thicker outline (#541), Shape Builder merges taken from the planar map itself, so merged regions leave no inner edge, hairline gap or spur in their outline (#569), `.ai` written by the exports and the CLI (`--export`, `convert`) as Save As writes it (#526), SVG round trips keeping hidden objects and `data-*` attributes (#522), the gradient stop popover staying open after the click that opens it from the Gradient panel (#577), standard ligatures kept under small tracking and dropped only past about −8% / +22% of a word space or when the character asks for them (#583), the Color panel keeping its height as warnings come and go so a drag on its spectrum no longer flickers near white (#578), fonts that font services such as Adobe Fonts load on Windows, listed through DirectWrite (#579), `.ai` files writing their layers and sublayers as PDF layers, hidden ones with their art, and PDF layers nested in layers importing as sublayers (#372), file dialogs on Linux shown off the UI thread so the compositor no longer finds the window not responding, and parented to the window on Linux and Windows (#592), anchors and handle ends picked from 2 px past their drawn size before the segments through them (#593), an image copied in a browser pasting as the picture, not its address (#597), the Free Transform widget with Constrain, Free Transform, Perspective Distort and Free Distort (#598), touch gestures: a two-finger tap undoes and a three-finger tap redoes (#585), the font menus' live preview staying on the text instead of flickering on and off every frame (#563), Edit Artboards showing the active artboard in the Properties panel with New Artboard, Delete Artboard and Exit (#530), the same DirectWrite fonts in `vectorcraft-cli` and its MCP server (#579), SVG layers keeping their names when wrapped and sublayers round-tripping through SVG (#372), a Layers panel that lays out only the rows in view and keeps a document's open rows in its file (#638), a panel dropped on the dock lights up the icon column it goes back to and pops out of its icon (#649), Image Trace's View modes and an Advanced section that stays as it was left (part of #641), Image Trace's Palette: Limited, Full Tone, Automatic and Document Library (part of #641), Image Trace's Create Strokes: line art traced as stroked centre lines (part of #641), a dual-GPU Mac falling back to its other GPU when one fails to start (#651), two fingers dragged on a touch screen panning the canvas (part of #449), the Home screen's Recent Files and a double-clicked New Document preset creating the document (part of #663), quitting no longer crashing on Macs with a Touch Bar (#661), Animated Zoom, Large Tabs, Scale Cursor Proportional to UI and anti-aliased bitmaps in Pixel Preview acting (part of #394), Smart Guides › Spacing Guides (part of #394), Edit Artboards' Properties choosing an artboard's size preset and flipping it between portrait and landscape (#671), Preferences › Type › Additional Fonts Folder loading the fonts of a folder you choose (#683), Canvas Color's light, medium and dark grey (part of #663), a document tab's close box after its title on Windows and Linux, before it on macOS (part of #673), Rearrange All Artboards' layouts (a grid by row or by column, one row, one column) and right-to-left order, one click away in the Properties and Artboards panels (#681), User Interface › Show Tool Group Labels and Cmd+, opening Settings on the Mac (part of #663), the Windows taskbar and Alt+Tab showing VectorCraft's icon, a click with a selection tool making its artboard the active one, and Paste in Place, in Front and in Back pasting onto the active artboard (#693), Photoshop-style raster effects on a pixel-filter pipeline: Effect › Blur › Radial Blur and Smart Blur, Effect › Sharpen › Unsharp Mask (part of gap 2), the Properties panel's number fields all one width (#696), the rotate cursor drawn as a curved double arrow (#701), the Templates folder in the desktop's own documents folder, made when missing (#703), PDF and .ai glyphs whose ToUnicode names no character (U+FFFD) taking their character from the embedded font or keeping their outlines, with a warning (#708), Illustrator EPS and `.ai` files opening from their editing data with their colours, gradients, transparency, images, names and every artboard (part of #637), `.ai` files saved without PDF compatibility opening from their editing data (part of #637), guides left out of raster exports and Fit to Artwork Bounds, hidden art left out of Fit to Artwork Bounds, Illustrator files compared with their page object by object, and `editingData: false` opening only what the page prints (#735), art reaching past a PDF's page clipped to its crop box (#675), Package collecting what placed documents link to (#777), area type, threaded type and type on a path made whole from Illustrator files' text documents (part of #637), the missing-fonts dialog with Find Fonts and a folder search (#792), Effect › Stylize › Glowing Edges (#765), Offset Path's Joins and Zig Zag's Points as dropdowns and Relative/Absolute as radio buttons in the effect dialogs (#828), the control channel's `app.quit` reporting a pending save prompt (#830), blurred type that stays put while the view moves (#755), Windows starting on Direct3D 12 and loading no Vulkan driver unless asked (#806), the Artboard tool naming its artboard once (#824), Save for Web taking typed pixel sizes (#839), rulers ticked over their whole length in a rotated view (#826), the gradient stop popover opening beside the art (#862) and recent colours recolouring the selected stop (#835), every align button following Align To (#789), the Properties panel's Paragraph section with all seven alignments and Hyphenate (#775), isolation mode dimming and locking the art around the isolated group (#833), color books (`.acb`) opening as swatch libraries (#831), files that can't be opened reported in a dialog (#861), `run` and `command_batch` steps using earlier steps' results (#785), ruler guides pulling drawn points with Smart Guides on and Smart Guides labelling centres and anchors on hover (#812), shadows and glows keeping their blend modes in PDF (#827) and `.ai` import skipping layer checks that can't succeed (#758), the Curvature tool editing any selected path (#798), raster exports composited in floating point so translucent edges over opaque art stay opaque (#787), Calligraphic and Bristle Brush Options with pen-pressure Calligraphic brushes (part of #852), a polygon's Polygon Properties in the Properties and Transform panels, Flare Tool Options that last and more tools opening their options on a double-click (part of #812), MCP file access confined with --automation-read-root / --automation-write-root (#832), the Transform effect's dialog with the reference point, Random, sliders and an angle dial (part of #885), artboard X/Y edits in the Properties and Transform panels and Artboard Options taking their art along with Move Artwork with Artboard (#922), Effect › Pixelate's Color Halftone, Crystallize, Mezzotint and Pointillize (part of gap 2), linked files changed while the app was in the background following Update Links when its window comes back to the front (#925), the Tabs panel's Leader and Align On fields keeping what is typed until Enter (#924), the Properties panel's Gradient section with the gradient's type and a freeform gradient's Draw (Points or Lines) while the Gradient tool is active (#921), PSD and PSB files opened and placed, linked or embedded, as their merged image (#918), Direct Selection and Group Selection marquees selecting the type, images and other objects without anchors that they touch (#927), PDF and `.ai` glyphs that no mapping names found by their outline in the installed font, so their text stays one type object (#811); see [Honest assessment](#honest-assessment-2026-10-05))._ +_Last updated: 2026-10-10 (after placed documents (File › Place of a `.vectorcraft` file, linked), M4.14–M4.98, M8.1–M8.20, M14.4–M14.7, the MCP prompts, resource templates, completions and logging, the 2026-10-07 issue fixes, the Layers panel rework and the 2026-10-08 community contributions: Pen and shape-tool modifiers, path editing, Layers, Artboards, Swatches/Brushes and dialogs, Japanese composition and PDF text, Hebrew/Arabic type, interface languages (Spanish among them), the font menu, saved selections, MCP and EPS, the missing-font export warning (#319), open paths in the Shape Builder (#374), PDF/`.ai` import keeping strokes live and hidden and nested layers (#372), per-corner Live Corners (#381), SVG type opening at the size it draws at (#396), the Wayland clipboard with copied-file paste (#398), ruler guides that can be selected, moved and deleted (#414), two batches of Preferences options that were stored but unused (#394), skeleton reads with `document.find` for large documents over MCP (#416) and anchors dragged with Direct Selection snapping to points, segments and smart guides, clipped SVG layers opening as clipping layers (#420), PDF/`.ai` layers read on pages of tens of millions of operators (#419), Document Color Mode putting RGB greys on the black plate on request and converting pattern tiles (#421) and movable dialogs with Offset Path's Joins dropdown (#423) and numeric fields scrubbed by dragging their label (#400), stroke weight presets in the stroke unit (#426), the Appearance panel's Opacity popup (#430), type on a path brackets, flip and Type on a Path Options that keep the type in place (#429), Layers rows dragged with a ghost and dropped on the trash or New Layer (#435), tool flyouts opening on a right or corner press (#436), tool flyouts torn off into floating toolbars (#437), the Shape Builder's erase mode deleting edges too (#439), installed fonts registered outside the font folders and fonts installed while the app runs listed in the font menus (#443), alike circular corners on rectangles that aren't square (#442), tool cursors as OS cursors so the pointer no longer trails over the canvas (#444), artboards copied and pasted with their art (#446), guides dragged out of the rulers snapping to the art's side midpoints and the artboards, artboard guides (#451), the toolbar's double arrow and Window › Toolbars › Double Column switching between one and two columns in any window height (#455), the Smart Guides display options and Snapping Tolerance (#394), Font Size and Leading combo boxes with preset lists in the Character and Properties panels and the Control bar (#458), screenshots pasted from the clipboard on macOS, Windows and the web (#457), the Properties panel's Fill and Stroke matching the Control bar's, Illustrator's Window menu panel keys (Shift+F7 for Align…) and Alt-wheel zoom whatever the wheel preference (Discord feedback), the point/area type widget (Discord feedback), groups in legacy Illustrator .ai files (Discord feedback), a rotating desktop log file (#465), image controls in the Control bar and Properties panel: Image Trace with its presets, Mask, Crop Image, Embed/Unembed, and an Image Trace object's preset, Expand and Release (Discord feedback), the Pen working as the Anchor Point tool with Alt held over a selected path's handles and anchors, and anchor buttons that convert, connect and cut paths at the selected anchors (Discord feedback), Japanese hanging punctuation (burasagari, #463), Escape leaving Presentation Mode with no screen mode saved across restarts, documents dropped on the desktop app opening as tabs of their own and a note that an `.ai` file's art off its artboards isn't in the part read (#472), Add/Delete Anchor Point tool icons drawn from the Pen tool's (#479), EPS import running more of PostScript Level 3 (patterns, Type 3 fonts, mesh shadings, masked images, VM and resource probes), and a preview that stands in saying why (Discord feedback, #466, #469, #474), chords with modifiers recorded in Edit › Keyboard Shortcuts (#487), Type Object Selection by Path Only (#394), Anti-aliased Artwork (#394), Show Pixel Grid (#394), pen and touch taps pressed and lifted within one frame clicking where they tapped and the Linux/Wayland pen-tablet workaround (#491), bounding-box resizes landing on the other objects' anchors and centres with labels, and the Rotate, Scale, Shear and Reflect tools snapping their drags (#482), Shift-drag marquees that toggle the objects or anchors they reach and a Lasso whose Alt subtraction keeps the rest of the selection (#483), the mouse wheel stepping the focused numeric field, the dialogs' and preferences' drag values made such fields (#485), Show The Home Screen When No Documents Are Open (#394), Numbers Without Units Are Points (#394), Auto-Collapse Iconic Panels (#394), the Contextual Task Bar moved by its handle and its More Options menu pinning and resetting its position, a designed macOS DMG window (#493), panels, panel groups and the Tools panel undocking into floating panels that move, stack and dock again (#495), the 0.5.0 startup crash on dual-GPU Linux desktops under Wayland fixed: the desktop's own GPU by default and a restart on the next GPU when one can't show the window (#502), path editing while drawing: Cmd/Ctrl with the Pen borrowing Direct Selection and drawing on afterwards, Pen+Alt reshaping segments, handles of a whole selected path dragging, and handle drags no longer re-gathering snap targets every move (#494), the Control bar's and Properties panel's Convert buttons for a path selected as a whole with Direct Selection, the Pen and the anchor tools (#504), the Pen closing a path dragged out of its first anchor every time, without flicker (#501), the Paste menu checking the system clipboard on a background thread on Linux so an X11 clipboard owner that never answers no longer freezes the window (#510), PDF/`.ai` import keeping a type object's outline stroke on the type, wrapped lines as area type, barcode digits in place and layers in the file's stacking order (#508), the Italian interface (#514), EPS images with several data sources read in turn (#498), `restore` undoing dictionary changes in EPS import (part of #505), the macOS menu bar laid out as a Mac app's (the VectorCraft menu with Settings, Language and Appearance, the system's Hide, Services and Window items; owner's request), Object › Image Trace › Make tracing with the Default preset instead of asking for a preset's name (#543), the rulers' unit menu (#528), Live Corners on stars, polygons and pen paths (#511), the drawing tools snapping to Smart Guides as the Selection tool does, with Construction Guides (#506), the in-window menus' Select All, Cut, Copy and Paste acting on the text field they were opened from (#516), Windows rendering through DX12 before Vulkan (#545), Image Trace tracing colour layers in parallel and refusing traces too large for memory, with the canvas outlining huge selections by their bounds (#525), SVGs of chosen artboards holding only the art over each artboard (#550), the font menu scrolling only its list, under a search field and filters that stay put (#555), a click on an object of a selection making it the key object that Align aligns to and Distribute Spacing spaces from, drawn with a thicker outline (#541), Shape Builder merges taken from the planar map itself, so merged regions leave no inner edge, hairline gap or spur in their outline (#569), `.ai` written by the exports and the CLI (`--export`, `convert`) as Save As writes it (#526), SVG round trips keeping hidden objects and `data-*` attributes (#522), the gradient stop popover staying open after the click that opens it from the Gradient panel (#577), standard ligatures kept under small tracking and dropped only past about −8% / +22% of a word space or when the character asks for them (#583), the Color panel keeping its height as warnings come and go so a drag on its spectrum no longer flickers near white (#578), fonts that font services such as Adobe Fonts load on Windows, listed through DirectWrite (#579), `.ai` files writing their layers and sublayers as PDF layers, hidden ones with their art, and PDF layers nested in layers importing as sublayers (#372), file dialogs on Linux shown off the UI thread so the compositor no longer finds the window not responding, and parented to the window on Linux and Windows (#592), anchors and handle ends picked from 2 px past their drawn size before the segments through them (#593), an image copied in a browser pasting as the picture, not its address (#597), the Free Transform widget with Constrain, Free Transform, Perspective Distort and Free Distort (#598), touch gestures: a two-finger tap undoes and a three-finger tap redoes (#585), the font menus' live preview staying on the text instead of flickering on and off every frame (#563), Edit Artboards showing the active artboard in the Properties panel with New Artboard, Delete Artboard and Exit (#530), the same DirectWrite fonts in `vectorcraft-cli` and its MCP server (#579), SVG layers keeping their names when wrapped and sublayers round-tripping through SVG (#372), a Layers panel that lays out only the rows in view and keeps a document's open rows in its file (#638), a panel dropped on the dock lights up the icon column it goes back to and pops out of its icon (#649), Image Trace's View modes and an Advanced section that stays as it was left (part of #641), Image Trace's Palette: Limited, Full Tone, Automatic and Document Library (part of #641), Image Trace's Create Strokes: line art traced as stroked centre lines (part of #641), a dual-GPU Mac falling back to its other GPU when one fails to start (#651), two fingers dragged on a touch screen panning the canvas (part of #449), the Home screen's Recent Files and a double-clicked New Document preset creating the document (part of #663), quitting no longer crashing on Macs with a Touch Bar (#661), Animated Zoom, Large Tabs, Scale Cursor Proportional to UI and anti-aliased bitmaps in Pixel Preview acting (part of #394), Smart Guides › Spacing Guides (part of #394), Edit Artboards' Properties choosing an artboard's size preset and flipping it between portrait and landscape (#671), Preferences › Type › Additional Fonts Folder loading the fonts of a folder you choose (#683), Canvas Color's light, medium and dark grey (part of #663), a document tab's close box after its title on Windows and Linux, before it on macOS (part of #673), Rearrange All Artboards' layouts (a grid by row or by column, one row, one column) and right-to-left order, one click away in the Properties and Artboards panels (#681), User Interface › Show Tool Group Labels and Cmd+, opening Settings on the Mac (part of #663), the Windows taskbar and Alt+Tab showing VectorCraft's icon, a click with a selection tool making its artboard the active one, and Paste in Place, in Front and in Back pasting onto the active artboard (#693), Photoshop-style raster effects on a pixel-filter pipeline: Effect › Blur › Radial Blur and Smart Blur, Effect › Sharpen › Unsharp Mask (part of gap 2), the Properties panel's number fields all one width (#696), the rotate cursor drawn as a curved double arrow (#701), the Templates folder in the desktop's own documents folder, made when missing (#703), PDF and .ai glyphs whose ToUnicode names no character (U+FFFD) taking their character from the embedded font or keeping their outlines, with a warning (#708), Illustrator EPS and `.ai` files opening from their editing data with their colours, gradients, transparency, images, names and every artboard (part of #637), `.ai` files saved without PDF compatibility opening from their editing data (part of #637), guides left out of raster exports and Fit to Artwork Bounds, hidden art left out of Fit to Artwork Bounds, Illustrator files compared with their page object by object, and `editingData: false` opening only what the page prints (#735), art reaching past a PDF's page clipped to its crop box (#675), Package collecting what placed documents link to (#777), area type, threaded type and type on a path made whole from Illustrator files' text documents (part of #637), the missing-fonts dialog with Find Fonts and a folder search (#792), Effect › Stylize › Glowing Edges (#765), Offset Path's Joins and Zig Zag's Points as dropdowns and Relative/Absolute as radio buttons in the effect dialogs (#828), the control channel's `app.quit` reporting a pending save prompt (#830), blurred type that stays put while the view moves (#755), Windows starting on Direct3D 12 and loading no Vulkan driver unless asked (#806), the Artboard tool naming its artboard once (#824), Save for Web taking typed pixel sizes (#839), rulers ticked over their whole length in a rotated view (#826), the gradient stop popover opening beside the art (#862) and recent colours recolouring the selected stop (#835), every align button following Align To (#789), the Properties panel's Paragraph section with all seven alignments and Hyphenate (#775), isolation mode dimming and locking the art around the isolated group (#833), color books (`.acb`) opening as swatch libraries (#831), files that can't be opened reported in a dialog (#861), `run` and `command_batch` steps using earlier steps' results (#785), ruler guides pulling drawn points with Smart Guides on and Smart Guides labelling centres and anchors on hover (#812), shadows and glows keeping their blend modes in PDF (#827) and `.ai` import skipping layer checks that can't succeed (#758), the Curvature tool editing any selected path (#798), raster exports composited in floating point so translucent edges over opaque art stay opaque (#787), Calligraphic and Bristle Brush Options with pen-pressure Calligraphic brushes (part of #852), a polygon's Polygon Properties in the Properties and Transform panels, Flare Tool Options that last and more tools opening their options on a double-click (part of #812), MCP file access confined with --automation-read-root / --automation-write-root (#832), the Transform effect's dialog with the reference point, Random, sliders and an angle dial (part of #885), artboard X/Y edits in the Properties and Transform panels and Artboard Options taking their art along with Move Artwork with Artboard (#922), Effect › Pixelate's Color Halftone, Crystallize, Mezzotint and Pointillize (part of gap 2), linked files changed while the app was in the background following Update Links when its window comes back to the front (#925), the Tabs panel's Leader and Align On fields keeping what is typed until Enter (#924), the Properties panel's Gradient section with the gradient's type and a freeform gradient's Draw (Points or Lines) while the Gradient tool is active (#921), PSD and PSB files opened and placed, linked or embedded, as their merged image (#918), Direct Selection and Group Selection marquees selecting the type, images and other objects without anchors that they touch (#927), PDF and `.ai` glyphs that no mapping names found by their outline in the installed font, so their text stays one type object (#811), Effect › Video's De-Interlace and NTSC Colors (part of gap 2); see [Honest assessment](#honest-assessment-2026-10-05))._ ## Where we are @@ -35,7 +35,7 @@ since 2026-10-01. |---|---|---| | **Breadth:** menus, tools and panels exist | ~90% | 13 menu items still stubbed; every tool implemented except Touch Type; 51 panel modules | | **Depth:** each feature behaves like Illustrator | ~69–75% | Strong: paint, appearance and colour (M3), Pathfinder and booleans, selection, drawing, files (M4). Weak: advanced type (~45%; inline symbols in text are beyond parity and don't raise it), brushes and symbols (in progress), raster effects (~20%) | -| **Large missing subsystems** | 0–20% | 3D & Materials (0%), Photoshop-style raster effects and the Effect Gallery (~8 of ~56 filters), SVG Filters, CJK composition (vertical type with kinsoku, tate-chu-yoko and the font's vertical metrics; ruby, mojikumi and proportional vertical metrics open), Variables (data merge), scripting | +| **Large missing subsystems** | 0–20% | 3D & Materials (0%), Photoshop-style raster effects and the Effect Gallery (~10 of ~56 filters), SVG Filters, CJK composition (vertical type with kinsoku, tate-chu-yoko and the font's vertical metrics; ruby, mojikumi and proportional vertical metrics open), Variables (data merge), scripting | | **Interaction fidelity:** modifiers, cursors, small behaviours | ~30–40% | The dedicated pass hasn't started, and there has been no side-by-side session with Illustrator yet. A power user notices this first | | **Look & feel** | ~75–80% | Measured against Illustrator 2026 screenshots (2026-10-02); the panels added since haven't been re-measured | | **File interop** | ~85% | SVG/SVGZ, PDF and PDF-compatible `.ai`, EPS, DXF, EMF/WMF, raster formats, PSD export and PSD/PSB placement (merged image), Place and Links, Package, Print, clipboard flavours. Affinity documents (Affinity 1–3) open natively as editable art, checked against 51 pinned public files (33 current `.af`), with selected saved-thumbnail comparisons and every-board native/SVG/PDF/PSD checks for current files; Affinity export is missing and effects, adjustments and brushes don't import. Affinity isn't an Illustrator feature, so this doesn't raise the parity score. The editing copy inside an Illustrator EPS or `.ai` is read for its structure: layers, groups, names, hidden objects and type, colours, gradients, transparency, images and every artboard (see Out of scope for what it doesn't read yet); DWG has no open spec | @@ -53,13 +53,13 @@ Ordered by how much each gap blocks someone from switching. Sizes are one-agent 1. **Interaction fidelity:** go tool by tool and panel by panel against `plan/illustrator/05-tools.md`, `06-panels.md` and `09-shortcuts.md`, covering modifier keys, cursors, the Properties panel per context and isolation mode. The Shaper’s rough-square recognition and shape orientation steps are corrected; Shaper Groups now retain editable originals for region merges/punches and separate fill/stroke edits; their construction-mode widget and gesture refinements remain. 60–90 h. -2. **Photoshop-style raster effects and the Effect Gallery:** about 47 filters (Artistic, Brush Strokes, Distort, - Sketch, Stylize, Texture, Video) and the Effect Gallery. The pixel-filter pipeline is in place +2. **Photoshop-style raster effects and the Effect Gallery:** about 45 filters (Artistic, Brush Strokes, Distort, + Sketch, Stylize, Texture) and the Effect Gallery. The pixel-filter pipeline is in place (`vectorcraft_effects::pixel`: the object rendered offscreen, filtered in stack order with Gaussian Blur and Feather, cached while panning, images in PDF/SVG/Expand Appearance) with Blur › Radial Blur and Smart Blur - (Normal mode only), Pixelate › Color Halftone, Crystallize, Mezzotint and Pointillize, Sharpen › Unsharp Mask and - Stylize › Glowing Edges; each new filter is now one function, a catalogue row, menu and translations. Parallelizes - well across agents. 24–37 h. + (Normal mode only), Pixelate › Color Halftone, Crystallize, Mezzotint and Pointillize, Sharpen › Unsharp Mask, + Stylize › Glowing Edges and Video › De-Interlace and NTSC Colors; each new filter is now one function, a catalogue row, menu and translations. Parallelizes + well across agents. 23–36 h. 3. **3D and Materials:** Extrude & Bevel, Revolve, Inflate and Rotate with lighting and materials, using a software renderer in its own crate (layering allows it below L6), with output in SVG/PDF as rasters or projected vectors. The largest single gap. 50–80 h. @@ -223,7 +223,7 @@ about 1–1.5 agent-hours each, so the other rows (estimated on the older scale) | Strokes, brushes, width profiles | 5 | 89% | Scatter, Art and Pattern Brush Options (Calligraphic and Bristle done), brush libraries (generated in code), pen pressure on macOS (the windowing layer reports none there), brushes driven by pen tilt, bearing and barrel rotation (6D art pens) | 10–18 | | Appearance, transparency, graphic styles, masks | 5 | 98% | raster effect reach in preview bounds (flattener presets apply in PDF, EPS and print) | 1–2 | | Live vector effects | 5 | 85% | Outline Object, Pathfinder Hard/Soft Mix and Trap, SVG Filters, the Transform effect's Transform Objects/Patterns and Scale Strokes & Effects options | 6–10 | -| Raster effects (Effect Gallery, Document Raster Effects Settings) | 4 | 28% | ~47 Photoshop-style filters (Artistic, Brush Strokes, Distort, Sketch, Stylize, Texture, Video), Smart Blur's Edge Only / Overlay Edge modes and the Effect Gallery; Document Raster Effects Settings, raster effects in PDF, the pixel-filter pipeline, Radial Blur, Smart Blur, Unsharp Mask, Glowing Edges and Pixelate (Color Halftone, Crystallize, Mezzotint, Pointillize) are done | 24–37 | +| Raster effects (Effect Gallery, Document Raster Effects Settings) | 4 | 29% | ~45 Photoshop-style filters (Artistic, Brush Strokes, Distort, Sketch, Stylize, Texture), Smart Blur's Edge Only / Overlay Edge modes and the Effect Gallery; Document Raster Effects Settings, raster effects in PDF, the pixel-filter pipeline, Radial Blur, Smart Blur, Unsharp Mask, Glowing Edges, Pixelate (Color Halftone, Crystallize, Mezzotint, Pointillize) and Video (De-Interlace, NTSC Colors) are done | 23–36 | | 3D and Materials | 4 | 0% | Extrude & Bevel, Revolve, Inflate, Rotate, lighting, materials (software renderer) | 50–80 | | Type core | 9 | 80% | Middle Eastern features beyond bidi layout and Paragraph Direction (Character Direction, digit types, kashidas, the Middle Eastern composers, editable bidirectional SVG text, a split caret where directions meet); Hyphenation… and Justification… options (Every-line Composer for justified and ragged text, per object, is done; it is tuned by eye, not yet compared side by side with Illustrator; mixed type sizes in a paragraph still break single-line), Optical Margin Alignment, paragraph spacing limit for vertically justified area type, hidden characters, paragraph attributes in the Type tool's copy and paste (the characters keep their styles, the paragraphs take the destination's), mixed-value display in the Paragraph panel for a selection across differing paragraphs, Transform Again after a type-area resize (it scales the type), partial selection of type-area anchors by marquee | 14–19 | | Type advanced | 4 | 50% | CJK composition for vertical type (ruby, mojikumi beyond Line-end Punctuation Half Width — the other sets (and their paragraph-start bracket and indent rules), custom kinsoku sets (beyond Hard, Soft and None) and the Mojikumi Settings dialog —, proportional vertical metrics, manual tate-chu-yoko), variable font axis sliders (named instances are styles), tab leaders, spell check (open dictionary), Touch Type, Retype; vertical point/area/path type and Type Orientation have initial support (beyond parity, not scored: inline symbols in text) | 20–28 | diff --git a/crates/effects/src/lib.rs b/crates/effects/src/lib.rs index 5478bc51..8c26d25c 100644 --- a/crates/effects/src/lib.rs +++ b/crates/effects/src/lib.rs @@ -144,6 +144,7 @@ const WARP: &[&str] = &["Effect", "Warp"]; const BLUR: &[&str] = &["Effect", "Blur"]; const SHARPEN: &[&str] = &["Effect", "Sharpen"]; const PIXELATE: &[&str] = &["Effect", "Pixelate"]; +const VIDEO: &[&str] = &["Effect", "Video"]; const PATHFINDER: &[&str] = &["Effect", "Pathfinder"]; const PLUGINS: &[&str] = &["Effect", "Plug-ins"]; const ADJUST: &[&str] = &["Effect", "Color Adjustments"]; @@ -331,6 +332,20 @@ pub fn effect_catalog() -> Vec { "{cellSize: pt 3..300 (5)} redraws the object as randomly placed dots of its colours on a white canvas", json!({"cellSize": 5.0}), ), + r( + "video.deinterlace", + "De-Interlace…", + VIDEO, + "{eliminate: \"odd\"|\"even\" (\"odd\"; which field lines are taken out), create: \"duplication\"|\"interpolation\" (\"duplication\"; a line taken out becomes a copy of the line above, or the average of the lines above and below)} the field lines are the rows of the document's raster grid (Document Raster Effects Settings › Resolution), numbered from 1 at the top of the page", + json!({"eliminate": "odd", "create": "duplication"}), + ), + r( + "video.ntscColors", + "NTSC Colors", + VIDEO, + "{} makes colours a television signal can't carry (luma plus chroma past 110 % of white, or luma minus chroma below −20 %) less saturated, keeping their brightness", + json!({}), + ), ]; v.extend([ g( diff --git a/crates/effects/src/pixel/mod.rs b/crates/effects/src/pixel/mod.rs index f0546e88..680eaa0a 100644 --- a/crates/effects/src/pixel/mod.rs +++ b/crates/effects/src/pixel/mod.rs @@ -1,6 +1,6 @@ //! Photoshop-style raster effects (Effect › Blur › Radial Blur and Smart Blur, Pixelate › Color -//! Halftone, Crystallize, Mezzotint and Pointillize, Sharpen › Unsharp Mask, and Stylize › Glowing -//! Edges): filters over premultiplied RGBA8 pixels. +//! Halftone, Crystallize, Mezzotint and Pointillize, Sharpen › Unsharp Mask, Stylize › Glowing +//! Edges, and Video › De-Interlace and NTSC Colors): filters over premultiplied RGBA8 pixels. //! //! - Every distance is in document units (points) and becomes pixels through the raster's //! [`PixelSpace::px`], so an effect looks the same at any zoom and at any Document Raster Effects @@ -13,6 +13,7 @@ mod blur; mod edges; mod pixelate; mod sharpen; +mod video; use serde_json::Value; use vectorcraft_geom::{Affine, Point, Rect}; @@ -22,7 +23,7 @@ use crate::util::{num, text}; pub use pixelate::{MEZZOTINT_TYPES, Mezzotint}; /// The Photoshop-style effect ids (all raster effects, see [`crate::is_raster`]). -pub const PIXEL_EFFECTS: [&str; 8] = [ +pub const PIXEL_EFFECTS: [&str; 10] = [ "blur.radial", "blur.smart", "pixelate.colorHalftone", @@ -31,6 +32,8 @@ pub const PIXEL_EFFECTS: [&str; 8] = [ "pixelate.pointillize", "sharpen.unsharpMask", "stylize.glowingEdges", + "video.deinterlace", + "video.ntscColors", ]; /// A Photoshop-style raster effect with its parameters read and clamped to their ranges. Lengths @@ -59,6 +62,11 @@ pub enum PixelFx { /// Pixelate › Pointillize: random dots about `cell` across of the object's colours on a white /// canvas. Pointillize { cell: f64 }, + /// Video › De-Interlace: the odd (or `even`) field lines made again from the others, by + /// duplication or, with `interpolate`, by averaging. + DeInterlace { even: bool, interpolate: bool }, + /// Video › NTSC Colors: colours a television signal can't carry made less saturated. + NtscColors, } /// What a raster's colour channels hold, for the filters that treat them apart (Color Halftone @@ -89,6 +97,9 @@ pub struct PixelSpace { pub center: Point, /// What the colour channels hold. pub channels: Channels, + /// The height of a line of the document's raster grid (document units: 72 / Document Raster + /// Effects Settings › Resolution), the fields De-Interlace works on. + pub line: f64, } /// Effect `id`'s parameters `p` (defaults merged in) as a [`PixelFx`]; `None` for other effects. @@ -126,6 +137,11 @@ pub(crate) fn parse(id: &str, p: &Value) -> Option { "pixelate.crystallize" => PixelFx::Crystallize { cell: num(p, "cellSize", 10.0).clamp(3.0, 300.0) }, "pixelate.mezzotint" => PixelFx::Mezzotint { kind: Mezzotint::parse(text(p, "type", "fineDots")) }, "pixelate.pointillize" => PixelFx::Pointillize { cell: num(p, "cellSize", 5.0).clamp(3.0, 300.0) }, + "video.deinterlace" => PixelFx::DeInterlace { + even: text(p, "eliminate", "odd").eq_ignore_ascii_case("even"), + interpolate: text(p, "create", "duplication").eq_ignore_ascii_case("interpolation"), + }, + "video.ntscColors" => PixelFx::NtscColors, _ => return None, }) } @@ -143,7 +159,7 @@ impl PixelFx { PixelFx::SmartBlur { radius, .. } => radius, PixelFx::UnsharpMask { .. } => 0.0, PixelFx::GlowingEdges { width, smoothness, .. } => width.max(smoothness * 3.0), - PixelFx::ColorHalftone { .. } | PixelFx::Mezzotint { .. } => 0.0, + PixelFx::ColorHalftone { .. } | PixelFx::Mezzotint { .. } | PixelFx::DeInterlace { .. } | PixelFx::NtscColors => 0.0, // A crystal's or dot's point inside the object reaches out by up to its cell. PixelFx::Crystallize { cell } | PixelFx::Pointillize { cell } => 1.5 * cell, } @@ -163,6 +179,9 @@ impl PixelFx { PixelFx::Mezzotint { .. } => Some(0.0), // The dots' points, and the softened colour around them. PixelFx::Pointillize { cell } => Some(2.5 * cell), + // The lines above and below. + PixelFx::DeInterlace { .. } => Some(video::MAX_LINE), + PixelFx::NtscColors => Some(0.0), } } @@ -180,6 +199,8 @@ impl PixelFx { PixelFx::Crystallize { cell } => pixelate::crystallize(px, w, h, space, cell), PixelFx::Mezzotint { kind } => pixelate::mezzotint(px, w, h, space, kind), PixelFx::Pointillize { cell } => pixelate::pointillize(px, w, h, space, cell), + PixelFx::DeInterlace { even, interpolate } => video::deinterlace(px, w, h, space, even, interpolate), + PixelFx::NtscColors => video::ntsc(px), } } } diff --git a/crates/effects/src/pixel/tests.rs b/crates/effects/src/pixel/tests.rs index d8314b2b..7d09fee5 100644 --- a/crates/effects/src/pixel/tests.rs +++ b/crates/effects/src/pixel/tests.rs @@ -7,7 +7,7 @@ use crate::{RasterFx, raster_effects}; /// A `w` × `h` raster whose pixels are document points (origin top-left). fn space(w: usize, h: usize) -> PixelSpace { - PixelSpace { to_doc: Affine::IDENTITY, px: 1.0, center: Point::new(w as f64 / 2.0, h as f64 / 2.0), channels: Channels::Rgb } + PixelSpace { to_doc: Affine::IDENTITY, px: 1.0, center: Point::new(w as f64 / 2.0, h as f64 / 2.0), channels: Channels::Rgb, line: 1.0 } } fn image(w: usize, h: usize, f: impl Fn(usize, usize) -> [u8; 4]) -> Vec { @@ -224,7 +224,8 @@ fn lengths_are_document_units() { let edge = |scale: usize| image(40 * scale, 4, move |x, _| grey(if x < 20 * scale { 100 } else { 150 })); let run = |scale: usize| { let mut d = edge(scale); - let s = PixelSpace { to_doc: Affine::scale(1.0 / scale as f64), px: 1.0 / scale as f64, center: Point::ZERO, channels: Channels::Rgb }; + let s = + PixelSpace { to_doc: Affine::scale(1.0 / scale as f64), px: 1.0 / scale as f64, center: Point::ZERO, channels: Channels::Rgb, line: 1.0 }; fx("sharpen.unsharpMask", json!({"amount": 100, "radius": 2})).apply(&mut d, 40 * scale, 4, &s); (0..40 * scale).filter(|x| at(&d, 40 * scale, *x, 2)[0] < 99).count() }; @@ -253,7 +254,7 @@ fn gaussian_and_plane_blurs_keep_their_mass() { fn pixel_timings() { let (w, h) = (2000, 2000); let src = image(w, h, |x, y| [(x % 256) as u8, (y % 256) as u8, ((x ^ y) % 256) as u8, 255]); - let s = PixelSpace { to_doc: Affine::IDENTITY, px: 1.0, center: Point::new(1000.0, 1000.0), channels: Channels::Rgb }; + let s = PixelSpace { to_doc: Affine::IDENTITY, px: 1.0, center: Point::new(1000.0, 1000.0), channels: Channels::Rgb, line: 1.0 }; let cases = [ ("blur.radial", json!({"quality": "draft"})), ("blur.radial", json!({"quality": "good"})), @@ -477,3 +478,50 @@ fn pixelate_patterns_follow_the_object_at_any_resolution() { assert_eq!(shifted, one, "{id}"); } } + +/// Video › De-Interlace: lines 1, 3, 5… (or 2, 4, 6…) are made again from the others, by copying +/// the line above or by averaging the lines above and below; the lines are the document's raster +/// rows, whatever the raster's own resolution. +#[test] +fn deinterlace_remakes_one_field_from_the_other() { + let (w, h) = (2, 6); + // Line n (from 1) is grey 40 n. + let src = image(w, h, |_, y| grey(40 * (y as u8 + 1))); + let run = |p: serde_json::Value, s: &PixelSpace| { + let mut d = src.clone(); + fx("video.deinterlace", p).apply(&mut d, w, h, s); + (0..h).map(|y| at(&d, w, 1, y)[0]).collect::>() + }; + let s = space(w, h); + // Odd lines (1, 3, 5) copy the line above; line 1 has none, so it takes line 2. + assert_eq!(run(json!({}), &s), [80, 80, 80, 160, 160, 240]); + assert_eq!(run(json!({"eliminate": "even"}), &s), [40, 40, 120, 120, 200, 200]); + // Interpolated: the average of the lines around (one side at the edges). + assert_eq!(run(json!({"eliminate": "even", "create": "interpolation"}), &s), [40, 80, 120, 160, 200, 200]); + // Lines two pixels tall: lines 1 and 3 (pixels 0–1 and 4–5) copy their neighbour, row by row. + let coarse = PixelSpace { line: 2.0, ..space(w, h) }; + assert_eq!(run(json!({}), &coarse), [120, 160, 120, 160, 120, 160]); + // A damaged space changes nothing. + assert_eq!(run(json!({}), &PixelSpace { line: f64::NAN, ..space(w, h) }), [40, 80, 120, 160, 200, 240]); +} + +/// Video › NTSC Colors: saturated yellow and cyan lose saturation (their composite signal is too +/// strong) but keep their brightness; greys, dark colours and transparency stay as they are. +#[test] +fn ntsc_colors_tame_only_colours_too_strong_for_the_signal() { + let (w, h) = (5, 1); + let px = [[255, 255, 0, 255], [0, 255, 255, 255], [128, 128, 128, 255], [100, 20, 20, 255], [0, 0, 0, 0]]; + let mut d: Vec = px.concat(); + fx("video.ntscColors", json!({})).apply(&mut d, w, h, &space(w, h)); + let luma = |p: [u8; 4]| 0.299 * f64::from(p[0]) + 0.587 * f64::from(p[1]) + 0.114 * f64::from(p[2]); + for (x, &a) in px.iter().enumerate() { + let b = at(&d, w, x, 0); + if x >= 2 { + assert_eq!(b, a, "{x}: unchanged"); + continue; + } + let spread = |p: [u8; 4]| p[..3].iter().max().unwrap() - p[..3].iter().min().unwrap(); + assert!(spread(b) < spread(a), "{x}: less saturated {b:?}"); + assert!((luma(a) - luma(b)).abs() < 3.0, "{x}: as bright {a:?} {b:?}"); + } +} diff --git a/crates/effects/src/pixel/video.rs b/crates/effects/src/pixel/video.rs new file mode 100644 index 00000000..d5cc8faa --- /dev/null +++ b/crates/effects/src/pixel/video.rs @@ -0,0 +1,74 @@ +//! Effect › Video: De-Interlace and NTSC Colors. + +use vectorcraft_geom::Point; + +use super::PixelSpace; + +/// The tallest field line De-Interlace reads across (document units): one pixel at the lowest +/// document raster resolution, 1 ppi. +pub(super) const MAX_LINE: f64 = 72.0; + +/// De-Interlace: the odd (or, with `even`, the even) fields of the image are made again from the +/// others. The fields are the lines of the document's raster grid (each [`PixelSpace::line`] +/// tall, numbered from 1 at the top of the page): a line taken out becomes a copy of the line +/// above it (the one below at the top), or with `interpolate` the average of the two. +pub(super) fn deinterlace(px: &mut [[u8; 4]], w: usize, h: usize, space: &PixelSpace, even: bool, interpolate: bool) { + let line = space.line; + let to_px = space.to_doc.inverse(); + if !(line.is_finite() && line > 0.0 && to_px.is_finite() && space.to_doc.is_finite()) { + return; + } + let src = px.to_vec(); + // The pixel holding document point `q`. + let at = |q: Point| { + let p = to_px * q; + (p.x >= 0.0 && p.y >= 0.0 && p.x < w as f64 && p.y < h as f64).then(|| src.get(p.y as usize * w + p.x as usize).copied()).flatten() + }; + for (i, out) in px.iter_mut().enumerate().take(w.saturating_mul(h)) { + let q = space.to_doc * Point::new((i % w) as f64 + 0.5, (i / w) as f64 + 0.5); + let k = (q.y / line).floor(); + // Line k + 1: odd lines have an even k. + if !k.is_finite() || ((k as i64).rem_euclid(2) == 1) != even { + continue; + } + let (above, below) = (at(Point::new(q.x, q.y - line)), at(Point::new(q.x, q.y + line))); + let made = match (interpolate, above, below) { + (true, Some(a), Some(b)) => Some([0, 1, 2, 3].map(|c| (u16::from(a[c]) + u16::from(b[c])).div_ceil(2) as u8)), + (_, a, b) => a.or(b), + }; + if let Some(v) = made { + *out = v; + } + } +} + +/// NTSC Colors: colours a television's composite signal can't carry are made less saturated, +/// keeping their brightness. In YIQ, the luma plus the chroma's amplitude must stay within 110 % +/// of white and the luma minus it above −20 %; a colour past either has its chroma cut to fit. +pub(super) fn ntsc(px: &mut [[u8; 4]]) { + for p in px.iter_mut() { + let a = f32::from(p[3]) / 255.0; + if a <= 0.0 { + continue; + } + // Straight colour (the pixels are premultiplied). + let [r, g, b] = [p[0], p[1], p[2]].map(|v| (f32::from(v) / 255.0 / a).min(1.0)); + let y = 0.299 * r + 0.587 * g + 0.114 * b; + let (i, q) = (0.596 * r - 0.274 * g - 0.322 * b, 0.211 * r - 0.523 * g + 0.312 * b); + let c = i.hypot(q); + let mut keep = 1.0f32; + if y + c > 1.1 { + keep = keep.min((1.1 - y) / c); + } + if y - c < -0.2 { + keep = keep.min((y + 0.2) / c); + } + if keep >= 1.0 || !keep.is_finite() { + continue; + } + let (i, q) = (i * keep.max(0.0), q * keep.max(0.0)); + let rgb = [y + 0.956 * i + 0.621 * q, y - 0.272 * i - 0.647 * q, y - 1.106 * i + 1.703 * q]; + let [r, g, b] = rgb.map(|v| (v.clamp(0.0, 1.0) * a * 255.0).round() as u8); + *p = [r, g, b, p[3]]; + } +} diff --git a/crates/engine/src/tests_rasterfilters.rs b/crates/engine/src/tests_rasterfilters.rs index 7c247717..dc2b0dda 100644 --- a/crates/engine/src/tests_rasterfilters.rs +++ b/crates/engine/src/tests_rasterfilters.rs @@ -21,6 +21,10 @@ const EFFECTS: [(&str, &str); 3] = [ const PIXELATE: [(&str, &str); 4] = [("pixelate.colorHalftone", "{}"), ("pixelate.crystallize", "{}"), ("pixelate.mezzotint", "{}"), ("pixelate.pointillize", "{}")]; +/// Effect › Video (NTSC Colors leaves the striped art's legal colours as they are: see +/// `ntsc_colors_draws_saturated_yellow_safer`). +const VIDEO: [(&str, &str); 1] = [("video.deinterlace", r#"{"create": "interpolation"}"#)]; + /// A group of a red square and a darker red stripe across it; returns the group's id. fn striped() -> (Session, u64) { let mut s = Session::new(); @@ -57,9 +61,11 @@ fn listed_applied_edited_and_undone() { let menus: Vec = EFFECTS.iter().map(|(id, _)| list["catalog"].as_array().unwrap().iter().find(|e| e["id"] == *id).unwrap()["menu"].clone()).collect(); assert_eq!(menus, [json!(["Effect", "Blur"]), json!(["Effect", "Blur"]), json!(["Effect", "Sharpen"])]); - for (id, _) in PIXELATE { - let e = list["catalog"].as_array().unwrap().iter().find(|e| e["id"] == id).unwrap_or_else(|| panic!("{id} listed")); - assert_eq!((&e["raster"], &e["menu"]), (&json!(true), &json!(["Effect", "Pixelate"])), "{id}"); + for (group, menu) in [(PIXELATE.as_slice(), "Pixelate"), (VIDEO.as_slice(), "Video"), ([("video.ntscColors", "{}")].as_slice(), "Video")] { + for (id, _) in group { + let e = list["catalog"].as_array().unwrap().iter().find(|e| e["id"] == *id).unwrap_or_else(|| panic!("{id} listed")); + assert_eq!((&e["raster"], &e["menu"]), (&json!(true), &json!(["Effect", menu])), "{id}"); + } } // Junk parameters are stored as given and read clamped; the canvas still draws. for (id, _) in EFFECTS { @@ -80,7 +86,7 @@ fn listed_applied_edited_and_undone() { #[test] fn each_effect_changes_the_canvas_and_draws_the_same_twice() { - for (id, params) in EFFECTS.into_iter().chain(PIXELATE) { + for (id, params) in EFFECTS.into_iter().chain(PIXELATE).chain(VIDEO) { let (mut s, g) = striped(); let plain = render(&s); let params: Value = serde_json::from_str(params).unwrap(); @@ -109,7 +115,7 @@ fn spin_blur_reaches_past_the_corners() { #[test] fn pdf_and_svg_write_the_effected_object_as_an_image() { - for (id, params) in EFFECTS.into_iter().chain(PIXELATE) { + for (id, params) in EFFECTS.into_iter().chain(PIXELATE).chain(VIDEO) { let (mut s, g) = striped(); let params: Value = serde_json::from_str(params).unwrap(); s.execute("effect.apply", &json!({"effect": id, "ids": [g], "params": params})).unwrap(); @@ -140,3 +146,22 @@ fn expand_appearance_makes_an_image() { s.execute("effect.expandAppearance", &json!({"ids": [g]})).unwrap(); assert!(matches!(s.doc().unwrap().doc.node(NodeId(g)).unwrap().kind, NodeKind::Image(_))); } + +/// Video › NTSC Colors on the canvas: a saturated yellow, too strong for a television signal, draws +/// less saturated; the effect is listed and applies without options. +#[test] +fn ntsc_colors_draws_saturated_yellow_safer() { + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 200, "height": 200})).unwrap(); + let id = s.execute("shape.rectangle", &json!({"x": 50, "y": 50, "width": 100, "height": 100})).unwrap()["id"].as_u64().unwrap(); + s.execute("paint.setFill", &json!({"color": "#ffff00", "ids": [id]})).unwrap(); + s.execute("paint.setStroke", &json!({"none": true, "ids": [id]})).unwrap(); + let before = render(&s); + s.execute("effect.apply", &json!({"effect": "video.ntscColors", "ids": [id]})).unwrap(); + let after = render(&s); + let px = |r: &Rendered| r.pixel(100, 100); + let (a, b) = (px(&before), px(&after)); + assert_eq!(&a[..3], &[255, 255, 0]); + assert!(b[2] > 20 && b[0] < 255 && b[3] == 255, "less saturated: {b:?}"); + assert_eq!(after.pixels, render(&s).pixels, "deterministic"); +} diff --git a/crates/engine/tests/command_sweep.rs b/crates/engine/tests/command_sweep.rs index 37691b87..41002fa4 100644 --- a/crates/engine/tests/command_sweep.rs +++ b/crates/engine/tests/command_sweep.rs @@ -282,6 +282,8 @@ fn structured_junk() { ("effect.apply", json!({"effect": "pixelate.crystallize", "params": {"cellSize": -1e308}})), ("effect.apply", json!({"effect": "pixelate.mezzotint", "params": {"type": 5}})), ("effect.apply", json!({"effect": "pixelate.pointillize", "params": {"cellSize": "NaN"}})), + ("effect.apply", json!({"effect": "video.deinterlace", "params": {"eliminate": 7, "create": ["x"]}})), + ("effect.apply", json!({"effect": "video.ntscColors", "params": {"junk": 1e308}})), ("effect.apply", json!({"effect": "no.such.effect"})), ("effect.remove", json!({"index": 99})), ("effect.setParams", json!({"index": 0, "params": null})), diff --git a/crates/render/src/fx.rs b/crates/render/src/fx.rs index 839ca8ba..36712244 100644 --- a/crates/render/src/fx.rs +++ b/crates/render/src/fx.rs @@ -601,7 +601,9 @@ impl Renderer { Ink::Display if f.doc.color_mode == vectorcraft_doc::ColorMode::Cmyk => effects::pixel::Channels::Cmyk, Ink::Display => effects::pixel::Channels::Rgb, }; - let space = effects::PixelSpace { to_doc, px, center: content.reach.center(), channels }; + // De-Interlace's field lines: the rows of the document's raster grid (1 to 2400 ppi). + let ppi = Some(f.doc.raster_effects_ppi).filter(|v| v.is_finite()).unwrap_or(72.0).clamp(1.0, 2400.0); + let space = effects::PixelSpace { to_doc, px, center: content.reach.center(), channels, line: 72.0 / ppi }; let (wz, hz) = (wu as usize, hu as usize); for fx in chain { match fx { diff --git a/crates/ui-egui/src/dialogs/effect.rs b/crates/ui-egui/src/dialogs/effect.rs index d8ee9228..cc4638e5 100644 --- a/crates/ui-egui/src/dialogs/effect.rs +++ b/crates/ui-egui/src/dialogs/effect.rs @@ -160,6 +160,8 @@ fn choices(effect: &str, key: &str) -> Option { ("blur.radial", "quality") => Some(&[("Draft", "draft"), ("Good", "good"), ("Best", "best")]), ("blur.smart", "quality") => Some(&[("Low", "low"), ("Medium", "medium"), ("High", "high")]), ("pixelate.mezzotint", "type") => Some(&vectorcraft_effects::pixel::MEZZOTINT_TYPES), + ("video.deinterlace", "eliminate") => Some(&[("Odd Fields", "odd"), ("Even Fields", "even")]), + ("video.deinterlace", "create") => Some(&[("Duplication", "duplication"), ("Interpolation", "interpolation")]), ("path.offsetPath", "joins") => Some(&[("Miter", "miter"), ("Round", "round"), ("Bevel", "bevel")]), ("distort.roughen" | "distort.zigZag", "points") => Some(&[("Smooth", "smooth"), ("Corner", "corner")]), _ => None, diff --git a/crates/ui-egui/src/dialogs/form.rs b/crates/ui-egui/src/dialogs/form.rs index dabe213f..bb1c2079 100644 --- a/crates/ui-egui/src/dialogs/form.rs +++ b/crates/ui-egui/src/dialogs/form.rs @@ -357,6 +357,7 @@ pub(super) fn humanize(k: &str) -> String { "Channel4" => "Channel 4:".into(), "Include Cmy Blacks" => "Include Blacks with CMY:".into(), "Align To Path" => "Align to Path:".into(), + "Create" => "Create New Fields by:".into(), _ => format!("{s}:"), } } diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index b5d3514b..75663b9c 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -657,3 +657,6 @@ Crystallize… Krystalizace… Mezzotint… Mezzotinta… Pointillize… Pointilismus… + Video Video + De-Interlace… Odstranit prokládání… + NTSC Colors Barvy NTSC diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index b20f295b..c478e40a 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -3871,3 +3871,13 @@ axis Both Ambos @msg the PSD file is cut short el archivo PSD está incompleto @msg the PSD file's header is damaged el encabezado del archivo PSD está dañado @msg the PSD file's image data can't be read: {e} no se pueden leer los datos de imagen del archivo PSD: {e} + Video Video + De-Interlace… Desentrelazar… + De-Interlace Desentrelazar + NTSC Colors Colores NTSC + Eliminate Eliminar + Create New Fields by Crear campos nuevos por + Odd Fields Campos impares + Even Fields Campos pares + Duplication Duplicación + Interpolation Interpolación diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 42247428..66c7b441 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -3882,3 +3882,13 @@ axis Both Les deux @msg the PSD file is cut short le fichier PSD est tronqué @msg the PSD file's header is damaged l'en-tête du fichier PSD est endommagé @msg the PSD file's image data can't be read: {e} les données d'image du fichier PSD ne peuvent pas être lues : {e} + Video Vidéo + De-Interlace… Désentrelacement… + De-Interlace Désentrelacement + NTSC Colors Couleurs NTSC + Eliminate Supprimer + Create New Fields by Créer des trames par + Odd Fields Trames impaires + Even Fields Trames paires + Duplication Duplication + Interpolation Interpolation diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index a5ddf4b2..d52a4684 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -3871,3 +3871,13 @@ axis Both Entrambi @msg the PSD file is cut short il file PSD è troncato @msg the PSD file's header is damaged l'intestazione del file PSD è danneggiata @msg the PSD file's image data can't be read: {e} i dati immagine del file PSD non possono essere letti: {e} + Video Video + De-Interlace… Deinterlaccia… + De-Interlace Deinterlaccia + NTSC Colors Colori NTSC + Eliminate Elimina + Create New Fields by Crea nuovi campi per + Odd Fields Campi dispari + Even Fields Campi pari + Duplication Duplicazione + Interpolation Interpolazione diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 8e8bdb72..e7bf737c 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -3863,3 +3863,13 @@ theme Appearance 外観 @msg the PSD file is cut short PSD ファイルが途中で切れています @msg the PSD file's header is damaged PSD ファイルのヘッダーが破損しています @msg the PSD file's image data can't be read: {e} PSD ファイルの画像データを読み込めません:{e} + Video ビデオ + De-Interlace… インターレース解除… + De-Interlace インターレース解除 + NTSC Colors NTSC カラー + Eliminate 削除 + Create New Fields by 新規フィールドの作成 + Odd Fields 奇数フィールド + Even Fields 偶数フィールド + Duplication 複製 + Interpolation 補間 diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 6325bef5..2d5b50bc 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -2718,3 +2718,6 @@ Crystallize… Cristalizar… Mezzotint… Meia-Tinta… Pointillize… Pontilhar… + Video Vídeo + De-Interlace… Desentrelaçar… + NTSC Colors Cores NTSC diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index db075b06..ac10520a 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -3869,3 +3869,13 @@ axis Both Оба @msg the PSD file is cut short файл PSD обрезан @msg the PSD file's header is damaged заголовок файла PSD повреждён @msg the PSD file's image data can't be read: {e} не удаётся прочитать данные изображения файла PSD: {e} + Video Видео + De-Interlace… Устранение чересстрочности… + De-Interlace Устранение чересстрочности + NTSC Colors Цвета NTSC + Eliminate Удалить + Create New Fields by Создать новые поля + Odd Fields Нечётные поля + Even Fields Чётные поля + Duplication Дублированием + Interpolation Интерполяцией diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 3e22811c..98808989 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -3854,3 +3854,13 @@ axis Both Обидві @msg the PSD file is cut short файл PSD обрізаний @msg the PSD file's header is damaged заголовок файлу PSD пошкоджено @msg the PSD file's image data can't be read: {e} не вдається прочитати дані зображення файлу PSD: {e} + Video Відео + De-Interlace… Усунення черезрядковості… + De-Interlace Усунення черезрядковості + NTSC Colors Кольори NTSC + Eliminate Вилучити + Create New Fields by Створити нові поля + Odd Fields Непарні поля + Even Fields Парні поля + Duplication Дублюванням + Interpolation Інтерполяцією diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 7260b61f..2ede88ca 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -3504,3 +3504,13 @@ axis Both 两者 Draft 草稿 Good 良好 Best 最佳 + Video 视频 + De-Interlace… 逐行… + De-Interlace 逐行 + NTSC Colors NTSC 颜色 + Eliminate 消除 + Create New Fields by 创建新场方式 + Odd Fields 奇数场 + Even Fields 偶数场 + Duplication 复制 + Interpolation 插值 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 66a94c81..d36b1ed5 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -3282,3 +3282,13 @@ axis Both 兩者 Draft 草稿 Good 良好 Best 最佳 + Video 視訊 + De-Interlace… 反交錯… + De-Interlace 反交錯 + NTSC Colors NTSC 色彩 + Eliminate 消除 + Create New Fields by 建立新圖場以 + Odd Fields 奇數圖場 + Even Fields 偶數圖場 + Duplication 複製 + Interpolation 內插 diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index 7625dd2a..af99d78c 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -3305,8 +3305,8 @@ fn font_items(english_names: bool) -> Vec { /// The raster effects' submenus of the Effect menu (the Photoshop-style effects, below the /// vector effects): (submenu, the catalogue's menu path of its effects). -const RASTER_MENUS: [(&str, &[&str]); 3] = - [("Blur", &["Effect", "Blur"]), ("Pixelate", &["Effect", "Pixelate"]), ("Sharpen", &["Effect", "Sharpen"])]; +const RASTER_MENUS: [(&str, &[&str]); 4] = + [("Blur", &["Effect", "Blur"]), ("Pixelate", &["Effect", "Pixelate"]), ("Sharpen", &["Effect", "Sharpen"]), ("Video", &["Effect", "Video"])]; /// The Effect menu, built from the effects catalogue (vector effects), plus raster effects. fn effect_menu() -> Vec { diff --git a/crates/ui-egui/src/tests_labels.rs b/crates/ui-egui/src/tests_labels.rs index d68dc9a7..cafc0f4a 100644 --- a/crates/ui-egui/src/tests_labels.rs +++ b/crates/ui-egui/src/tests_labels.rs @@ -64,6 +64,20 @@ fn effect_menu_lists_the_pixelate_filters_between_blur_and_sharpen() { assert!(at("Blur") < at("Pixelate") && at("Pixelate") < at("Sharpen")); } +/// Effect › Video, after Sharpen: De-Interlace opens its dialog, NTSC Colors (no options) applies. +#[test] +fn effect_menu_lists_the_video_filters_last() { + let app = app(); + let entries = menus::menu_entries(&app); + let video: Vec<_> = entries.iter().filter(|e| e.path == ["Effect", "Video"]).collect(); + let items: Vec<(&str, Option<&str>)> = video.iter().map(|e| (e.label.as_str(), e.command.as_deref())).collect(); + assert_eq!(items, [("De-Interlace…", Some("effect.dialog")), ("NTSC Colors", Some("effect.apply"))]); + let raster: Vec<&str> = + entries.iter().filter_map(|e| e.path.get(1).filter(|_| e.path.len() == 2 && e.path[0] == "Effect")).map(String::as_str).collect(); + let at = |name: &str| raster.iter().position(|s| *s == name).unwrap(); + assert!(at("Sharpen") < at("Video")); +} + #[test] fn library_submenus_are_disabled_placeholders() { let app = app();