From 2ffaa673fedab7f562a0c4477ada46256396b657 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 14 Nov 2026 22:12:33 -0800 Subject: [PATCH 01/49] 3D and Materials: graphics map onto Inflate objects A Materials-tab graphic now lies on Inflate's puffed front, and on its puffed back when Both sides and Cap are on. The graphic is placed in the art's plane with the same X, Y, Scale and Rotation as on a cap and is carried straight out onto the puff, so it follows the membrane; Twist and Taper turn and shrink the back's graphics with it. The membrane is cut into triangles that draw their part of the graphic shaded with them and only where the outside faces the viewer, in Revolve's side order with its seams and limits. The blue handle sits on the puffed face. threeD.mapGraphic refuses a back graphic on Inflate without Both sides and Cap, and changing the type to Inflate keeps the graphics. The panel note, the params text and docs/three-d.md, docs/mcp.md and docs/effects-parity.md list Inflate. --- crates/effects/src/catalog.rs | 4 +- crates/effects/src/revolve.rs | 10 +- crates/effects/src/revolve/tests_graphics.rs | 6 +- crates/effects/src/solids.rs | 155 ++++++++++- crates/effects/src/solids/graphics.rs | 243 ++++++++++++++---- crates/effects/src/solids/tests.rs | 2 + crates/effects/src/solids/tests_graphics.rs | 85 +++++- crates/engine/src/cmd/effectcmd/graphics.rs | 12 +- .../src/cmd/effectcmd/graphics_tests.rs | 33 ++- crates/three-d/src/solid.rs | 16 +- crates/three-d/src/solid/build.rs | 2 + crates/three-d/src/solid/inflate.rs | 65 ++++- crates/three-d/src/solid/tests.rs | 43 +++- .../ui-egui/src/dialogs/three_d_materials.rs | 6 +- crates/ui-egui/src/i18n/ca.tsv | 2 +- crates/ui-egui/src/i18n/cs.tsv | 2 +- crates/ui-egui/src/i18n/da.tsv | 2 +- crates/ui-egui/src/i18n/de.tsv | 2 +- crates/ui-egui/src/i18n/el.tsv | 2 +- crates/ui-egui/src/i18n/es.tsv | 4 +- crates/ui-egui/src/i18n/fi.tsv | 2 +- crates/ui-egui/src/i18n/fr.tsv | 2 +- crates/ui-egui/src/i18n/gu.tsv | 2 +- crates/ui-egui/src/i18n/hi.tsv | 2 +- crates/ui-egui/src/i18n/hu.tsv | 2 +- crates/ui-egui/src/i18n/it.tsv | 2 +- crates/ui-egui/src/i18n/ja.tsv | 4 +- crates/ui-egui/src/i18n/ka.tsv | 2 +- crates/ui-egui/src/i18n/ko.tsv | 2 +- crates/ui-egui/src/i18n/nl.tsv | 2 +- crates/ui-egui/src/i18n/pl.tsv | 2 +- crates/ui-egui/src/i18n/pt-br.tsv | 2 +- crates/ui-egui/src/i18n/ru.tsv | 2 +- crates/ui-egui/src/i18n/sv.tsv | 2 +- crates/ui-egui/src/i18n/tr.tsv | 2 +- crates/ui-egui/src/i18n/uk.tsv | 2 +- crates/ui-egui/src/i18n/vi.tsv | 2 +- crates/ui-egui/src/i18n/zh-hans.tsv | 4 +- crates/ui-egui/src/i18n/zh-hant.tsv | 4 +- crates/ui-egui/src/panels/tests_three_d.rs | 8 +- docs/effects-parity.md | 2 +- docs/mcp.md | 8 +- docs/three-d.md | 29 ++- 43 files changed, 656 insertions(+), 131 deletions(-) diff --git a/crates/effects/src/catalog.rs b/crates/effects/src/catalog.rs index 1c1ca96d9f..06db1cb2b3 100644 --- a/crates/effects/src/catalog.rs +++ b/crates/effects/src/catalog.rs @@ -196,8 +196,8 @@ pub fn effect_catalog() -> Vec { INFLATE, "Inflate…", &["Effect", "3D and Materials"], - "{depth: pt (0..2000, 0; flat depth between front and back), twist: degrees (0..360, 0; the back turned against the front), taper: % (1..100, 100; the back's size), cap: bool (true: solid; false: no back, a shell open behind), volume: % (0..100, 50; 50 rounds the edge like a half sphere), bothSides: bool (false: flat back), rotationX: degrees (-180..180, -21.88), rotationY: degrees (-180..180, -23.4), rotationZ: degrees (-180..180, 9.06; the defaults are the Off-Axis Front position), perspectiveAngle: degrees (0..160, 0; 0 is none, wider brings the eye nearer), perspective: % (0..100; the earlier form, read as the perspectiveAngle that shows the same view), shade: bool (true), lightColor: #rrggbb (white, #ffffff; legacy directional light color), lights: null or array of 1..10 objects (color: #rrggbb, intensity: % 0..100, rotation: degrees -180..180, height: degrees 0..90, softness: % 0..100, behind: bool; overrides the single-light fields; ambient is shared), lightRotation: degrees (-180..180, 125.26; round the object on the page, 0 on its right, counterclockwise), lightHeight: degrees (0..90, 30; 0 beside the object, 90 straight in front), lightBehind: bool (false; true lights it from behind), lightIntensity: % (0..100, 80), lightSoftness: % (0..100, 0; how far round the object the light reaches), ambient: % (0..200, 25; Ambient Light), lightAzimuth: degrees (the earlier form: with lightElevation, read as the lightRotation, lightHeight and lightBehind of the same light), lightElevation: degrees (the earlier form, with lightAzimuth), shadow: bool (false; the first light casts a hard-edged shadow, black at 50% times the art's opacity), shadowPosition: behind|below (behind; behind: on a plane square to the view, below: on the floor under the object, turned with it), shadowDistance: % (0..100, 0; how far the plane is from the object, as a share of its largest size), shadowBounds: % (10..400, 100; how far the plane reaches: at 100 it is four times the object's largest size across)}. Painted with the top fill (else the top stroke).", - json!({"depth":0.0,"twist":0.0,"taper":100.0,"cap":true,"volume":50.0,"bothSides":false,"rotationX":-21.88,"rotationY":-23.4,"rotationZ":9.06,"perspectiveAngle":0.0,"shade":true,"lightColor":"#ffffff","lights":null,"lightRotation":125.26438968275465,"lightHeight":30.0,"lightBehind":false,"lightIntensity":80.0,"lightSoftness":0.0,"ambient":25.0,"shadow":false,"shadowPosition":"behind","shadowDistance":0.0,"shadowBounds":100.0}), + "{depth: pt (0..2000, 0; flat depth between front and back), twist: degrees (0..360, 0; the back turned against the front), taper: % (1..100, 100; the back's size), cap: bool (true: solid; false: no back, a shell open behind), volume: % (0..100, 50; 50 rounds the edge like a half sphere), bothSides: bool (false: flat back), rotationX: degrees (-180..180, -21.88), rotationY: degrees (-180..180, -23.4), rotationZ: degrees (-180..180, 9.06; the defaults are the Off-Axis Front position), perspectiveAngle: degrees (0..160, 0; 0 is none, wider brings the eye nearer), perspective: % (0..100; the earlier form, read as the perspectiveAngle that shows the same view), shade: bool (true), lightColor: #rrggbb (white, #ffffff; legacy directional light color), lights: null or array of 1..10 objects (color: #rrggbb, intensity: % 0..100, rotation: degrees -180..180, height: degrees 0..90, softness: % 0..100, behind: bool; overrides the single-light fields; ambient is shared), lightRotation: degrees (-180..180, 125.26; round the object on the page, 0 on its right, counterclockwise), lightHeight: degrees (0..90, 30; 0 beside the object, 90 straight in front), lightBehind: bool (false; true lights it from behind), lightIntensity: % (0..100, 80), lightSoftness: % (0..100, 0; how far round the object the light reaches), ambient: % (0..200, 25; Ambient Light), lightAzimuth: degrees (the earlier form: with lightElevation, read as the lightRotation, lightHeight and lightBehind of the same light), lightElevation: degrees (the earlier form, with lightAzimuth), shadow: bool (false; the first light casts a hard-edged shadow, black at 50% times the art's opacity), shadowPosition: behind|below (behind; behind: on a plane square to the view, below: on the floor under the object, turned with it), shadowDistance: % (0..100, 0; how far the plane is from the object, as a share of its largest size), shadowBounds: % (10..400, 100; how far the plane reaches: at 100 it is four times the object's largest size across), graphics: array of 0..64 objects ([]; the 3D and Materials panel's Graphics on the puffed front and back, see threeD.mapGraphic: symbol: name of a document symbol, face: front|back (front; the back reads left to right as seen from behind and takes graphics with bothSides and cap on), x: pt (0; the offset of the graphic's center from the center of the object's bounds, in the art's plane), y: pt (0), scale: % (1..10000, 100; of the symbol's own size), rotation: degrees (-360..360, 0; counterclockwise); carried straight out from the art's plane onto the puffed face, twist and taper turning and shrinking the back's with it, shaded with the surface and drawn only where its outside faces the viewer)}. Painted with the top fill (else the top stroke).", + json!({"depth":0.0,"twist":0.0,"taper":100.0,"cap":true,"volume":50.0,"bothSides":false,"rotationX":-21.88,"rotationY":-23.4,"rotationZ":9.06,"perspectiveAngle":0.0,"shade":true,"lightColor":"#ffffff","lights":null,"lightRotation":125.26438968275465,"lightHeight":30.0,"lightBehind":false,"lightIntensity":80.0,"lightSoftness":0.0,"ambient":25.0,"shadow":false,"shadowPosition":"behind","shadowDistance":0.0,"shadowBounds":100.0,"graphics":[]}), ), g( ROTATE, diff --git a/crates/effects/src/revolve.rs b/crates/effects/src/revolve.rs index a9c9482d1d..7c2ac3ff56 100644 --- a/crates/effects/src/revolve.rs +++ b/crates/effects/src/revolve.rs @@ -6,7 +6,7 @@ use serde_json::Value; use vectorcraft_doc::color::{Color, Paint}; use vectorcraft_doc::{Appearance, AppearanceItem, Document, Effect, FillLayer, Node, NodeId, NodeKind}; use vectorcraft_geom::{PathData, PathEl, Point, Rect, Vec2}; -use vectorcraft_three_d::{Edge, Revolve, SolidFaces}; +use vectorcraft_three_d::{Edge, PlanarFace, Revolve, SolidFaces}; use crate::solids::wireframe::WireFace; use crate::solids::{ @@ -162,7 +162,7 @@ pub(crate) fn validate_in(doc: Option<&Document>, n: &Node, id: &str, p: &Value) // With no member to carry them, the graphics' art must still fit its limits. None => { crate::solids::graphics::validate_symbols(doc, p)?; - crate::solids::graphics::validate_surface_symbols(doc, p)?; + crate::solids::graphics::validate_surface_symbols(doc, p, PlanarFace::Front)?; } } } @@ -191,10 +191,10 @@ fn check_graphics(doc: Option<&Document>, id: &str, path: &PathData, b: Rect, op let graphics = crate::solids::mapped_graphics(p); let Some(doc) = doc.filter(|_| id == REVOLVE && !graphics.is_empty()) else { return Ok(()) }; crate::solids::graphics::validate_symbols(doc, p)?; - crate::solids::graphics::validate_surface_symbols(doc, p)?; + crate::solids::graphics::validate_surface_symbols(doc, p, PlanarFace::Front)?; let faces = vectorcraft_three_d::revolve(path, b, options)?; let mut used = *copies; - match crate::solids::graphics::surface_parts(Some(doc), NodeId(0), &graphics, &faces, &|_, c| Paint::solid(c), &mut used) { + match crate::solids::graphics::surface_parts(Some(doc), NodeId(0), (&graphics, PlanarFace::Front), &faces, &|_, c| Paint::solid(c), &mut used) { Some(_) => { *copies = used; Ok(()) @@ -481,7 +481,7 @@ fn surface( let mut parts = if graphics.is_empty() { vec![] } else { - match crate::solids::graphics::surface_parts(doc, n.id, &graphics, &faces, &shade, &mut used) { + match crate::solids::graphics::surface_parts(doc, n.id, (&graphics, PlanarFace::Front), &faces, &shade, &mut used) { Some(parts) => { copies.graphics = used; parts diff --git a/crates/effects/src/revolve/tests_graphics.rs b/crates/effects/src/revolve/tests_graphics.rs index 5d9500628b..0d39d6dfe1 100644 --- a/crates/effects/src/revolve/tests_graphics.rs +++ b/crates/effects/src/revolve/tests_graphics.rs @@ -365,7 +365,8 @@ fn revolve_takes_graphics_on_its_side_only() { let kept = three_d_params_as(crate::EXTRUDE, &both, REVOLVE); assert_eq!(kept["graphics"].as_array().map(Vec::len), Some(1)); assert_eq!(kept["graphics"][0]["symbol"], "Red"); - assert_eq!(three_d_params_as(REVOLVE, &front, crate::INFLATE).get("graphics"), None); + // Inflate keeps them, and its front takes them. + assert_eq!(three_d_params_as(REVOLVE, &front, crate::INFLATE)["graphics"], front["graphics"]); } #[test] @@ -503,7 +504,8 @@ fn the_copies_of_a_graphics_paint_have_a_budget_of_their_own() { let faces = vectorcraft_three_d::revolve(path, path.bounds().unwrap(), options_of(REVOLVE, &p)).unwrap(); let parts_of = |symbol: &str, copies: &mut usize| { let graphics = crate::solids::mapped_graphics(&json!({"graphics": [{"symbol": symbol}]})); - crate::solids::graphics::surface_parts(Some(&d), NodeId(0), &graphics, &faces, &|_, c| Paint::solid(c), copies).map(|p| p.concat().len()) + crate::solids::graphics::surface_parts(Some(&d), NodeId(0), (&graphics, PlanarFace::Front), &faces, &|_, c| Paint::solid(c), copies) + .map(|p| p.concat().len()) }; // Each opaque part copies the paint into its fill and its seam stroke; a part with // transparent stops takes no seam stroke and copies it once. diff --git a/crates/effects/src/solids.rs b/crates/effects/src/solids.rs index c0d44947d7..b8323084f8 100644 --- a/crates/effects/src/solids.rs +++ b/crates/effects/src/solids.rs @@ -173,6 +173,7 @@ pub fn inflate_options(p: &Value) -> Inflate { twist: num(p, "twist", 0.0), taper: num(p, "taper", 100.0) / 100.0, cap: flag(p, "cap", true), + map_surface: false, } } @@ -324,6 +325,7 @@ fn validate_solid_for(doc: Option<&Document>, n: &Node, id: &str, p: &Value, at: let b = union_bounds(&shapes).ok_or_else(|| format!("{label} requires a group holding a shape with at least two anchors"))?; check_profiles(id, p, &shapes, b)?; check_solids(id, p, &shapes)?; + check_membrane_graphics(doc, n, id, p, &shapes)?; return cast_shadow(id, p, &shapes).map(|_| ()); } let (path, rule) = object_profile(n, label)?; @@ -342,9 +344,33 @@ fn validate_solid_for(doc: Option<&Document>, n: &Node, id: &str, p: &Value, at: let shapes = [Profile { path, rule, items, opacity: 1.0, scopes: vec![] }]; check_profiles(id, p, &shapes, b)?; check_solids(id, p, &shapes)?; + check_membrane_graphics(doc, n, id, p, &shapes)?; cast_shadow(id, p, &shapes).map(|_| ()) } +/// An error when the graphics of Inflate `id` with parameters `p`, with the symbols of `doc`, are +/// past their limits on the front and puffed back of the solids of `shapes`: their art, or the +/// parts they draw on its pieces ([`graphics::surface_parts`]), or when the solids can't be built +/// with their pieces carrying the graphics. They are built as the art builds them +/// ([`surfaces_with`]). Without `doc` nothing is drawn, and nothing is checked. +fn check_membrane_graphics(doc: Option<&Document>, n: &Node, id: &str, p: &Value, shapes: &[Profile]) -> Result<(), String> { + let Some(doc) = doc else { return Ok(()) }; + if id != INFLATE || mapped_graphics(p).is_empty() { + return Ok(()); + } + for face in PlanarFace::ALL { + graphics::validate_surface_symbols(doc, p, face)?; + } + let fx = Effect { id: id.into(), params: p.clone(), visible: true }; + let mut dropped = false; + // Art that can't be built with the graphics draws without them. + let built = surfaces_with(Some(doc), n, &fx, shapes, false, true, &mut dropped); + if dropped || built.is_none() { + return Err("The graphics are too complex: simplify the symbols' art".into()); + } + Ok(()) +} + /// Do the solids 3D effect `id` with parameters `p` builds from the profiles of `shapes` about `b` /// build? Only the profiles no solid of [`check_solids`] is built from are built here: every /// shape's for Rotate, and for Extrude & Bevel and Inflate the profile of a shape with no fill, @@ -632,6 +658,55 @@ fn surface(n: &Node, facets: Vec, paint: &Paint, opacity: f32, blend: Ble group } +/// The parts of `graphics` that fall on each of `facets`, the facets of one of Inflate's solids in +/// drawing order, built with their front and puffed back carrying the graphics +/// ([`vectorcraft_three_d::Inflate::map_surface`]): for each facet, the parts of the graphics on +/// its face to draw right after it ([`graphics::surface_parts`]), shaded as a solid color is on +/// that facet. `copies` counts the bytes of the paint copies of the object's graphics. `None` past +/// the graphics' limits. +fn membrane_parts( + doc: Option<&Document>, + id: NodeId, + graphics: &[MappedGraphic], + facets: &[Facet], + copies: &mut usize, +) -> Option>>> { + let shade = |f: &graphics::OnFace<'_>, c: vectorcraft_doc::color::Color| Paint::solid(crate::lighting::shade(c, f.facet.illumination)); + let mut out: Vec>> = vec![vec![]; facets.len()]; + for face in PlanarFace::ALL.into_iter().filter(|face| graphics.iter().any(|g| g.face == *face)) { + let on: Vec> = facets.iter().map(|facet| graphics::OnFace { facet, face }).collect(); + let parts = graphics::surface_parts(doc, id, (graphics, face), &on, &shade, copies)?; + for (slot, extra) in out.iter_mut().zip(parts) { + slot.extend(extra); + } + } + Some(out) +} + +/// `surface`, a plain group of one face for each facet ([`surface`]), with each face followed by +/// the parts of the graphics that `parts` holds for its facet ([`membrane_parts`]): a face with +/// parts becomes a group of the face and its parts, so nearer faces drawn after it cover them too. +/// `surface` is returned as it is when no facet has a part or it is not such a group. +fn with_surface_parts(id: NodeId, mut surface: Node, parts: Vec>>) -> Node { + if parts.iter().all(Vec::is_empty) { + return surface; + } + let NodeKind::Group { children, clip: false } = &mut surface.kind else { return surface }; + if children.len() != parts.len() { + return surface; + } + for (child, extra) in children.iter_mut().zip(parts) { + if extra.is_empty() { + continue; + } + let mut list = Vec::with_capacity(extra.len() + 1); + list.push(child.clone()); + list.extend(extra); + *child = Arc::new(Node::group(id, list)); + } + surface +} + /// The width of the stroke of a facet's own paint that closes the seams between `face` and its /// neighbors. No wider than the facet is thick: seen at a grazing angle a facet can be thinner than /// the stroke, and its stroke would then paint over its neighbors. @@ -740,7 +815,7 @@ fn built_solids<'a>( bounds: Rect, limit: usize, ) -> impl Iterator>, String>> + 'a { - built_solids_cast(id, p, parts, bounds, limit, false).map(|r| r.map(|s| s.map(|(f, _)| f))) + built_solids_cast(id, p, parts, bounds, limit, false, false).map(|r| r.map(|s| s.map(|(f, _)| f))) } /// One solid's facets and, when its shadow is cast, the faces it is cast from. @@ -751,7 +826,9 @@ type CastingSolid = (Vec, Option); type SurfacesAndFaces = (Vec>, Vec>); /// [`built_solids`], and with `cast` for Extrude & Bevel or Inflate each solid's faces its shadow -/// is cast from, from the same build ([`SolidFaces`]). +/// is cast from, from the same build ([`SolidFaces`]). With `membrane`, Inflate's solids are built +/// with the pieces of their front and puffed back carrying where they lie in the art's plane, for +/// the graphics drawn on them ([`vectorcraft_three_d::Inflate::map_surface`]). fn built_solids_cast<'a>( id: &'a str, p: &'a Value, @@ -759,11 +836,12 @@ fn built_solids_cast<'a>( bounds: Rect, limit: usize, cast: bool, + membrane: bool, ) -> impl Iterator, String>> + 'a { // Inflate's eye is placed for every puff together, as far away as the highest needs. let mut inflated = (id == INFLATE).then(|| -> Box>> { let shapes: Vec<(&PathData, FillRule)> = parts.iter().map(|(_, _, area, rule, _, _)| (area, *rule)).collect(); - let (o, view) = (inflate_options(p), view_options(p)); + let (o, view) = (Inflate { map_surface: membrane, ..inflate_options(p) }, view_options(p)); if cast { Box::new(vectorcraft_three_d::inflate_shadowed(&shapes, bounds, o, view).map(|r| r.map(|(f, faces)| (f, Some(faces))))) } else { @@ -1720,8 +1798,32 @@ fn seen_ends(f: &[Facet]) -> impl Iterator { /// [`art_for`] without the shadow: the solids' surfaces, with the graphics mapped onto their planar /// faces drawn right after the last of the solids' surfaces that holds that face. With `cast`, each /// solid built also keeps the faces its shadow is cast from, from the same build, in the order the -/// solids are built ([`cast_built`]); `None` for a stroke's solid left out of the art. +/// solids are built ([`cast_built`]); `None` for a stroke's solid left out of the art. Inflate's +/// graphics are drawn on the pieces of its front and puffed back; when its solids can't be built +/// with those pieces, or the graphics are past their limits on them, the solids draw without them. fn surfaces_for(doc: Option<&Document>, n: &Node, fx: &Effect, shapes: &[Profile], cast: bool) -> Option { + let p = crate::merged_params(&fx.id, &fx.params); + if fx.id == INFLATE && doc.is_some() && !mapped_graphics(&p).is_empty() { + let mut dropped = false; + if let Some(built) = surfaces_with(doc, n, fx, shapes, cast, true, &mut dropped).filter(|_| !dropped) { + return Some(built); + } + } + surfaces_with(doc, n, fx, shapes, cast, false, &mut false) +} + +/// [`surfaces_for`], with `membrane` building Inflate's solids with their front and puffed back +/// carrying the graphics ([`built_solids_cast`]), and setting `dropped` when those graphics are past +/// their limits on the pieces drawn and the solids draw without them. +fn surfaces_with( + doc: Option<&Document>, + n: &Node, + fx: &Effect, + shapes: &[Profile], + cast: bool, + membrane: bool, + dropped: &mut bool, +) -> Option { let b = union_bounds(shapes)?; let p = crate::merged_params(&fx.id, &fx.params); let classic = fx.id == CLASSIC_EXTRUDE || fx.id == CLASSIC_ROTATE; @@ -1766,7 +1868,8 @@ fn surfaces_for(doc: Option<&Document>, n: &Node, fx: &Effect, shapes: &[Profile let (parts, bounds) = solid_parts(shapes, b); let mut solids = vec![]; let mut built = vec![]; - for ((item, opacity, _, _, scopes, member), f) in parts.iter().zip(built_solids_cast(&fx.id, &p, &parts, bounds, MAX_OBJECT_FACES, cast)) { + let made = built_solids_cast(&fx.id, &p, &parts, bounds, MAX_OBJECT_FACES, cast, membrane); + for ((item, opacity, _, _, scopes, member), f) in parts.iter().zip(made) { let item: &AppearanceItem = item; match f { Ok(Some((f, _))) if !crate::revolve::paint_copies_add(&mut paint_bytes, facet_copies(&f, paint_ref(item), colored), paint_ref(item)) => { @@ -1776,8 +1879,12 @@ fn surfaces_for(doc: Option<&Document>, n: &Node, fx: &Effect, shapes: &[Profile solids.push((item, *opacity, *scopes, f, *member)); built.push(faces); } - // A stroke's outline past the limits is left out; the fill's solid still draws. - Ok(None) => built.push(None), + // A stroke's outline past the limits is left out; the fill's solid still draws. Built + // with the graphics' pieces, a stroke past the limits draws without the graphics. + Ok(None) => { + built.push(None); + *dropped |= membrane; + } // A loaded file or a shape edited past the limits (its own, or those of the object's // solids together) keeps drawing its source path instead of failing the frame; // commands validate the same evaluator and report its errors. @@ -1861,6 +1968,9 @@ fn surfaces_for(doc: Option<&Document>, n: &Node, fx: &Effect, shapes: &[Profile // ([`in_one_order`], [`underlaid_surface`]). let seals: Vec = solids.iter().map(|(.., f, _)| underlaid(f, colored)).collect(); let seal = |range: std::ops::Range| seals.get(range).is_some_and(|s| s.iter().any(|s| *s)); + let membrane_graphics = if membrane && graphics_on { mapped_graphics(&p) } else { vec![] }; + // The paint copies of Inflate's graphics, apart from those of the surfaces, as on Revolve. + let mut graphic_copies = 0usize; let surfaces: Vec = solids .into_iter() .map(|(item, member, scopes, f, shape)| { @@ -1868,10 +1978,21 @@ fn surfaces_for(doc: Option<&Document>, n: &Node, fx: &Effect, shapes: &[Profile let depths: Vec = f.iter().map(|f| Placed::of(f, shape, paints)).collect(); let ends = f.iter().map(|f| f.end.filter(|_| !f.away)).collect(); let (paint, opacity, blend) = paint_of(item, member); + // The pieces of Inflate's front and back draw the parts of the graphics that fall on + // them; past the graphics' limits the solid draws without them. + let parts = if membrane_graphics.is_empty() || !f.iter().any(|f| f.surface.is_some()) { + vec![] + } else { + let parts = membrane_parts(doc, n.id, &membrane_graphics, &f, &mut graphic_copies); + *dropped |= parts.is_none(); + parts.unwrap_or_default() + }; + let drawn = parts.iter().any(|p| !p.is_empty()); let art = if classic { classic::surface(n, f, &paint, opacity, blend, &p) } else { - surface(n, f, &paint, opacity, blend, colored, split && shared.get(shape).copied().unwrap_or(false)) + let faces = drawn || (split && shared.get(shape).copied().unwrap_or(false)); + with_surface_parts(n.id, surface(n, f, &paint, opacity, blend, colored, faces), parts) }; (depths, art, scopes, ends) }) @@ -2157,14 +2278,15 @@ fn group_solid_art(doc: Option<&Document>, n: &Node) -> Option { /// Where the graphics of the 3D effect of `n` (on the object itself with `item` `None`, else on its /// fill or stroke `item`) are drawn: the bounds its solids are built with and the maps of their -/// planar faces ([`graphics::GraphicFrame`]). `None` when `n` has no visible Extrude & Bevel or -/// Rotate there, or its art can't be built. +/// planar faces, or Inflate's puffed faces ([`graphics::GraphicFrame`]). `None` when `n` has no +/// visible Extrude & Bevel, Inflate or Rotate there, or its art can't be built. pub fn graphic_frame(doc: Option<&Document>, n: &Node, item: Option) -> Option { frame_of(doc, n, item, &solid) } /// [`graphic_frame`] of the 3D effect at `index` in that list, which must be a visible Extrude & -/// Bevel, Rotate or Revolve. Revolve's frame is its unrolled side seen from the front, centered on +/// Bevel, Rotate, Revolve or Inflate. Inflate's frame places handles on the pieces of its puffed +/// front and back the viewer sees. Revolve's frame is its unrolled side seen from the front, centered on /// the origin, with no face maps: it sizes a new graphic and places no handles. pub fn graphic_frame_at(doc: Option<&Document>, n: &Node, item: Option, index: usize) -> Option { frame_of(doc, n, item, &|fx: &[Effect]| fx.get(index).filter(|e| e.visible && is_three_d(&e.id)).map(|e| (index, e))) @@ -2231,7 +2353,16 @@ fn frame_of(doc: Option<&Document>, n: &Node, item: Option, pick: &Pick<' let plane = vectorcraft_three_d::plane_face_map(b, view); return Some(graphics::GraphicFrame::new(b, plane, None)); } - let (_, bounds) = solid_parts(&shapes, b); + let (parts, bounds) = solid_parts(&shapes, b); + if fx.id == INFLATE { + // Inflate's graphics lie on its puffed front and back: the pieces the viewer sees place + // their handles. Solids that can't be built place none. + let built: Vec = built_solids_cast(INFLATE, &p, &parts, bounds, MAX_OBJECT_FACES, false, true) + .filter_map(|r| r.ok().flatten()) + .flat_map(|(f, _)| f) + .collect(); + return Some(graphics::GraphicFrame::inflated(bounds, graphics::MembraneFrame::of(&built))); + } let options = extrude_options(&p); let map = |face| vectorcraft_three_d::extrude_face_map(bounds, options, view, face); Some(graphics::GraphicFrame::new(bounds, map(PlanarFace::Front), map(PlanarFace::Back))) diff --git a/crates/effects/src/solids/graphics.rs b/crates/effects/src/solids/graphics.rs index 7c0087e15b..1d7e4e8d45 100644 --- a/crates/effects/src/solids/graphics.rs +++ b/crates/effects/src/solids/graphics.rs @@ -13,7 +13,14 @@ //! ([`vectorcraft_three_d::SurfaceCell`]): x and y are the offset of the graphic's center from the //! middle of that surface, x around the axis and y along the profile, and each face of the side //! draws the part of the graphics that falls on it ([`surface_parts`]). +//! +//! On Inflate the graphics lie on the puffed front, and on the puffed back when Both Sides is on: +//! each is placed in the art's plane as on Extrude & Bevel's caps and carried straight out onto +//! the surface above it, so it follows the puff. Each piece of the surface draws the part of the +//! graphics that falls on it, as on Revolve's side, and the twist and taper carry the back's +//! graphics with the back. +use std::borrow::Cow; use std::sync::Arc; use serde_json::{Map, Value, json}; @@ -47,7 +54,7 @@ const MAX_NESTING: usize = 8; const MAX_LEVELS: usize = 4 * vectorcraft_doc::MAX_DEPTH; /// The error for graphics on a 3D effect that takes none. -pub const NOT_TAKEN: &str = "Graphics map onto the Plane, Extrude and Revolve object types"; +pub const NOT_TAKEN: &str = "Graphics map onto the Plane, Extrude, Revolve and Inflate object types"; /// The buckets around the unrolled side surface that the pieces of Revolve's graphics are sorted /// into, so each face looks only at the pieces near it. @@ -148,10 +155,10 @@ impl MappedGraphic { } } -/// The 3D effects that take graphics: Extrude & Bevel (its caps), Rotate (the plane) and Revolve -/// (its swept side). +/// The 3D effects that take graphics: Extrude & Bevel (its caps), Rotate (the plane), Revolve (its +/// swept side) and Inflate (its puffed front and back). pub fn takes_graphics(id: &str) -> bool { - id == super::EXTRUDE || id == super::ROTATE || id == crate::REVOLVE + id == super::EXTRUDE || id == super::ROTATE || id == crate::REVOLVE || id == super::INFLATE } /// The graphics in parameters `p`, leaving out entries that are not valid (a file may hold @@ -163,9 +170,9 @@ pub fn mapped_graphics(p: &Value) -> Vec { } } -/// Are the graphics in parameters `p` of 3D effect `id` valid? Only Extrude & Bevel, Rotate and -/// Revolve take graphics; a plane has only a front, and Revolve's graphics go on its side, named -/// the front. +/// Are the graphics in parameters `p` of 3D effect `id` valid? Only Extrude & Bevel, Rotate, +/// Revolve and Inflate take graphics; a plane has only a front, and Revolve's graphics go on its +/// side, named the front. pub fn validate(id: &str, p: &Value) -> Result<(), String> { let list = match p.get(GRAPHICS) { None => return Ok(()), @@ -533,14 +540,15 @@ struct Unrolled { place: Affine, } -/// The areas of `graphics` (those of the front: Revolve's side) placed on the unrolled side -/// surface, cut into straight pieces. A graphic whose symbol `doc` does not have, or whose art is +/// The areas of `graphics` on `face` (the front, for Revolve's side; Inflate's front or back) +/// placed on the unrolled side surface, or in the art's plane about the center of the object's +/// bounds, cut into straight pieces. A graphic whose symbol `doc` does not have, or whose art is /// past the limits of [`pieces_of`], is left out. `None` when the pieces take more than /// [`MAX_ELEMENTS`] points together. -fn unrolled(doc: &Document, graphics: &[MappedGraphic]) -> Option> { +fn unrolled(doc: &Document, graphics: &[MappedGraphic], face: PlanarFace) -> Option> { let mut pieces = vec![]; let mut points = 0usize; - for g in graphics.iter().filter(|g| g.face == PlanarFace::Front) { + for g in graphics.iter().filter(|g| g.face == face) { let Some(symbol) = doc.symbols.iter().find(|s| s.name == g.symbol) else { continue }; let Ok(art) = pieces_of(doc, symbol) else { continue }; let Some(bounds) = art.iter().filter_map(|p| p.path.bounds()).reduce(|a, b| a.union(b)) else { continue }; @@ -617,20 +625,85 @@ fn straight_pieces(path: &BezPath, points: &mut usize) -> Option> (*points <= MAX_ELEMENTS).then_some(polygons) } -/// Do the graphics in Revolve parameters `p` fit the limits with the symbols of `doc`? Their art, -/// cut into straight pieces on the side surface, may take up to [`MAX_ELEMENTS`] points together. -pub(crate) fn validate_surface_symbols(doc: &Document, p: &Value) -> Result<(), String> { +/// Do the graphics on `face` in parameters `p` (the front of Revolve; Inflate's front or back) fit +/// the limits with the symbols of `doc`? Their art, cut into straight pieces on the surface, may +/// take up to [`MAX_ELEMENTS`] points together. +pub(crate) fn validate_surface_symbols(doc: &Document, p: &Value, face: PlanarFace) -> Result<(), String> { let list = mapped_graphics(p); - if list.is_empty() || unrolled(doc, &list).is_some() { + if !list.iter().any(|g| g.face == face) || unrolled(doc, &list, face).is_some() { return Ok(()); } Err("The graphics are too complex: simplify the symbols' art".into()) } -/// The parts of `graphics` that fall on each of `faces`, a revolved surface's faces in drawing -/// order, for an object with id `id`: for each face, the nodes to draw right after it. Only faces -/// of the swept side that show their outside to the viewer carry a part, so a graphic narrows -/// toward the silhouette, is hidden past it and is covered by the nearer faces drawn after it. +/// A face of a surface that graphics are drawn on ([`surface_parts`]): a face of Revolve's swept +/// side, or a piece of Inflate's front or back. +pub(crate) trait SurfaceFace { + /// Where the face lies on the surface, when it carries graphics and shows the surface's outside + /// to the viewer. + fn outer_cell(&self) -> Option<&vectorcraft_three_d::SurfaceCell>; + /// The outline the face's parts are cut to, when it is not the polygon of its cell's corners: + /// its curved outline, when its edges along an end are curved, or the outline of a piece cut + /// from a larger face. + fn curved(&self) -> Option>; + fn rgb_light(&self) -> Option; + fn light(&self) -> [f64; 3]; + fn outline_path(&self) -> PathData; +} + +impl SurfaceFace for vectorcraft_three_d::Face { + fn outer_cell(&self) -> Option<&vectorcraft_three_d::SurfaceCell> { + self.surface.as_ref().filter(|c| c.outward && !self.cap) + } + fn curved(&self) -> Option> { + self.outline.as_ref().map(Cow::Borrowed) + } + fn rgb_light(&self) -> Option { + self.rgb_gradient + } + fn light(&self) -> [f64; 3] { + self.illumination + } + fn outline_path(&self) -> PathData { + self.path() + } +} + +/// A piece of Inflate's front or back ([`Facet::membrane`]) that carries graphics on `face` only. +pub(crate) struct OnFace<'a> { + pub(crate) facet: &'a Facet, + pub(crate) face: PlanarFace, +} + +impl SurfaceFace for OnFace<'_> { + fn outer_cell(&self) -> Option<&vectorcraft_three_d::SurfaceCell> { + self.facet.surface.as_ref().filter(|c| c.outward && self.facet.membrane == Some(self.face)) + } + fn curved(&self) -> Option> { + if let Some(outline) = &self.facet.outline { + return Some(Cow::Borrowed(outline)); + } + // A piece of a stroke's face cut where it passes through another face keeps its face's + // cell, and its parts are cut to its own outline. + let cut = self.facet.surface.as_ref().is_some_and(|c| self.facet.contours.len() != 1 || self.facet.contours.first() != Some(&c.page)); + cut.then(|| Cow::Owned(self.facet.path())) + } + fn rgb_light(&self) -> Option { + self.facet.rgb_gradient + } + fn light(&self) -> [f64; 3] { + self.facet.illumination + } + fn outline_path(&self) -> PathData { + self.facet.path() + } +} + +/// The parts of the graphics on `face` of `graphics` (the front of Revolve; Inflate's front or +/// back) that fall on each of `faces`, a surface's faces in drawing order, for an object with id +/// `id`: for each face, the nodes to draw right after it. Only faces of the surface that show their +/// outside to the viewer carry a part, so a graphic narrows toward the silhouette, is hidden past +/// it and is covered by the nearer faces drawn after it. /// `shade` gives the paint of a solid color on a face, as the surface under it is shaded; the /// colors of gradients and patterns are multiplied by the face's light. A graphic whose symbol /// `doc` does not have, or that is past the limits of its art, draws nothing. `None` past @@ -638,17 +711,17 @@ pub(crate) fn validate_surface_symbols(doc: &Document, p: &Value) -> Result<(), /// after, [`MAX_SURFACE_CUTS`] points cut, or when the copies of their paints in the parts take /// `copies`, the bytes of the copies of the object's graphics so far, past Revolve's budget for /// them: commands refuse such graphics, and a loaded file draws the surface without them. -pub(crate) fn surface_parts( +pub(crate) fn surface_parts( doc: Option<&Document>, id: NodeId, - graphics: &[MappedGraphic], - faces: &[vectorcraft_three_d::Face], - shade: &dyn Fn(&vectorcraft_three_d::Face, vectorcraft_doc::color::Color) -> Paint, + (graphics, face): (&[MappedGraphic], PlanarFace), + faces: &[F], + shade: &dyn Fn(&F, vectorcraft_doc::color::Color) -> Paint, copies: &mut usize, ) -> Option>>> { let mut out: Vec>> = vec![vec![]; faces.len()]; let Some(doc) = doc else { return Some(out) }; - let pieces = unrolled(doc, graphics)?; + let pieces = unrolled(doc, graphics, face)?; let Some(all) = pieces.iter().map(|p| p.bounds).reduce(|a, b| a.union(b)) else { return Some(out) }; // Each piece listed in the buckets of the surface's x its bounds reach across. let width = (all.width() / SURFACE_BUCKETS as f64).max(1e-9); @@ -664,11 +737,12 @@ pub(crate) fn surface_parts( let mut cut_points = 0usize; let mut triangle_id = 0usize; for (face, parts) in faces.iter().zip(out.iter_mut()) { - let Some(cell) = face.surface.as_ref().filter(|c| c.outward && !face.cap) else { continue }; + let Some(cell) = face.outer_cell() else { continue }; if cell.uv.len() != cell.page.len() || !(3..=4).contains(&cell.uv.len()) { continue; } let triangles: &[[usize; 3]] = if cell.uv.len() == 3 { &[[0, 1, 2]] } else { &[[0, 1, 2], [0, 2, 3]] }; + let curved = face.curved(); for corners in triangles { triangle_id += 1; let pick = |of: &[Point]| corners.iter().map(|k| of.get(*k).copied()).collect::>>(); @@ -679,7 +753,7 @@ pub(crate) fn surface_parts( // where the graphic runs past the end of the profile. A four-cornered face is cut into // two triangles along its diagonal from corner 0 to corner 2: each takes the part of // the outline on its own side of it. - let window = if face.outline.is_some() { grown(window, 3.0) } else { window }; + let window = if curved.is_some() { grown(window, 3.0) } else { window }; // The pieces are looked up over the whole of the window they are cut to. let Some(reach) = window.iter().map(|p| Rect::from_points(*p, *p)).reduce(|a, b| a.union(b)) else { continue }; if reach.x1 < all.x0 || reach.x0 > all.x1 || reach.y1 < all.y0 || reach.y0 > all.y1 { @@ -706,7 +780,7 @@ pub(crate) fn surface_parts( } near.sort_unstable(); let own = corners.iter().find(|k| **k != 0 && **k != 2).and_then(|k| cell.page.get(*k)).filter(|_| triangles.len() == 2); - let rim = face.outline.as_ref().map(|outline| match (own, cell.page.first(), cell.page.get(2)) { + let rim = curved.as_deref().map(|outline| match (own, cell.page.first(), cell.page.get(2)) { (Some(&toward), Some(&a), Some(&b)) => { let side = side_of(a, b, toward); vectorcraft_pathops::boolean(outline, FillRule::NonZero, &side, FillRule::NonZero, vectorcraft_pathops::BoolOp::Intersect) @@ -769,21 +843,21 @@ pub(crate) fn surface_parts( /// The node of the part `path` (on the page, filled under `rule`) of `piece`, which `map` takes /// from the unrolled surface onto `face`. -fn surface_piece( +fn surface_piece( id: NodeId, piece: &Unrolled, (path, rule): (BezPath, FillRule), map: Affine, - face: &vectorcraft_three_d::Face, - shade: &dyn Fn(&vectorcraft_three_d::Face, vectorcraft_doc::color::Color) -> Paint, + face: &F, + shade: &dyn Fn(&F, vectorcraft_doc::color::Color) -> Paint, ) -> Node { let gradient_map = map * piece.place; // Under several lights a face's light varies across it in each channel: a solid color draws // as the face's own lit art in that color, clipped to the part. An opaque part also draws that // art clipped to a band of the seam stroke's width around its edges, as the other parts take // a stroke over their seams. - if let (Some(c), Some(light)) = (piece.paint.color().filter(|_| matches!(piece.paint, Paint::Solid { .. })), face.rgb_gradient) { - let lit = Arc::new(crate::lighting::rgb_gradient_art(id, &face.path(), &Paint::solid(c), light)); + if let (Some(c), Some(light)) = (piece.paint.color().filter(|_| matches!(piece.paint, Paint::Solid { .. })), face.rgb_light()) { + let lit = Arc::new(crate::lighting::rgb_gradient_art(id, &face.outline_path(), &Paint::solid(c), light)); let clipped = |area: &BezPath, rule: FillRule| { let mut clip = Node::path(id, PathData::from_bezpath(area), Appearance::default()); if let NodeKind::Path { rule: r, .. } = &mut clip.kind { @@ -816,7 +890,7 @@ fn surface_piece( match solid { Some(c) => f.paint = shade(face, c), None => { - vectorcraft_doc::recolor::map_paint(&mut f.paint, &|c| crate::lighting::shade(c, face.illumination)); + vectorcraft_doc::recolor::map_paint(&mut f.paint, &|c| crate::lighting::shade(c, face.light())); } } } @@ -931,17 +1005,82 @@ pub(super) fn art_bounds(doc: &Document, name: &str) -> Option { } /// Where a 3D object's graphics are drawn: the bounds its solids are built with (the graphics' -/// offsets are from their center) and the maps of its front and back faces, when it has them. -#[derive(Clone, Copy, Debug, PartialEq)] +/// offsets are from their center), the maps of its front and back faces, when it has them, and +/// for Inflate the pieces of its puffed faces the viewer sees. +#[derive(Clone, Debug, PartialEq)] pub struct GraphicFrame { pub bounds: Rect, front: Option, back: Option, + membrane: Option, +} + +/// The pieces of Inflate's front and puffed back that show their outside to the viewer, as the +/// graphics are drawn on them ([`surface_parts`]): each piece's face, its corners in the art's plane +/// (offsets from the center of the object's bounds) and on the page, and its depth (larger is +/// nearer). +#[derive(Clone, Debug, Default, PartialEq)] +pub struct MembraneFrame { + pieces: Vec, +} + +#[derive(Clone, Debug, PartialEq)] +struct MembranePiece { + face: PlanarFace, + uv: [Point; 3], + page: [Point; 3], + depth: f64, +} + +impl MembraneFrame { + /// The pieces of `facets` that carry where they lie in the art's plane and show the outside of + /// Inflate's front or back. + pub(super) fn of<'a>(facets: impl IntoIterator) -> Self { + let pieces = facets + .into_iter() + .filter_map(|f| { + let face = f.membrane?; + let cell = f.surface.as_ref().filter(|c| c.outward)?; + let uv = <[Point; 3]>::try_from(cell.uv.as_slice()).ok()?; + let page = <[Point; 3]>::try_from(cell.page.as_slice()).ok()?; + Some(MembranePiece { face, uv, page, depth: f.depth }) + }) + .collect(); + Self { pieces } + } + + /// Point `p` of `face` in the art's plane mapped onto the page, or with `from_page` a page point + /// mapped into the art's plane, through the nearest piece of that face that holds it. `None` + /// when no piece the viewer sees holds it. + fn map(&self, face: PlanarFace, p: Point, from_page: bool) -> Option { + let inside = |t: &[Point; 3], q: Point| { + let side = |a: Point, b: Point| (b - a).cross(q - a); + let s = [side(t[0], t[1]), side(t[1], t[2]), side(t[2], t[0])]; + s.iter().all(|v| *v >= -1e-9) || s.iter().all(|v| *v <= 1e-9) + }; + let mut best: Option<(Point, f64)> = None; + for piece in self.pieces.iter().filter(|piece| piece.face == face) { + let (from, to) = if from_page { (&piece.page, &piece.uv) } else { (&piece.uv, &piece.page) }; + if !inside(from, p) || best.is_some_and(|(_, depth)| depth >= piece.depth) { + continue; + } + if let Some(q) = triangle_map(from, to).map(|m| m * p).filter(|q| q.is_finite()) { + best = Some((q, piece.depth)); + } + } + best.map(|(q, _)| q) + } } impl GraphicFrame { pub(super) fn new(bounds: Rect, front: Option, back: Option) -> Self { - Self { bounds, front, back } + Self { bounds, front, back, membrane: None } + } + + /// The frame of an Inflate object built about `bounds`, whose graphics are drawn on the pieces + /// of `membrane`. + pub(super) fn inflated(bounds: Rect, membrane: MembraneFrame) -> Self { + Self { bounds, front: None, back: None, membrane: Some(membrane) } } pub fn map(&self, face: PlanarFace) -> Option<&FaceMap> { @@ -962,19 +1101,37 @@ impl GraphicFrame { } /// Where graphic `g`'s center lands on the page, and whether its face is turned toward the - /// viewer. `None` when the object has no such face or the point has no page point. + /// viewer. `None` when the object has no such face or the point has no page point. On Inflate + /// the center lands on the puffed face above it, and is `None` where the viewer does not see + /// that face. pub fn handle(&self, g: &MappedGraphic) -> Option<(Point, bool)> { + if let Some(membrane) = &self.membrane { + let uv = match g.face { + PlanarFace::Front => Point::new(g.x, g.y), + PlanarFace::Back => Point::new(-g.x, g.y), + }; + return Some((membrane.map(g.face, uv, false)?, true)); + } let map = self.map(g.face)?; Some((map.to_page(self.art_point(g.face, (g.x, g.y)))?, map.visible)) } - /// The offset of a graphic on `face` whose center lands on page point `page`. + /// The offset of a graphic on `face` whose center lands on page point `page`. On Inflate, only + /// a point on the part of the puffed face the viewer sees has one. pub fn offset_at(&self, face: PlanarFace, page: Point) -> Option<(f64, f64)> { - let art = self.map(face)?.to_art(page)?; - let c = self.bounds.center(); - let (x, y) = match face { - PlanarFace::Front => (art.x - c.x, art.y - c.y), - PlanarFace::Back => (c.x - art.x, art.y - c.y), + let (x, y) = if let Some(membrane) = &self.membrane { + let uv = membrane.map(face, page, true)?; + match face { + PlanarFace::Front => (uv.x, uv.y), + PlanarFace::Back => (-uv.x, uv.y), + } + } else { + let art = self.map(face)?.to_art(page)?; + let c = self.bounds.center(); + match face { + PlanarFace::Front => (art.x - c.x, art.y - c.y), + PlanarFace::Back => (c.x - art.x, art.y - c.y), + } }; (x.abs() <= MAX_OFFSET && y.abs() <= MAX_OFFSET).then_some((x, y)) } diff --git a/crates/effects/src/solids/tests.rs b/crates/effects/src/solids/tests.rs index 945eb639aa..27f41eb9a1 100644 --- a/crates/effects/src/solids/tests.rs +++ b/crates/effects/src/solids/tests.rs @@ -774,6 +774,8 @@ fn a_stroke_face_through_a_fill_wall_is_cut_where_their_depths_meet() { side: true, away: false, end: None, + surface: None, + membrane: None, plane: Some(DepthPlane { normal, offset, center: Point::ZERO, eye: None }), }; let wall = facet(0.0, [0.0, 0.0, 1.0], 0.0); diff --git a/crates/effects/src/solids/tests_graphics.rs b/crates/effects/src/solids/tests_graphics.rs index f0da6b992b..0729ddf2ba 100644 --- a/crates/effects/src/solids/tests_graphics.rs +++ b/crates/effects/src/solids/tests_graphics.rs @@ -504,7 +504,8 @@ fn graphics_are_checked() { assert!(check(EXTRUDE, bad.clone()).is_err(), "{bad}"); } assert!(check(ROTATE, json!([{"symbol": "Mark", "face": "back"}])).is_err()); - assert!(check(INFLATE, json!([{"symbol": "Mark"}])).is_err()); + // Inflate takes graphics on its front and its puffed back. + assert!(check(INFLATE, json!([{"symbol": "Mark"}, {"symbol": "Mark", "face": "back"}])).is_ok()); // Revolve takes graphics on its side, named the front; Revolve (Classic) takes none. assert!(validate_three_d_params(crate::REVOLVE, &json!({"graphics": [{"symbol": "Mark"}]})).is_ok()); assert!(validate_three_d_params(crate::REVOLVE, &json!({"graphics": [{"symbol": "Mark", "face": "back"}]})).is_err()); @@ -924,3 +925,85 @@ fn only_an_opaque_part_on_revolve_takes_a_seam_stroke() { // A pattern's tile may hold transparent art, which the overlap would show. assert!(!takes_seam(&piece(Paint::Pattern { pattern: "Dots".into(), xf: Affine::IDENTITY }, 1.0, BlendMode::Normal))); } + +/// The paths in `art` filled in a shade of red: the parts of the "Mark" graphic. +fn red_parts(art: &Node) -> Vec { + let mut out = vec![]; + art.walk(&mut |n| { + let Some(path) = n.path_data() else { return }; + let red = n.appearance.items.iter().any(|i| match i { + AppearanceItem::Fill(f) => f.paint.color().is_some_and(|c| c.to_rgb()[0] > 0.3 && c.to_rgb()[1] < 0.1 && c.to_rgb()[2] < 0.1), + AppearanceItem::Stroke(_) => false, + }); + if red { + out.push(path.clone()); + } + }); + out +} + +fn reach(parts: &[PathData]) -> Rect { + parts.iter().filter_map(PathData::bounds).reduce(|a, b| a.union(b)).unwrap() +} + +#[test] +fn an_inflate_graphic_lies_on_its_puffed_front_where_the_art_is() { + let d = document(); + let n = object(INFLATE, json!({"graphics": [{"symbol": "Mark", "x": 20.0, "y": -10.0, "scale": 200.0}]})); + let art = solid_art_in(Some(&d), &n).unwrap(); + // Straight on, the puff rises toward the viewer and the graphic is carried straight out onto it: + // a 20 × 20 square centered 20 right of and 10 above (50, 50). + let parts = red_parts(&art); + assert!(!parts.is_empty()); + assert!(close(reach(&parts), Rect::new(60.0, 30.0, 80.0, 50.0)), "{:?}", reach(&parts)); + // Turned, the graphic moves and foreshortens with the puff under it. + let n = object(INFLATE, json!({"rotationY": 40.0, "graphics": [{"symbol": "Mark", "scale": 200.0}]})); + let turned = reach(&red_parts(&solid_art_in(Some(&d), &n).unwrap())); + assert!(turned.width() < 20.0 - 0.5 && (turned.height() - 20.0).abs() < 2.0, "{turned:?}"); + // Without the document nothing is drawn. + assert!(red_parts(&solid_art_in(None, &n).unwrap()).is_empty()); +} + +#[test] +fn an_inflate_back_takes_its_graphic_with_both_sides_and_twist_carries_it() { + let d = document(); + let back = |extra: Value| { + let mut p = json!({"rotationY": 180.0, "graphics": [{"symbol": "Mark", "face": "back", "x": 20.0, "scale": 200.0}]}); + p.as_object_mut().unwrap().extend(extra.as_object().unwrap().clone()); + red_parts(&solid_art_in(Some(&d), &object(INFLATE, p)).unwrap()) + }; + // Without Both sides the back is flat and open, with no puffed face to carry the graphic. + assert!(back(json!({})).is_empty()); + // Seen from behind, the back reads left to right: 20 to the right as seen from behind is 20 to + // the left of the art's center, which turned half a turn lies 20 right on the page. + let plain = back(json!({"bothSides": true})); + assert!(!plain.is_empty()); + let r = reach(&plain); + assert!((r.center().x - 70.0).abs() < 0.5 && (r.center().y - 50.0).abs() < 0.5 && (r.width() - 20.0).abs() < 0.5, "{r:?}"); + // Twist turns the back, and the graphic turns with it. + let twisted = reach(&back(json!({"bothSides": true, "twist": 45.0}))); + assert!(twisted.width() > r.width() + 3.0, "{twisted:?} {r:?}"); +} + +#[test] +fn an_inflate_frame_puts_the_handle_on_the_puff_and_reads_it_back() { + let d = document(); + let n = object(INFLATE, json!({"bothSides": true})); + let frame = graphic_frame(Some(&d), &n, None).unwrap(); + let g = MappedGraphic::from_value(&json!({"symbol": "Mark", "x": 20.0, "y": -10.0})).unwrap(); + let (page, shown) = frame.handle(&g).unwrap(); + assert!(shown && (page.x - 70.0).abs() < 1e-6 && (page.y - 40.0).abs() < 1e-6, "{page:?}"); + let (x, y) = frame.offset_at(PlanarFace::Front, page).unwrap(); + assert!((x - 20.0).abs() < 1e-6 && (y + 10.0).abs() < 1e-6, "{x} {y}"); + // From the front the back is out of sight: it has no handle and no offset. + let g = MappedGraphic::from_value(&json!({"symbol": "Mark", "face": "back"})).unwrap(); + assert!(frame.handle(&g).is_none()); + assert!(frame.offset_at(PlanarFace::Back, Point::new(50.0, 50.0)).is_none()); + // Turned half a turn, the back's handle reads back its offset, as seen from behind. + let n = object(INFLATE, json!({"bothSides": true, "rotationY": 180.0})); + let frame = graphic_frame(Some(&d), &n, None).unwrap(); + let g = MappedGraphic::from_value(&json!({"symbol": "Mark", "face": "back", "x": 15.0, "y": 5.0})).unwrap(); + let (page, _) = frame.handle(&g).unwrap(); + let (x, y) = frame.offset_at(PlanarFace::Back, page).unwrap(); + assert!((x - 15.0).abs() < 1e-6 && (y - 5.0).abs() < 1e-6, "{x} {y}"); +} diff --git a/crates/engine/src/cmd/effectcmd/graphics.rs b/crates/engine/src/cmd/effectcmd/graphics.rs index e80c1b2d36..1c9d3e2afa 100644 --- a/crates/engine/src/cmd/effectcmd/graphics.rs +++ b/crates/engine/src/cmd/effectcmd/graphics.rs @@ -1,5 +1,6 @@ //! Window › 3D and Materials › Materials › Graphics: art kept as a document symbol (Add as Single -//! Graphic) and mapped onto 3D objects (Extrude & Bevel's caps, a plane, Revolve's side). The +//! Graphic) and mapped onto 3D objects (Extrude & Bevel's caps, a plane, Revolve's side, Inflate's +//! puffed front and back). The //! graphics an object shows are the `graphics` parameter of its 3D effect, which `effect.setParams` //! also edits. @@ -28,7 +29,7 @@ pub(super) fn specs() -> Vec { "Map Graphic", [], None, - "{symbol: name of a document symbol, face?: front|back (front; Plane has only a front; the back reads left to right as seen from behind; on Revolve the front is its swept side, which is the only face), x?: pt, y?: pt (0, 0: the offset of the graphic's center from the center of the object's bounds, in the face's own plane; on Revolve from the middle of the side unrolled flat, x around the axis and y along the profile), scale?: % (1..10000; default 100, or less so the graphic fits inside the object, on Revolve inside the half of the side seen from the front), rotation?: degrees (-360..360, 0; counterclockwise), index?: int (the 3D effect's position; default: each object's first 3D effect, its own before its fills' and strokes'), item?: appearance item index|null (refused without index; as effect.setParams), ids?|id?} add a graphic to the 3D effect of each selected object, drawn on that face turned, foreshortened and shaded with it and clipped to it (on Revolve wrapped around the side, and drawn only where its outside faces the viewer); every object's 3D effect must be Extrude & Bevel (on a solid cap), Rotate (the Plane type) or Revolve; one undo step → {ids, graphic}", + "{symbol: name of a document symbol, face?: front|back (front; Plane has only a front; the back reads left to right as seen from behind; on Revolve the front is its swept side, which is the only face; on Inflate the back takes graphics only with Both sides and Cap on), x?: pt, y?: pt (0, 0: the offset of the graphic's center from the center of the object's bounds, in the face's own plane; on Inflate in the art's plane, the graphic carried straight out onto the puffed face; on Revolve from the middle of the side unrolled flat, x around the axis and y along the profile), scale?: % (1..10000; default 100, or less so the graphic fits inside the object, on Revolve inside the half of the side seen from the front), rotation?: degrees (-360..360, 0; counterclockwise), index?: int (the 3D effect's position; default: each object's first 3D effect, its own before its fills' and strokes'), item?: appearance item index|null (refused without index; as effect.setParams), ids?|id?} add a graphic to the 3D effect of each selected object, drawn on that face turned, foreshortened and shaded with it and clipped to it (on Revolve wrapped around the side, and on Inflate following the puff, Twist and Taper carrying the back's, each drawn only where its outside faces the viewer); every object's 3D effect must be Extrude & Bevel (on a solid cap), Rotate (the Plane type), Revolve or Inflate; one undo step → {ids, graphic}", has_doc, map_graphic ), @@ -124,6 +125,13 @@ fn map_graphic(s: &mut Session, p: &Value) -> Result { if base.face == effects::PlanarFace::Back && extrude.is_some_and(|o| o.depth <= 0.0) { return Err(bad(C, format!("object {}: with a depth of 0 the object has one face: map its graphics onto the front", id.0))); } + // Inflate's back takes graphics where it puffs out: with Both sides and Cap on. + if base.face == effects::PlanarFace::Back && effect.id == effects::INFLATE { + let o = effects::inflate_options(&merged); + if !(o.both_sides && o.cap) { + return Err(bad(C, format!("object {}: Inflate's back takes graphics with Both sides and Cap on", id.0))); + } + } let mut graphic = base.clone(); if p.get("scale").is_none() && let (Some(frame), Some(art)) = (effects::graphic_frame_at(Some(d), n, item, index), effects::graphic_bounds(d, &graphic.symbol)) diff --git a/crates/engine/src/cmd/effectcmd/graphics_tests.rs b/crates/engine/src/cmd/effectcmd/graphics_tests.rs index a9d3a754ce..dcd4c1e99c 100644 --- a/crates/engine/src/cmd/effectcmd/graphics_tests.rs +++ b/crates/engine/src/cmd/effectcmd/graphics_tests.rs @@ -95,10 +95,10 @@ fn map_graphic_puts_a_graphic_on_the_side_of_a_revolve() { #[test] fn map_graphic_refuses_what_cannot_take_it_and_changes_nothing() { - let (mut s, id) = setup("threeD.inflate"); + let (mut s, id) = setup("threeD.classicExtrude"); let history = undo_len(&s); let e = s.execute("threeD.mapGraphic", &json!({"symbol": "Mark", "ids": [id.0]})).unwrap_err().to_string(); - assert!(e.contains("Plane, Extrude and Revolve"), "{e}"); + assert!(e.contains("Plane, Extrude, Revolve and Inflate"), "{e}"); let (mut s, id) = setup("threeD.rotate"); for (p, says) in [ (json!({"symbol": "Gone"}), "no symbol named"), @@ -147,11 +147,36 @@ fn set_params_edits_graphics_and_checks_them() { let null = json!({"ids": [id.0], "index": 0, "item": null, "params": {"graphics": null}}); assert!(s.execute("effect.setParams", &null).is_err()); assert_eq!(graphics(&s, id), moved); - // Extrude to Plane keeps the graphics; to Inflate drops them. + // Extrude to Plane keeps the graphics, and so does Inflate. s.execute("effect.setParams", &json!({"ids": [id.0], "index": 0, "item": null, "threeDType": "plane"})).unwrap(); assert_eq!(graphics(&s, id), moved); s.execute("effect.setParams", &json!({"ids": [id.0], "index": 0, "item": null, "threeDType": "inflate"})).unwrap(); - assert_eq!(graphics(&s, id), Value::Null); + assert_eq!(graphics(&s, id), moved); +} + +#[test] +fn map_graphic_puts_a_graphic_on_an_inflate_and_its_back_only_with_both_sides() { + let (mut s, id) = setup("threeD.inflate"); + let plain = { + let d = &s.doc().unwrap().doc; + vectorcraft_render::effects::solid_art_in(Some(d), d.node(id).unwrap()) + }; + let history = undo_len(&s); + s.execute("threeD.mapGraphic", &json!({"symbol": "Mark", "ids": [id.0]})).unwrap(); + assert_eq!(graphics(&s, id), json!([{"symbol": "Mark", "face": "front", "x": 0.0, "y": 0.0, "scale": 100.0, "rotation": 0.0}])); + assert_eq!(undo_len(&s), history + 1); + let d = &s.doc().unwrap().doc; + assert_ne!(vectorcraft_render::effects::solid_art_in(Some(d), d.node(id).unwrap()), plain, "the graphic is drawn"); + // The back is flat until Both sides puffs it. + let history = undo_len(&s); + let e = s.execute("threeD.mapGraphic", &json!({"symbol": "Mark", "face": "back", "ids": [id.0]})).unwrap_err().to_string(); + assert!(e.contains("Both sides and Cap"), "{e}"); + assert_eq!(undo_len(&s), history); + s.execute("effect.setParams", &json!({"ids": [id.0], "index": 0, "item": null, "params": {"bothSides": true, "cap": false}})).unwrap(); + assert!(s.execute("threeD.mapGraphic", &json!({"symbol": "Mark", "face": "back", "ids": [id.0]})).is_err()); + s.execute("effect.setParams", &json!({"ids": [id.0], "index": 0, "item": null, "params": {"cap": true}})).unwrap(); + s.execute("threeD.mapGraphic", &json!({"symbol": "Mark", "face": "back", "ids": [id.0]})).unwrap(); + assert_eq!(graphics(&s, id)[1]["face"], "back"); } #[test] diff --git a/crates/three-d/src/solid.rs b/crates/three-d/src/solid.rs index 18ef7d6d1b..a66e72af1c 100644 --- a/crates/three-d/src/solid.rs +++ b/crates/three-d/src/solid.rs @@ -241,11 +241,15 @@ pub struct Inflate { pub taper: f64, /// A closed back (a solid) or none, so the inflated front is a shell open behind. pub cap: bool, + /// Graphics are mapped onto the front or the puffed back: the pieces of those faces are drawn + /// as triangles, each carrying where its corners lie in the art's plane ([`Facet::surface`]). + /// Off by default, which leaves the facets without one. + pub map_surface: bool, } impl Default for Inflate { fn default() -> Self { - Self { depth: 0.0, volume: 50.0, both_sides: false, twist: 0.0, taper: 1.0, cap: true } + Self { depth: 0.0, volume: 50.0, both_sides: false, twist: 0.0, taper: 1.0, cap: true, map_surface: false } } } @@ -296,6 +300,14 @@ pub struct Facet { /// The planar end of the solid the facet is: Extrude & Bevel's front or back cap, or a plane /// (its front). `None` for every other facet. pub end: Option, + /// For a piece of Inflate's front or puffed back built for graphics ([`Inflate::map_surface`]): + /// where its corners lie in the art's plane, as offsets from the center of the bounds the solid + /// was built with ([`crate::SurfaceCell`]). The back's corners are where they were in the art + /// before the twist and taper turned and scaled it. + pub surface: Option, + /// The face of Inflate's solid that a facet with a [`Facet::surface`] is a piece of: its front + /// or its puffed back. + pub membrane: Option, /// The face's plane in view space and the projection it was drawn with, for its depth at a /// point of the drawing ([`Facet::depth_at`]). `None` for a face whose corners lie more than /// 0.001 pt off one plane (a piece of a twisted wall) or reach the eye. @@ -384,6 +396,8 @@ impl Facet { // A revolved cap is not one of the planar faces graphics map onto. end: None, away: false, + surface: None, + membrane: None, plane: face.plane, #[cfg(test)] view: vec![], diff --git a/crates/three-d/src/solid/build.rs b/crates/three-d/src/solid/build.rs index d734161343..9cff25bab5 100644 --- a/crates/three-d/src/solid/build.rs +++ b/crates/three-d/src/solid/build.rs @@ -211,6 +211,8 @@ impl<'a> Builder<'a> { side: false, away: behind, end: None, + surface: None, + membrane: None, plane, #[cfg(test)] view, diff --git a/crates/three-d/src/solid/inflate.rs b/crates/three-d/src/solid/inflate.rs index 5edf57a894..5b3c883211 100644 --- a/crates/three-d/src/solid/inflate.rs +++ b/crates/three-d/src/solid/inflate.rs @@ -1,7 +1,7 @@ use super::build::{Builder, Built, Camera, Keep, Order, Turn, check_bounds, cuts, fit, newell, outward}; use super::membrane::{Edges, MAX_MATERIAL_SEGMENTS, Membrane, cell_triangles, clip, crossings, filled, material}; use super::rings::{MAX_SOLID_POINTS, TOO_COMPLEX_SURFACE, curve_pieces, signed_area, solid_rings}; -use super::{Facet, FillRule, Inflate, MAX_FACES, MAX_SOLID_FACES, PathData, Point, Rect, V3, Vec2, View}; +use super::{Facet, FillRule, Inflate, MAX_FACES, MAX_SOLID_FACES, PathData, PlanarFace, Point, Rect, V3, Vec2, View}; /// The slices the sides are cut into: more to follow a twist or taper. fn slices(o: &Inflate) -> usize { @@ -198,6 +198,22 @@ thread_local! { pub(super) static GRID_WORK: std::cell::Cell = const { std::cell::Cell::new(0) }; } +/// Marks the facet the builder `b` added after it held `before` facets, if it added one, as a piece +/// of `face` (Inflate's front or puffed back) whose corners lie at the art points `points`, as +/// offsets from `center` ([`Facet::surface`]). `outward` is the triangle's normal pointing out of +/// the solid: the piece shows the outside of the surface when it was neither turned around to show +/// its inside (on a shell open behind) nor kept turned away. +fn mark_surface(b: &mut Builder<'_>, before: usize, points: [Point; 3], center: Point, outward: V3, face: PlanarFace) { + if b.facets.len() <= before { + return; + } + let Some(f) = b.facets.last_mut() else { return }; + let Some(page) = f.contours.first().filter(|c| c.len() == 3).cloned() else { return }; + let shows = !f.away && f.normal[0] * outward.0 + f.normal[1] * outward.1 + f.normal[2] * outward.2 > 0.0; + f.surface = Some(crate::SurfaceCell { page, uv: points.iter().map(|q| Point::new(q.x - center.x, q.y - center.y)).collect(), outward: shows }); + f.membrane = Some(face); +} + /// The facets of one inflated shape, for a camera that allows for a puff `reach` high (or the /// shape's own, if higher): `reach` is the highest puff of the shapes drawn together. Its faces /// before projection instead, or both, as `keep` asks. @@ -241,6 +257,8 @@ fn inflated(p: Puff, bounds: Rect, o: Inflate, view: View, reach: f64, keep: Kee }; let smooth = view.shade && view.has_colored_lights(); let camera = Camera::new(view, bounds, o.depth + 2.0 * height.max(reach)); + // A graphic's offsets are from the center of the bounds the solid is built with. + let center = bounds.center(); // Without its back cap the object is a shell open behind, its inside showing. let mut b = Builder::new(&camera, o.cap, false, keep); let half = o.depth / 2.0; @@ -410,22 +428,47 @@ fn inflated(p: Puff, bounds: Rect, o: Inflate, view: View, reach: f64, keep: Kee out }) .collect(); - if height > 0.0 - && smooth + // Smooth shading draws the pieces as triangles, and so do graphics mapped onto + // the front or back: each triangle then carries where its corners lie in the + // art's plane. + let smoothed = height > 0.0 && smooth; + if (smoothed || o.map_surface) && let Some(triangles) = cell_triangles(&pieces) { + let order = if flat { Order::Last } else { Order::Depth }; for points in triangles { let front = points.map(|q| camera.place(q, half + lift(q))); - b.smooth_triangle(front, points.map(|q| camera.rotate(normal(q))), false)?; + let before = b.facets.len(); + let outward = newell(&[front.to_vec()]); + if smoothed { + b.smooth_triangle(front, points.map(|q| camera.rotate(normal(q))), false)?; + } else { + b.face(vec![front.to_vec()], outward, order)?; + } + if o.map_surface { + mark_surface(&mut b, before, points, center, outward, PlanarFace::Front); + } if o.both_sides && o.cap { let back = points.map(|q| camera.place(back_turn.apply(q), -half - lift(q) * back_turn.scale)); - let normals = points.map(|q| { - let n = normal(q); - // A uniform taper scales all three coordinates equally; - // twist turns the back normal about the shape's z-axis. - camera.rotate(V3(back_turn.cos * n.0 - back_turn.sin * n.1, back_turn.sin * n.0 + back_turn.cos * n.1, -n.2)) - }); - b.smooth_triangle(back, normals, true)?; + let before = b.facets.len(); + let n = newell(&[back.to_vec()]); + // The back winds the same way round as the front, so its outward + // normal is reversed. + let outward = V3(-n.0, -n.1, -n.2); + if smoothed { + let normals = points.map(|q| { + let n = normal(q); + // A uniform taper scales all three coordinates equally; + // twist turns the back normal about the shape's z-axis. + camera.rotate(V3(back_turn.cos * n.0 - back_turn.sin * n.1, back_turn.sin * n.0 + back_turn.cos * n.1, -n.2)) + }); + b.smooth_triangle(back, normals, true)?; + } else { + b.face(vec![back.to_vec()], outward, order)?; + } + if o.map_surface { + mark_surface(&mut b, before, points, center, outward, PlanarFace::Back); + } } } continue; diff --git a/crates/three-d/src/solid/tests.rs b/crates/three-d/src/solid/tests.rs index a75821e696..8dd1662e4d 100644 --- a/crates/three-d/src/solid/tests.rs +++ b/crates/three-d/src/solid/tests.rs @@ -423,6 +423,47 @@ fn inflate_leaves_holes_open() { assert!(close(area(&f), 100.0 * 100.0 - 40.0 * 40.0, 1e-3), "{}", area(&f)); } +#[test] +fn inflate_marks_where_each_piece_lies_in_the_art_for_graphics() { + let (p, r) = shape(&square(0.0, 0.0, 100.0)); + let on = |o: Inflate, view: View| inflate(&p, FillRule::EvenOdd, r, Inflate { map_surface: true, ..o }, view).unwrap(); + // Without the request no piece carries a surface point. + assert!(inflate(&p, FillRule::EvenOdd, r, Inflate::default(), front()).unwrap().iter().all(|f| f.surface.is_none() && f.membrane.is_none())); + // Straight on, every piece is a front triangle whose corners lie where the art does, as + // offsets from the center of the bounds, and together they cover the shape. + let f = on(Inflate::default(), front()); + let marked: Vec<&Facet> = f.iter().filter(|f| f.surface.is_some()).collect(); + assert!(marked.len() > 20, "{}", marked.len()); + assert!(close(marked.iter().map(|f| signed_area(&f.contours[0]).abs()).sum::(), 100.0 * 100.0, 1e-3)); + for f in &marked { + let s = f.surface.as_ref().unwrap(); + assert_eq!(f.membrane, Some(PlanarFace::Front)); + assert!(s.outward); + for (page, uv) in s.page.iter().zip(&s.uv) { + assert!(close(page.x, uv.x + 50.0, 1e-6) && close(page.y, uv.y + 50.0, 1e-6), "{page:?} {uv:?}"); + } + } + // Both sides puffs a back: seen from behind its pieces show their outside, and under Twist + // they keep the untwisted art points while the pieces turn on the page. + let behind = View { rotation_y: 180.0, ..front() }; + let back = |o: Inflate| { + on(o, behind) + .into_iter() + .filter(|f| f.membrane == Some(PlanarFace::Back) && f.surface.as_ref().is_some_and(|s| s.outward)) + .collect::>() + }; + let plain = back(Inflate { both_sides: true, ..Inflate::default() }); + assert!(!plain.is_empty()); + let twisted = back(Inflate { both_sides: true, twist: 30.0, ..Inflate::default() }); + assert!(!twisted.is_empty()); + let uv_extent = + |f: &[Facet]| f.iter().flat_map(|f| f.surface.as_ref().unwrap().uv.clone()).fold(Rect::new(0.0, 0.0, 0.0, 0.0), |r, q| r.union_pt(q)); + assert!(close(uv_extent(&twisted).width(), 100.0, 1e-6) && close(uv_extent(&twisted).height(), 100.0, 1e-6)); + assert!(extent(&twisted).width() > extent(&plain).width() + 10.0, "{:?} {:?}", extent(&twisted), extent(&plain)); + // Without Both sides there is no back to mark. + assert!(on(Inflate::default(), behind).iter().all(|f| f.membrane != Some(PlanarFace::Back))); +} + #[test] fn malformed_and_degenerate_input_is_bounded() { let (p, b) = shape(&square(0.0, 0.0, 100.0)); @@ -446,7 +487,7 @@ fn malformed_and_degenerate_input_is_bounded() { &p, FillRule::EvenOdd, b, - Inflate { depth: -5.0, volume: f64::NAN, both_sides: true, twist: f64::INFINITY, taper: f64::NAN, cap: true }, + Inflate { depth: -5.0, volume: f64::NAN, both_sides: true, twist: f64::INFINITY, taper: f64::NAN, cap: true, map_surface: false }, front() ) .is_ok() diff --git a/crates/ui-egui/src/dialogs/three_d_materials.rs b/crates/ui-egui/src/dialogs/three_d_materials.rs index 3091a00cac..e0af93a825 100644 --- a/crates/ui-egui/src/dialogs/three_d_materials.rs +++ b/crates/ui-egui/src/dialogs/three_d_materials.rs @@ -1,6 +1,6 @@ //! The 3D and Materials panel's Materials tab: the document's Graphics (its symbols) as thumbnails, -//! Add as Single Graphic, and the graphics mapped onto the selected 3D object (its planar faces, or -//! Revolve's side) with their face, position, size and turn. Picking a thumbnail maps that graphic +//! Add as Single Graphic, and the graphics mapped onto the selected 3D object (its planar faces, +//! Revolve's side, or Inflate's puffed faces) with their face, position, size and turn. Picking a thumbnail maps that graphic //! onto the selected objects (`threeD.mapGraphic`); art dropped on the thumbnails becomes a graphic //! (`threeD.addGraphic`). Editing a mapped graphic changes the effect's `graphics` parameter, which //! the panel sends as it sends every other setting. @@ -96,7 +96,7 @@ pub(crate) fn controls(app: &VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) } ui.add_space(10.0); if !takes { - dim_label(ui, tl!("Graphics map onto the Plane, Extrude and Revolve object types.")); + dim_label(ui, tl!("Graphics map onto the Plane, Extrude, Revolve and Inflate object types.")); return; } let raw = d.fields.get(GRAPHICS).cloned().unwrap_or(Value::Null); diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 3ed3ca8331..a19eb6864f 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -6229,7 +6229,7 @@ digits Malayalam Malaiàlam @msg `{GRAPHICS}` face must be front or back face de `{GRAPHICS}` ha de ser front o back @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} {key} de `{GRAPHICS}` ha de ser un nombre de {lo} a {hi} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` ha de ser una matriu -@msg Graphics map onto the Plane, Extrude and Revolve object types Els gràfics s’apliquen als tipus d’objecte Pla, Extrusió i Revolució +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Els gràfics s’apliquen als tipus d’objecte Pla, Extrusió, Revolució i Infla @msg Revolve maps graphics onto its side: map them onto the front Revoluciona aplica els gràfics al seu lateral: aplica’ls a la cara davantera @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Els gràfics són massa complexos per a aquesta superfície: simplifica la il·lustració dels símbols o redueix Segments @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` admet com a màxim {MAX_GRAPHICS} gràfics diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 161e235c56..3e0962a519 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -6045,7 +6045,7 @@ mark-style Japanese Japonské @msg `{GRAPHICS}` face must be front or back face v `{GRAPHICS}` musí být front nebo back @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} {key} v `{GRAPHICS}` musí být číslo od {lo} do {hi} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` musí být pole -@msg Graphics map onto the Plane, Extrude and Revolve object types Grafika se mapuje na typy objektu Rovina, Vysunutí a Rotační těleso +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafika se mapuje na typy objektu Rovina, Vysunutí, Rotační těleso a Nafouknutí @msg Revolve maps graphics onto its side: map them onto the front Rotační těleso mapuje grafiku na svůj bok: umístěte ji na přední stranu @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafika je pro tento povrch příliš složitá: zjednodušte kresbu symbolů nebo snižte Segmenty @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` přijímá nejvýše {MAX_GRAPHICS} grafik diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index fd0b7c042e..69a7f64c4e 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -318,7 +318,7 @@ @msg `{GRAPHICS}` face must be front or back `{GRAPHICS}`: face skal være front eller back @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} `{GRAPHICS}`: {key} skal være et tal fra {lo} til {hi} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` skal være et array -@msg Graphics map onto the Plane, Extrude and Revolve object types Grafik kortlægges på objekttyperne Plan, Ekstrudér og Omdrej +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafik kortlægges på objekttyperne Plan, Ekstrudér, Omdrej og Pust op @msg Revolve maps graphics onto its side: map them onto the front Omdrej kortlægger grafik på siden: kortlæg den på forsiden @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafikken er for kompleks til denne overflade: forenkl symbolernes grafik, eller reducér Segmenter @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` tager højst {MAX_GRAPHICS} grafikelementer diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 2a5f32a5d9..72ce446449 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -5619,7 +5619,7 @@ lighting Light Licht @msg `{GRAPHICS}` face must be front or back face in `{GRAPHICS}` muss front oder back sein @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} {key} in `{GRAPHICS}` muss eine Zahl von {lo} bis {hi} sein @msg `{GRAPHICS}` must be an array `{GRAPHICS}` muss ein Array sein -@msg Graphics map onto the Plane, Extrude and Revolve object types Grafiken werden auf die Objekttypen Ebene, Extrudieren und Kreiseln abgebildet +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafiken werden auf die Objekttypen Ebene, Extrudieren, Kreiseln und Aufblasen abgebildet @msg Revolve maps graphics onto its side: map them onto the front Kreiseln bildet Grafiken auf seiner Mantelfläche ab: Bilden Sie sie auf der Vorderseite ab @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Die Grafiken sind für diese Oberfläche zu komplex: Vereinfachen Sie das Bildmaterial der Symbole oder verringern Sie Segmente @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` nimmt höchstens {MAX_GRAPHICS} Grafiken auf diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index b1b7b4d039..d1e476d8cf 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -5406,7 +5406,7 @@ digits Malayalam Μαλαγιάλαμ @msg `{GRAPHICS}` face must be front or back το face του `{GRAPHICS}` πρέπει να είναι front ή back @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} το {key} του `{GRAPHICS}` πρέπει να είναι αριθμός από {lo} έως {hi} @msg `{GRAPHICS}` must be an array το `{GRAPHICS}` πρέπει να είναι πίνακας -@msg Graphics map onto the Plane, Extrude and Revolve object types Τα γραφικά αντιστοιχίζονται στους τύπους αντικειμένου Επίπεδο, Εξώθηση και Περιστροφή γύρω από άξονα +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Τα γραφικά αντιστοιχίζονται στους τύπους αντικειμένου Επίπεδο, Εξώθηση, Περιστροφή γύρω από άξονα και Φούσκωμα @msg Revolve maps graphics onto its side: map them onto the front Η Περιστροφή γύρω από άξονα αντιστοιχίζει τα γραφικά στην πλευρική της επιφάνεια: αντιστοιχίστε τα στην μπροστινή όψη @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Τα γραφικά είναι πολύ σύνθετα για αυτή την επιφάνεια: απλοποιήστε το σχέδιο των συμβόλων ή μειώστε τα Τμήματα @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics το `{GRAPHICS}` δέχεται το πολύ {MAX_GRAPHICS} γραφικά diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 5b3c675f7b..b85486760c 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -5988,8 +5988,8 @@ mark-style Japanese Japonesas @msg `{GRAPHICS}` face must be front or back face de `{GRAPHICS}` debe ser front o back @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} {key} de `{GRAPHICS}` debe ser un número de {lo} a {hi} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` debe ser una matriz -@msg Graphics map onto the Plane, Extrude and Revolve object types Los gráficos se asignan a los tipos de objeto Plano, Extrusión y Revolución - Graphics map onto the Plane, Extrude and Revolve object types. Los gráficos se asignan a los tipos de objeto Plano, Extrusión y Revolución. +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Los gráficos se asignan a los tipos de objeto Plano, Extrusión, Revolución e Inflar + Graphics map onto the Plane, Extrude, Revolve and Inflate object types. Los gráficos se asignan a los tipos de objeto Plano, Extrusión, Revolución e Inflar. @msg Revolve maps graphics onto its side: map them onto the front Revolución asigna los gráficos a su lateral: asígnelos a la cara frontal @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Los gráficos son demasiado complejos para esta superficie: simplifique la ilustración de los símbolos o reduzca Segmentos @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` admite como máximo {MAX_GRAPHICS} gráficos diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index e77a617c52..a512131070 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -5928,7 +5928,7 @@ mark-style Japanese Japanilainen @msg `{GRAPHICS}` face must be front or back `{GRAPHICS}`-kohteen face-arvon on oltava front tai back @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} `{GRAPHICS}`-kohteen {key}-arvon on oltava luku, joka on vähintään {lo} ja enintään {hi} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` on oltava taulukko -@msg Graphics map onto the Plane, Extrude and Revolve object types Grafiikat sijoitetaan objektityypeille Taso, Pursota ja Pyöräytä +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafiikat sijoitetaan objektityypeille Taso, Pursota, Pyöräytä ja Täytä ilmalla @msg Revolve maps graphics onto its side: map them onto the front Pyöräytä sijoittaa grafiikat kylkeensä: sijoita ne etupuolelle @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafiikat ovat liian monimutkaisia tälle pinnalle: yksinkertaista symbolien kuvitusta tai pienennä Segmentit-arvoa @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` hyväksyy enintään {MAX_GRAPHICS} grafiikkaa diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 2762d2a954..a91bacd012 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -5613,7 +5613,7 @@ lighting Light Lumière @msg `{GRAPHICS}` face must be front or back face de `{GRAPHICS}` doit valoir front ou back @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} {key} de `{GRAPHICS}` doit être un nombre de {lo} à {hi} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` doit être un tableau -@msg Graphics map onto the Plane, Extrude and Revolve object types Les graphiques s'appliquent aux types d'objet Plan, Extrusion et Révolution +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Les graphiques s'appliquent aux types d'objet Plan, Extrusion, Révolution et Gonfler @msg Revolve maps graphics onto its side: map them onto the front Révolution applique les graphiques sur sa face latérale : appliquez-les sur la face avant @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Les graphiques sont trop complexes pour cette surface : simplifiez l'illustration des symboles ou réduisez Segments @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` accepte au plus {MAX_GRAPHICS} graphiques diff --git a/crates/ui-egui/src/i18n/gu.tsv b/crates/ui-egui/src/i18n/gu.tsv index 1c96900b2b..aebe0dc3af 100644 --- a/crates/ui-egui/src/i18n/gu.tsv +++ b/crates/ui-egui/src/i18n/gu.tsv @@ -4619,7 +4619,7 @@ antiAlias Sharp શાર્પ Align On: આના પર સંરેખિત કરો: Delete Tab ટૅબ કાઢી નાખો Face સપાટી - Graphics map onto the Plane, Extrude and Revolve object types. ગ્રાફિક્સને Plane, Extrude અને Revolve પ્રકારના ઑબ્જેક્ટ્સ પર મેપ કરી શકાય છે. + Graphics map onto the Plane, Extrude, Revolve and Inflate object types. ગ્રાફિક્સને Plane, Extrude, Revolve અને Inflate પ્રકારના ઑબ્જેક્ટ્સ પર મેપ કરી શકાય છે. Justify with last line aligned center છેલ્લી લાઇન મધ્યમાં રાખીને જસ્ટિફાઇ કરો Justify with last line aligned right છેલ્લી લાઇન જમણે રાખીને જસ્ટિફાઇ કરો Leader: લીડર: diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 548f961f51..fd22ef72f2 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -8059,7 +8059,7 @@ antiAlias Sharp शार्प @msg `{GRAPHICS}` face must be front or back `{GRAPHICS}` का face, front या back होना चाहिए @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} `{GRAPHICS}` का {key}, {lo} से {hi} तक की संख्या होना चाहिए @msg `{GRAPHICS}` must be an array `{GRAPHICS}` एक ऐरे होना चाहिए -@msg Graphics map onto the Plane, Extrude and Revolve object types ग्राफ़िक्स समतल, एक्सट्रूड और रिवॉल्व ऑब्जेक्ट प्रकारों पर लगते हैं +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types ग्राफ़िक्स समतल, एक्सट्रूड, रिवॉल्व और फुलाएँ ऑब्जेक्ट प्रकारों पर लगते हैं @msg Revolve maps graphics onto its side: map them onto the front रिवॉल्व ग्राफ़िक्स को अपनी बगल वाली सतह पर लगाता है: उन्हें सामने वाले फ़ेस पर लगाएँ @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments ग्राफ़िक्स इस सतह के लिए बहुत जटिल हैं: सिंबल्स के आर्ट को सरल बनाएँ या सेगमेंट कम करें @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` अधिकतम {MAX_GRAPHICS} ग्राफ़िक्स लेता है diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 200b45d1b1..2cb919f15b 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -6028,7 +6028,7 @@ imageTrace Outline Körvonal @msg `{GRAPHICS}` face must be front or back a `{GRAPHICS}` face értéke front vagy back lehet @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} a `{GRAPHICS}` {key} értéke {lo} és {hi} közötti szám lehet @msg `{GRAPHICS}` must be an array a `{GRAPHICS}` értéke tömb kell legyen -@msg Graphics map onto the Plane, Extrude and Revolve object types A grafikák a Sík, a Kihúzás és a Forgatás tengely körül objektumtípusra kerülnek +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types A grafikák a Sík, a Kihúzás, a Forgatás tengely körül és a Felfújás objektumtípusra kerülnek @msg Revolve maps graphics onto its side: map them onto the front A Forgatás tengely körül a grafikákat a palástjára helyezi: az elülső oldalra helyezze őket @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments A grafikák túl összetettek ehhez a felülethez: egyszerűsítse a szimbólumok rajzát, vagy csökkentse a Szakaszok értékét @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics a `{GRAPHICS}` legfeljebb {MAX_GRAPHICS} grafikát fogad diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 90ec79404c..a6753f670d 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -5661,7 +5661,7 @@ lighting Light Luce @msg `{GRAPHICS}` face must be front or back face di `{GRAPHICS}` deve essere front o back @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} {key} di `{GRAPHICS}` deve essere un numero da {lo} a {hi} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` deve essere un array -@msg Graphics map onto the Plane, Extrude and Revolve object types Le grafiche si applicano ai tipi di oggetto Piano, Estrusione e Rivoluzione +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Le grafiche si applicano ai tipi di oggetto Piano, Estrusione, Rivoluzione e Gonfia @msg Revolve maps graphics onto its side: map them onto the front Rivoluzione applica le grafiche sul suo lato: applicatele sulla faccia anteriore @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Le grafiche sono troppo complesse per questa superficie: semplificate il disegno dei simboli o riducete Segmenti @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` accetta al massimo {MAX_GRAPHICS} grafiche diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index d98acfa22d..c6b574b9db 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -5703,8 +5703,8 @@ lighting Light ライト @msg `{GRAPHICS}` face must be front or back `{GRAPHICS}` の face には front または back を指定してください @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} `{GRAPHICS}` の {key} は {lo} から {hi} までの数値にしてください @msg `{GRAPHICS}` must be an array `{GRAPHICS}` は配列にしてください -@msg Graphics map onto the Plane, Extrude and Revolve object types グラフィックはオブジェクトの種類が平面、押し出し、回転体のときにマッピングされます - Graphics map onto the Plane, Extrude and Revolve object types. グラフィックはオブジェクトの種類が平面、押し出し、回転体のときにマッピングされます。 +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types グラフィックはオブジェクトの種類が平面、押し出し、回転体、膨張のときにマッピングされます + Graphics map onto the Plane, Extrude, Revolve and Inflate object types. グラフィックはオブジェクトの種類が平面、押し出し、回転体、膨張のときにマッピングされます。 @msg Revolve maps graphics onto its side: map them onto the front 回転体はグラフィックを側面にマッピングします。前面にマッピングしてください @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments グラフィックがこのサーフェスには複雑すぎます。シンボルのアートを単純化するか、分割数を減らしてください @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` に指定できるグラフィックは {MAX_GRAPHICS} 個までです diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 794e5454a9..b2d8e56f4d 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -5326,7 +5326,7 @@ font-technology Variable ცვლადი @msg `{GRAPHICS}` face must be front or back `{GRAPHICS}`-ის face უნდა იყოს front ან back @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} `{GRAPHICS}`-ის {key} უნდა იყოს რიცხვი {lo}-დან {hi}-მდე @msg `{GRAPHICS}` must be an array `{GRAPHICS}` უნდა იყოს მასივი -@msg Graphics map onto the Plane, Extrude and Revolve object types გრაფიკა თავსდება ობიექტის ტიპებზე „სიბრტყე“, „ამოწევა“ და „ბრუნვა“ +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types გრაფიკა თავსდება ობიექტის ტიპებზე „სიბრტყე“, „ამოწევა“, „ბრუნვა“ და „გაბერვა“ @msg Revolve maps graphics onto its side: map them onto the front ბრუნვა გრაფიკას თავის გვერდით ზედაპირზე ათავსებს: განათავსეთ ისინი წინა მხარეზე @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments გრაფიკა ზედმეტად რთულია ამ ზედაპირისთვის: გაამარტივეთ სიმბოლოების ნახატი ან შეამცირეთ სეგმენტები @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` იღებს მაქსიმუმ {MAX_GRAPHICS} გრაფიკას diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index bb8676df71..5f907c5480 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -5622,7 +5622,7 @@ lighting Light 광원 @msg `{GRAPHICS}` face must be front or back `{GRAPHICS}`의 face는 front 또는 back이어야 합니다 @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} `{GRAPHICS}`의 {key}은(는) {lo}에서 {hi} 사이의 숫자여야 합니다 @msg `{GRAPHICS}` must be an array `{GRAPHICS}`은(는) 배열이어야 합니다 -@msg Graphics map onto the Plane, Extrude and Revolve object types 그래픽은 평면, 돌출, 회전체 개체 유형에 매핑됩니다 +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types 그래픽은 평면, 돌출, 회전체, 부풀리기 개체 유형에 매핑됩니다 @msg Revolve maps graphics onto its side: map them onto the front 회전체는 그래픽을 옆면에 매핑합니다. 앞면에 매핑하십시오 @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments 그래픽이 이 표면에 비해 너무 복잡합니다. 심볼의 아트를 단순화하거나 세그먼트를 줄이십시오 @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}`에는 그래픽을 최대 {MAX_GRAPHICS}개까지 넣을 수 있습니다 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index a597a03fd0..37b0232c9a 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -7805,7 +7805,7 @@ mark-style Japanese Japans @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} {key} in `{GRAPHICS}` moet een getal van {lo} tot {hi} zijn @msg `{GRAPHICS}` must be an array `{GRAPHICS}` moet een array zijn @msg Graphics map onto planar faces: use the Extrude or Plane object type Illustraties worden op platte vlakken geplaatst: gebruik het objecttype Extruderen of Vlak -@msg Graphics map onto the Plane, Extrude and Revolve object types Illustraties worden op de objecttypen Vlak, Extruderen en Draaien geplaatst +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Illustraties worden op de objecttypen Vlak, Extruderen, Draaien en Opblazen geplaatst @msg Revolve maps graphics onto its side: map them onto the front Draaien plaatst illustraties op de zijkant: plaats ze op de voorkant @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments De illustraties zijn te complex voor dit oppervlak: vereenvoudig de illustraties van de symbolen of verlaag Segmenten @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` neemt maximaal {MAX_GRAPHICS} illustraties op diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 99ee2080b8..b04f60ab7e 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -5876,7 +5876,7 @@ mark-style Japanese Japońskie @msg `{GRAPHICS}` face must be front or back face w `{GRAPHICS}` musi mieć wartość front lub back @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} {key} w `{GRAPHICS}` musi być liczbą od {lo} do {hi} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` musi być tablicą -@msg Graphics map onto the Plane, Extrude and Revolve object types Grafiki są nakładane na obiekty typu Płaszczyzna, Wyciągnięcie i Obrót +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafiki są nakładane na obiekty typu Płaszczyzna, Wyciągnięcie, Obrót i Nadmuchanie @msg Revolve maps graphics onto its side: map them onto the front Obrót nakłada grafiki na swoją powierzchnię boczną: umieść je na przedniej stronie @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafiki są zbyt złożone dla tej powierzchni: uprość rysunki symboli lub zmniejsz Segmenty @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` przyjmuje najwyżej {MAX_GRAPHICS} grafik diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 677c8e460f..d86a571004 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -5994,7 +5994,7 @@ mark-style Japanese Japonesas @msg `{GRAPHICS}` face must be front or back face de `{GRAPHICS}` deve ser front ou back @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} {key} de `{GRAPHICS}` deve ser um número de {lo} a {hi} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` deve ser uma matriz -@msg Graphics map onto the Plane, Extrude and Revolve object types Os gráficos são mapeados nos tipos de objeto Plano, Extrusão e Revolver +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Os gráficos são mapeados nos tipos de objeto Plano, Extrusão, Revolver e Inflar @msg Revolve maps graphics onto its side: map them onto the front Revolver mapeia os gráficos na sua lateral: mapeie-os na face frontal @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Os gráficos são complexos demais para esta superfície: simplifique a arte dos símbolos ou reduza Segmentos @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` aceita no máximo {MAX_GRAPHICS} gráficos diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 106343cddd..6533a1dfd4 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -5648,7 +5648,7 @@ lighting Light Свет @msg `{GRAPHICS}` face must be front or back face в `{GRAPHICS}` должен быть front или back @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} {key} в `{GRAPHICS}` должен быть числом от {lo} до {hi} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` должен быть массивом -@msg Graphics map onto the Plane, Extrude and Revolve object types Графика наносится на объекты типов «Плоскость», «Выдавливание» и «Вращение» +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Графика наносится на объекты типов «Плоскость», «Выдавливание», «Вращение» и «Надувание» @msg Revolve maps graphics onto its side: map them onto the front «Вращение» наносит графику на свою боковую поверхность: размещайте её на передней стороне @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Графика слишком сложна для этой поверхности: упростите иллюстрации символов или уменьшите «Сегменты» @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` принимает не более {MAX_GRAPHICS} графических элементов diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index cc854aa362..2f61b31373 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -5512,7 +5512,7 @@ lighting Light Ljus @msg `{GRAPHICS}` face must be front or back face i `{GRAPHICS}` måste vara front eller back @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} {key} i `{GRAPHICS}` måste vara ett tal från {lo} till {hi} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` måste vara en matris -@msg Graphics map onto the Plane, Extrude and Revolve object types Grafik placeras på objekttyperna Plan, Extrudera och Rotera runt axel +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafik placeras på objekttyperna Plan, Extrudera, Rotera runt axel och Blås upp @msg Revolve maps graphics onto its side: map them onto the front Rotera runt axel placerar grafik på sin mantelyta: placera den på framsidan @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafiken är för komplex för den här ytan: förenkla symbolernas teckning eller minska Segment @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` tar högst {MAX_GRAPHICS} grafiker diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index f2888a30f0..583ac05f33 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -5375,7 +5375,7 @@ lighting Light Işık @msg `{GRAPHICS}` face must be front or back `{GRAPHICS}` face değeri front veya back olmalıdır @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} `{GRAPHICS}` {key} değeri {lo} ile {hi} arasında bir sayı olmalıdır @msg `{GRAPHICS}` must be an array `{GRAPHICS}` bir dizi olmalıdır -@msg Graphics map onto the Plane, Extrude and Revolve object types Grafikler Düzlem, Ekstrüzyon ve Döndür nesne türlerine eşlenir +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafikler Düzlem, Ekstrüzyon, Döndür ve Şişir nesne türlerine eşlenir @msg Revolve maps graphics onto its side: map them onto the front Döndür grafikleri yan yüzeyine eşler: onları ön yüze eşle @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafikler bu yüzey için çok karmaşık: sembollerin resmini basitleştir veya Segmentler değerini azalt @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` en fazla {MAX_GRAPHICS} grafik alır diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 411b2c3baf..405fd9814f 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -5641,7 +5641,7 @@ lighting Light Світло @msg `{GRAPHICS}` face must be front or back face у `{GRAPHICS}` має бути front або back @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} {key} у `{GRAPHICS}` має бути числом від {lo} до {hi} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` має бути масивом -@msg Graphics map onto the Plane, Extrude and Revolve object types Графіка наноситься на об’єкти типів «Площина», «Видавлювання» та «Обертання» +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Графіка наноситься на об’єкти типів «Площина», «Видавлювання», «Обертання» та «Надування» @msg Revolve maps graphics onto its side: map them onto the front «Обертання» наносить графіку на свою бічну поверхню: розміщуйте її на передній стороні @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Графіка надто складна для цієї поверхні: спростіть ілюстрації символів або зменште «Сегменти» @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` приймає не більше {MAX_GRAPHICS} графічних елементів diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 1460910197..6dfc1e65f9 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -5429,7 +5429,7 @@ theme Appearance Giao diện @msg `{GRAPHICS}` face must be front or back face của `{GRAPHICS}` phải là front hoặc back @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} {key} của `{GRAPHICS}` phải là số từ {lo} đến {hi} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` phải là một mảng -@msg Graphics map onto the Plane, Extrude and Revolve object types Đồ họa được đặt lên các loại đối tượng Mặt phẳng, Kéo dài và Xoay tròn +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Đồ họa được đặt lên các loại đối tượng Mặt phẳng, Kéo dài, Xoay tròn và Phình @msg Revolve maps graphics onto its side: map them onto the front Xoay tròn đặt đồ họa lên mặt bên của nó: hãy đặt chúng lên mặt trước @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Đồ họa quá phức tạp cho bề mặt này: hãy đơn giản hóa hình vẽ của các ký hiệu hoặc giảm Đoạn @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` nhận tối đa {MAX_GRAPHICS} đồ họa diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 3fe2f9e009..2033b20112 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -5915,8 +5915,8 @@ lighting Light 光源 @msg `{GRAPHICS}` face must be front or back `{GRAPHICS}` 的 face 必须是 front 或 back @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} `{GRAPHICS}` 的 {key} 必须是 {lo} 到 {hi} 之间的数字 @msg `{GRAPHICS}` must be an array `{GRAPHICS}` 必须是数组 -@msg Graphics map onto the Plane, Extrude and Revolve object types 图形映射到平面、突出和回转对象类型上 - Graphics map onto the Plane, Extrude and Revolve object types. 图形映射到平面、突出和回转对象类型上。 +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types 图形映射到平面、突出、回转和膨胀对象类型上 + Graphics map onto the Plane, Extrude, Revolve and Inflate object types. 图形映射到平面、突出、回转和膨胀对象类型上。 @msg Revolve maps graphics onto its side: map them onto the front 回转将图形映射到其侧面:请将图形映射到正面 @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments 图形对此表面过于复杂:请简化符号的图稿或减少分段数 @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` 最多接受 {MAX_GRAPHICS} 个图形 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index ab7f9d9dd2..29ada7e4a4 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -5750,8 +5750,8 @@ lighting Light 光源 @msg `{GRAPHICS}` face must be front or back `{GRAPHICS}` 的 face 必須是 front 或 back @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} `{GRAPHICS}` 的 {key} 必須是介於 {lo} 到 {hi} 之間的數字 @msg `{GRAPHICS}` must be an array `{GRAPHICS}` 必須是陣列 -@msg Graphics map onto the Plane, Extrude and Revolve object types 圖形會對應到「平面」、「突出」與「迴轉」物件類型 - Graphics map onto the Plane, Extrude and Revolve object types. 圖形會對應到「平面」、「突出」與「迴轉」物件類型。 +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types 圖形會對應到「平面」、「突出」、「迴轉」與「膨脹」物件類型 + Graphics map onto the Plane, Extrude, Revolve and Inflate object types. 圖形會對應到「平面」、「突出」、「迴轉」與「膨脹」物件類型。 @msg Revolve maps graphics onto its side: map them onto the front 迴轉會將圖形對應到其側面:請將圖形對應到正面 @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments 圖形對此表面過於複雜:請簡化符號的圖稿或減少分段數 @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` 最多接受 {MAX_GRAPHICS} 個圖形 diff --git a/crates/ui-egui/src/panels/tests_three_d.rs b/crates/ui-egui/src/panels/tests_three_d.rs index 72ce8004b5..a76c6ce05c 100644 --- a/crates/ui-egui/src/panels/tests_three_d.rs +++ b/crates/ui-egui/src/panels/tests_three_d.rs @@ -438,12 +438,16 @@ fn the_materials_tab_lists_the_graphics_and_maps_one_in_one_undo_step() { let nodes = controls(&mut app, &ctx); named(&nodes, "Remove Graphic"); named(&nodes, "Scale"); - // Inflate takes no graphics. + // Inflate keeps the graphic and lists it with its face and settings. set_type(&mut app, "inflate").unwrap(); + assert_eq!(graphics(&app).as_array().map(Vec::len), Some(1)); + let nodes = controls(&mut app, &ctx); + named(&nodes, "Remove Graphic"); + named(&nodes, "Scale"); let mut out = ctx.run_ui(egui::RawInput::default(), |ui| show(&mut app, ui)); out.textures_delta.clear(); let text = crate::tests_labels::shapes_text(&out); - assert!(text.contains("Graphics map onto the Plane, Extrude and Revolve object types"), "{text}"); + assert!(text.contains("Face") && !text.contains("Graphics map onto"), "{text}"); } #[test] diff --git a/docs/effects-parity.md b/docs/effects-parity.md index 342a5171b6..219e5b9621 100644 --- a/docs/effects-parity.md +++ b/docs/effects-parity.md @@ -180,7 +180,7 @@ VectorCraft choices; an original approximation, never compared with another appl |---|---| | Revolve | initial: live, editable profile, rotation and light gizmos, default-on Cap with continuous curved rims, smooth vector shading and round seam joins, overlapping faces drawn in the order of their depths where they overlap, SVG/PDF output, Expand Appearance ([revolve.md](revolve.md), #846) | | Extrude & Bevel, Inflate, Rotate | initial: live, round seam joins, depth, twist, taper, solid or hollow caps, five original bevel shapes, Inflate volume, both sides, twist, taper and cap, Rotate of every fill and stroke, groups and layers turned about one shared axis (#4506), contours that cross, touch or overlap merged first ([three-d.md](three-d.md)), Position presets, rotation and light gizmos, SVG/PDF output, Expand Appearance ([three-d.md](three-d.md)) | -| Materials panel, lighting, ray-traced render | Window › 3D and Materials panel with the object types (Plane, Extrude, Revolve, Inflate) and the Object, Rotation and Lighting settings of the applied effect, and Quick Actions › Expand as Wireframes ([three-d.md](three-d.md#3d-and-materials-panel)); one to ten directional lights with per-light Color (opaque RGB, white by default), Intensity, Rotation, Height, Softness and neutral Ambient Light, Revolve and colored Inflate use smooth vector shading; Extrude & Bevel and Rotate retain planar shading; original Standard, Diffuse, Top Left and Right lighting rigs; hard-edged shadows behind or below the object from the first light ([three-d.md](three-d.md#shadows)); the Materials tab's Graphics, document symbols mapped onto Extrude & Bevel's caps and onto a plane, moved with an artboard handle, and wrapped around Revolve's side ([three-d.md](three-d.md#graphics)); no base materials, graphics on Inflate or on Extrude & Bevel's walls and bevels, soft shadows or ray tracing | +| Materials panel, lighting, ray-traced render | Window › 3D and Materials panel with the object types (Plane, Extrude, Revolve, Inflate) and the Object, Rotation and Lighting settings of the applied effect, and Quick Actions › Expand as Wireframes ([three-d.md](three-d.md#3d-and-materials-panel)); one to ten directional lights with per-light Color (opaque RGB, white by default), Intensity, Rotation, Height, Softness and neutral Ambient Light, Revolve and colored Inflate use smooth vector shading; Extrude & Bevel and Rotate retain planar shading; original Standard, Diffuse, Top Left and Right lighting rigs; hard-edged shadows behind or below the object from the first light ([three-d.md](three-d.md#shadows)); the Materials tab's Graphics, document symbols mapped onto Extrude & Bevel's caps and onto a plane, moved with an artboard handle, wrapped around Revolve's side, and carried onto Inflate's puffed front and back ([three-d.md](three-d.md#graphics)); no base materials, graphics on Extrude & Bevel's walls and bevels, soft shadows or ray tracing | | 3D (Classic): Extrude & Bevel, Revolve, Rotate | Extrude & Bevel (Classic) initial: live, round seam joins, Extrude Depth, Cap, five original bevel shapes with Height and Bevel Extent In or Out, Position presets and rotation gizmo, Perspective, Wireframe, No Shading, Diffuse and Plastic surfaces with one to ten lights, Light Intensity, Ambient Light, Highlight Intensity and Size, Blend Steps, Black, Custom or no Shading Color, Draw Hidden Faces ([create 3D objects](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/create-3d-graphics/create-3d-objects.html)); Revolve (Classic) initial: live, round seam joins, Angle, Cap, Offset from the left or right edge, Position presets and rotation gizmo, Perspective, the same four surfaces, lights, highlight, Blend Steps and Shading Color, groups and layers revolved about one shared axis (same page); Rotate (Classic) initial: live, round seam joins, every fill and stroke turned as one plane, Position presets and rotation gizmo, Perspective, No Shading and Diffuse surfaces with lights, Ambient Light, Blend Steps and Shading Color ([rotate objects in 3D](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/create-3d-graphics/rotate-objects-in-3d.html)); Map Art: none | | Turntable (30.0 beta) | none | | Export 3D objects (OBJ, USDA, glTF) | initial: Asset Export's Export 3D Object collects an object with Extrude & Bevel, Revolve, Inflate or Rotate as a 3D asset, and Export writes its solids as a USDA (the default), USDZ, glTF or OBJ mesh with a material in each solid's paint color (`assets.add3D`, `assets.set3DFormat`, `assets.export3D`); no textures, map art or shading ([3D export help](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/create-3d-graphics/export-3d-vector-artwork.html)) | diff --git a/docs/mcp.md b/docs/mcp.md index 8ca4121032..12b57030b1 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -4114,15 +4114,17 @@ offset in points of the graphic's center from the center of the object's bounds percentage of the symbol's size (1..10000; omitted, 100 or less so the graphic fits inside the object) and `rotation` is in degrees counterclockwise (-360..360). Without `index` each object's first 3D effect takes it, and `item` is refused. Every object's 3D effect must be Extrude & Bevel with Cap on (front only at a depth of 0), Rotate (the Plane type, -front only) or Revolve (front only: its swept side), and `symbol` must name a document symbol; otherwise the command is refused and nothing changes. It returns `{ids, graphic}`. +front only), Revolve (front only: its swept side) or Inflate (back only with Both sides and Cap on), and `symbol` must name a document symbol; otherwise the command is refused and nothing changes. It returns `{ids, graphic}`. On Revolve, `x` and `y` are measured on the side unrolled flat from its middle, and a graphic that does not fit starts scaled to fit the half of the side seen from the front ([three-d.md](three-d.md#graphics)). +On Inflate, `x` and `y` are measured in the art's plane, and the graphic is carried straight out onto the puffed +face, Twist and Taper turning and shrinking the back's with it. -The graphics are the `graphics` parameter of `threeD.extrude`, `threeD.rotate` and `threeD.revolve`, which `effect.setParams` also +The graphics are the `graphics` parameter of `threeD.extrude`, `threeD.rotate`, `threeD.revolve` and `threeD.inflate`, which `effect.setParams` also edits: an array of up to 64 `{symbol, face, x, y, scale, rotation}` objects, drawn on the face turned, foreshortened and shaded with it and clipped to it ([Map artworks on 3D object](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/create-3d-graphics/map-artwork-on-3d-objects.html)). Revolve takes graphics on its swept side and shades them with the object's light ([the archived reference, page 185](https://web.archive.org/web/20210601162814/https://helpx.adobe.com/pdf/illustrator_reference.pdf#page=185)); -how a graphic wraps around the side is VectorCraft's own rule. +how a graphic wraps around the side, and how one follows Inflate's puff, are VectorCraft's own rules. A graphic naming a symbol the document does not have is refused, unless the effect already holds a graphic of it. The drawing rules are VectorCraft's own; see [three-d.md](three-d.md#graphics). diff --git a/docs/three-d.md b/docs/three-d.md index f12ca4675c..acfa006845 100644 --- a/docs/three-d.md +++ b/docs/three-d.md @@ -364,8 +364,8 @@ The public [Map artworks on 3D object](https://helpx.adobe.com/illustrator/deskt page describes graphics: art kept with the document and placed on single surfaces of a 3D object, and the [3D and Materials panel options](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/create-3d-graphics/3d-materials-panel-options.html) page lists Graphics and Add Materials and Graphics on the Materials tab. VectorCraft maps graphics onto -Extrude & Bevel's front and back caps, the plane of the Plane type (Rotate), and the swept side of Revolve, which the -public page's example of a label on a bottle describes. +Extrude & Bevel's front and back caps, the plane of the Plane type (Rotate), the swept side of Revolve, which the +public page's example of a label on a bottle describes, and Inflate's puffed front and back. - The panel's **Materials** tab shows the document's graphics as thumbnails. A graphic is a document symbol, as the public page allows existing symbols to be used. **Add as Single Graphic** keeps the selected art as a new @@ -374,7 +374,7 @@ public page's example of a label on a bottle describes. - Clicking a thumbnail maps that graphic onto the front of the 3D effect of each selected object (`threeD.mapGraphic`), in one undo step. A graphic larger than the object starts scaled down to fit inside it. - Below the thumbnails the tab lists the graphics mapped onto the first selected object. The selected one shows - its Face (Front or Back; Plane and Revolve show no Face, as a plane has only a front and Revolve's graphics go + its Face (Front or Back, on Inflate its puffed front or back; Plane and Revolve show no Face, as a plane has only a front and Revolve's graphics go on its side), X and Y (the offset of its center from the center of the object's bounds, in the face's plane), Scale (a percentage of the symbol's size) and Rotation (counterclockwise), and **Remove Graphic** takes it off. Each change is one undo step. @@ -397,6 +397,17 @@ These rules are VectorCraft's own: their own. A graphic on a face turned away from the viewer is not drawn. - On the back cap, X runs to the right as the back is seen from behind, so the graphic reads the right way round there. +- On Inflate a graphic is placed in the art's plane, X and Y measured from the center of the object's bounds as on + a cap, and carried straight out onto the puffed face above each point, so it follows the puff. The back takes + graphics only with Both sides and Cap on (`threeD.mapGraphic` refuses one otherwise, and one already there is + not drawn); it reads the right way round from behind, and Twist and Taper turn and shrink its graphics with it. + The membrane is cut into triangles, and each one draws the part of the graphic that falls on it, shaded as + that triangle is shaded and drawn only where the surface's outside faces the viewer; nearer triangles drawn + after it cover it. A cell of the membrane that cannot be cut into triangles takes no graphic. Every solid of + the object (a fill's, and a stroke's outline) carries the graphics. The handle sits on the point of the puffed + face above the graphic's center, and only where the viewer sees that face. The cutting into straight pieces, + the seam strokes and the limits below are those of Revolve; when the triangles take more faces than a 3D + effect draws, the object draws without its graphics and commands refuse them. - On Revolve a graphic lies on the swept side, which has one face (Front), unrolled flat. X runs around the axis: the angle from the middle of the side times the profile's distance from the axis at that point, so a graphic keeps its size at every distance and wraps farther around the axis where the profile comes nearer to it. Y runs @@ -431,9 +442,9 @@ These rules are VectorCraft's own: past either limit. A loaded file draws the object without a graphic past the first limit, and without all of its graphics past the second. - A hollow Extrude & Bevel has no caps, so its graphics are not drawn until Cap is turned on again, and - `threeD.mapGraphic` refuses to map a new one onto it. Changing the type to Inflate drops the graphics, and - changing between Extrude, Plane and Revolve keeps them, except that Plane and Revolve drop the graphics on the - back cap; on Revolve the front's graphics go on its side. + `threeD.mapGraphic` refuses to map a new one onto it. Changing between Extrude, Plane, Revolve and Inflate keeps + the graphics, except that Plane and Revolve drop the graphics on the back cap; on Revolve the front's graphics go + on its side, and on Inflate they go on the puffed faces. - `effect.apply` and `effect.setParams` refuse a graphic that names a symbol the document does not have, unless the effect already holds a graphic of that symbol. A graphic whose symbol is deleted is no longer drawn. Renaming a symbol renames it in the graphics that use it, in the layers, in the art of symbols, patterns, graph designs, brushes and opacity masks, and in graphic @@ -447,7 +458,7 @@ These rules are VectorCraft's own: uses: `rotationX`, `rotationY`, `rotationZ`, `perspectiveAngle` (degrees), `shade`, `lightColor` (`#rrggbb`, default `#ffffff`), `lightIntensity` (%), `lightRotation`, `lightHeight` (degrees), `lightSoftness` (%), `ambient` (%, to 200), `lightBehind`. Lengths are points and scale with the object (Scale Strokes & Effects). Commands validate the shape and the parameters before the document changes. All four also take `lights`: null (the default, use the earlier single-light fields), or an array of one to ten objects. Each object takes `color` (opaque `#rrggbb`, white), `intensity` (0..100%, 80), `rotation` (-180..180 degrees, 125.26), `height` (0..90 degrees, 30), `softness` (0..100%, 0), and `behind` (boolean, false). Omitted settings use those defaults. An explicit list replaces the earlier single light; `ambient` and `shade` remain shared. Set `lights` to null to return to the single-light fields. Invalid lists, counts, keys and values are rejected before editing; malformed loaded lists fall back to the earlier light safely. All four take `shadow` (boolean, false), `shadowPosition` (`behind` or `below`), `shadowDistance` (0..100%, 0) and `shadowBounds` (10..400%, 100) ([Shadows](#shadows)); values out of range are rejected before editing. -`threeD.extrude`, `threeD.rotate` and `threeD.revolve` take `graphics` ([Graphics](#graphics)): an array of up to 64 objects, each +`threeD.extrude`, `threeD.rotate`, `threeD.revolve` and `threeD.inflate` take `graphics` ([Graphics](#graphics)): an array of up to 64 objects, each with `symbol` (the name of a document symbol), `face` (`front` or `back`, default `front`; `threeD.rotate` and `threeD.revolve` take `front` only), `x` and `y` (points, default 0), `scale` (1..10000%, default 100) and `rotation` (-360..360 degrees, default 0). Other keys, values out of range and graphics on the other 3D effects are rejected before editing. @@ -459,10 +470,10 @@ and [Create 3D objects](https://helpx.adobe.com/illustrator/desktop/special-effe pages, and the archived Extrude & Bevel option list (depth 0–2,000, cap on/off, bevel height, bevel extent in or out, perspective). No Adobe software, assets, presets or bevel shapes were used. -- **Materials** (base and Adobe Substance), graphics on Inflate and on Extrude & Bevel's walls and bevels, soft +- **Materials** (base and Adobe Substance), graphics on Extrude & Bevel's walls and bevels, soft shadows, shadows of lights after the first, and **ray-traced rendering** are not built: shading uses directional lights, in the paint of the fill or stroke the solid is built for ([Fills and strokes](#fills-and-strokes)), and - the shadow is hard-edged ([Shadows](#shadows)). Graphics map onto planar faces and Revolve's side only + the shadow is hard-edged ([Shadows](#shadows)). Graphics map onto planar faces, Revolve's side and Inflate's puffed faces only ([Graphics](#graphics)). - The bevel shapes and their names are our own; custom bevel paths are not supported. - Visibility is a painter's algorithm: faces of a closed solid turned away are left out, and the rest are drawn From 0dc5ecfbb0f439c725d3b24e2c062ecf197a9ab2 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 15 Nov 2026 07:29:28 -0800 Subject: [PATCH 02/49] i18n: Map Graphic's Inflate back refusal is translated threeD.mapGraphic refuses Inflate's back while Both sides or Cap is off, and that message had no @msg row in any catalog, so it showed in English in every language. Each complete-message catalog now has a row for it, next to the Revolve refusal, and a test checks that the refusal shows translated, with the object's number, in every complete-message language. --- crates/ui-egui/src/i18n/ca.tsv | 1 + crates/ui-egui/src/i18n/cs.tsv | 1 + crates/ui-egui/src/i18n/da.tsv | 1 + crates/ui-egui/src/i18n/de.tsv | 1 + crates/ui-egui/src/i18n/el.tsv | 1 + crates/ui-egui/src/i18n/es.tsv | 1 + crates/ui-egui/src/i18n/fi.tsv | 1 + crates/ui-egui/src/i18n/fr.tsv | 1 + crates/ui-egui/src/i18n/hi.tsv | 1 + crates/ui-egui/src/i18n/hu.tsv | 1 + crates/ui-egui/src/i18n/it.tsv | 1 + crates/ui-egui/src/i18n/ja.tsv | 1 + crates/ui-egui/src/i18n/ka.tsv | 1 + crates/ui-egui/src/i18n/ko.tsv | 1 + crates/ui-egui/src/i18n/nl.tsv | 1 + crates/ui-egui/src/i18n/pl.tsv | 1 + crates/ui-egui/src/i18n/pt-br.tsv | 1 + crates/ui-egui/src/i18n/ru.tsv | 1 + crates/ui-egui/src/i18n/sv.tsv | 1 + crates/ui-egui/src/i18n/tests.rs | 22 ++++++++++++++++++++++ crates/ui-egui/src/i18n/tr.tsv | 1 + crates/ui-egui/src/i18n/uk.tsv | 1 + crates/ui-egui/src/i18n/vi.tsv | 1 + crates/ui-egui/src/i18n/zh-hans.tsv | 1 + crates/ui-egui/src/i18n/zh-hant.tsv | 1 + 25 files changed, 46 insertions(+) diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index f552f968f8..bc61095051 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -6357,6 +6357,7 @@ digits Malayalam Malaiàlam @msg `{GRAPHICS}` must be an array `{GRAPHICS}` ha de ser una matriu @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Els gràfics s’apliquen als tipus d’objecte Pla, Extrusió, Revolució i Infla @msg Revolve maps graphics onto its side: map them onto the front Revoluciona aplica els gràfics al seu lateral: aplica’ls a la cara davantera +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on l’objecte {_1}: la cara posterior d’Infla només admet gràfics amb Tots dos costats i Tapa activats @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Els gràfics són massa complexos per a aquesta superfície: simplifica la il·lustració dels símbols o redueix Segments @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` admet com a màxim {MAX_GRAPHICS} gràfics @msg A plane has one face: map its graphics onto the front Un pla té una sola cara: aplica’n els gràfics a la cara davantera diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 5bd83f10cc..bc93c728ad 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -6154,6 +6154,7 @@ mark-style Japanese Japonské @msg `{GRAPHICS}` must be an array `{GRAPHICS}` musí být pole @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafika se mapuje na typy objektu Rovina, Vysunutí, Rotační těleso a Nafouknutí @msg Revolve maps graphics onto its side: map them onto the front Rotační těleso mapuje grafiku na svůj bok: umístěte ji na přední stranu +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on objekt {_1}: zadní strana Nafouknutí přijímá grafiku jen se zapnutými volbami Obě strany a Uzávěr @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafika je pro tento povrch příliš složitá: zjednodušte kresbu symbolů nebo snižte Segmenty @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` přijímá nejvýše {MAX_GRAPHICS} grafik @msg A plane has one face: map its graphics onto the front Rovina má jednu stranu: umístěte její grafiku na přední stranu diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index d5464fa7f8..d1c920ea61 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -333,6 +333,7 @@ @msg `{GRAPHICS}` must be an array `{GRAPHICS}` skal være et array @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafik kortlægges på objekttyperne Plan, Ekstrudér, Omdrej og Pust op @msg Revolve maps graphics onto its side: map them onto the front Omdrej kortlægger grafik på siden: kortlæg den på forsiden +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on objektet {_1}: bagsiden af Pust op tager kun imod grafik, når Begge sider og Kappe er slået til @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafikken er for kompleks til denne overflade: forenkl symbolernes grafik, eller reducér Segmenter @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` tager højst {MAX_GRAPHICS} grafikelementer @msg A plane has one face: map its graphics onto the front Et plan har én flade: kortlæg dets grafik på forsiden diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 7ab61d0481..518d4c1c01 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -5725,6 +5725,7 @@ lighting Light Licht @msg `{GRAPHICS}` must be an array `{GRAPHICS}` muss ein Array sein @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafiken werden auf die Objekttypen Ebene, Extrudieren, Kreiseln und Aufblasen abgebildet @msg Revolve maps graphics onto its side: map them onto the front Kreiseln bildet Grafiken auf seiner Mantelfläche ab: Bilden Sie sie auf der Vorderseite ab +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on Objekt {_1}: Die Rückseite von „Aufblasen“ nimmt Grafiken nur mit aktivierten Optionen „Beidseitig“ und „Deckflächen“ auf @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Die Grafiken sind für diese Oberfläche zu komplex: Vereinfachen Sie das Bildmaterial der Symbole oder verringern Sie Segmente @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` nimmt höchstens {MAX_GRAPHICS} Grafiken auf @msg A plane has one face: map its graphics onto the front Eine Ebene hat nur eine Seite: Bilden Sie ihre Grafiken auf der Vorderseite ab diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 13d301b21b..69f29e8d8b 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -5528,6 +5528,7 @@ digits Malayalam Μαλαγιάλαμ @msg `{GRAPHICS}` must be an array το `{GRAPHICS}` πρέπει να είναι πίνακας @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Τα γραφικά αντιστοιχίζονται στους τύπους αντικειμένου Επίπεδο, Εξώθηση, Περιστροφή γύρω από άξονα και Φούσκωμα @msg Revolve maps graphics onto its side: map them onto the front Η Περιστροφή γύρω από άξονα αντιστοιχίζει τα γραφικά στην πλευρική της επιφάνεια: αντιστοιχίστε τα στην μπροστινή όψη +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on το αντικείμενο {_1}: η πίσω όψη του Φουσκώματος δέχεται γραφικά μόνο με ενεργά τα Και οι δύο πλευρές και Κλείσιμο άκρου @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Τα γραφικά είναι πολύ σύνθετα για αυτή την επιφάνεια: απλοποιήστε το σχέδιο των συμβόλων ή μειώστε τα Τμήματα @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics το `{GRAPHICS}` δέχεται το πολύ {MAX_GRAPHICS} γραφικά @msg A plane has one face: map its graphics onto the front Ένα επίπεδο έχει μία όψη: αντιστοιχίστε τα γραφικά του στην μπροστινή όψη diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 9b31169a5f..ca1ed2ad54 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -6108,6 +6108,7 @@ mark-style Japanese Japonesas @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Los gráficos se asignan a los tipos de objeto Plano, Extrusión, Revolución e Inflar Graphics map onto the Plane, Extrude, Revolve and Inflate object types. Los gráficos se asignan a los tipos de objeto Plano, Extrusión, Revolución e Inflar. @msg Revolve maps graphics onto its side: map them onto the front Revolución asigna los gráficos a su lateral: asígnelos a la cara frontal +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on el objeto {_1}: la cara posterior de Inflar admite gráficos solo con Ambos lados y Tapa activados @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Los gráficos son demasiado complejos para esta superficie: simplifique la ilustración de los símbolos o reduzca Segmentos @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` admite como máximo {MAX_GRAPHICS} gráficos @msg A plane has one face: map its graphics onto the front Un plano tiene una sola cara: asigne sus gráficos a la cara frontal diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 4634f0e67a..a43c7f1990 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -6049,6 +6049,7 @@ mark-style Japanese Japanilainen @msg `{GRAPHICS}` must be an array `{GRAPHICS}` on oltava taulukko @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafiikat sijoitetaan objektityypeille Taso, Pursota, Pyöräytä ja Täytä ilmalla @msg Revolve maps graphics onto its side: map them onto the front Pyöräytä sijoittaa grafiikat kylkeensä: sijoita ne etupuolelle +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on objekti {_1}: Täytä ilmalla -tehosteen takapuoli ottaa grafiikoita vain, kun Molemmat puolet ja Pääty ovat käytössä @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafiikat ovat liian monimutkaisia tälle pinnalle: yksinkertaista symbolien kuvitusta tai pienennä Segmentit-arvoa @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` hyväksyy enintään {MAX_GRAPHICS} grafiikkaa @msg A plane has one face: map its graphics onto the front Tasolla on yksi puoli: sijoita sen grafiikat etupuolelle diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 72ab16b430..b6a666f4d1 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -5722,6 +5722,7 @@ lighting Light Lumière @msg `{GRAPHICS}` must be an array `{GRAPHICS}` doit être un tableau @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Les graphiques s'appliquent aux types d'objet Plan, Extrusion, Révolution et Gonfler @msg Revolve maps graphics onto its side: map them onto the front Révolution applique les graphiques sur sa face latérale : appliquez-les sur la face avant +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on objet {_1} : l’arrière de Gonfler n’accepte des graphiques qu’avec Deux côtés et Fermeture activés @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Les graphiques sont trop complexes pour cette surface : simplifiez l'illustration des symboles ou réduisez Segments @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` accepte au plus {MAX_GRAPHICS} graphiques @msg A plane has one face: map its graphics onto the front Un plan n'a qu'une face : appliquez ses graphiques sur la face avant diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 198d9b740c..99c831f667 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -8190,6 +8190,7 @@ antiAlias Sharp शार्प @msg `{GRAPHICS}` must be an array `{GRAPHICS}` एक ऐरे होना चाहिए @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types ग्राफ़िक्स समतल, एक्सट्रूड, रिवॉल्व और फुलाएँ ऑब्जेक्ट प्रकारों पर लगते हैं @msg Revolve maps graphics onto its side: map them onto the front रिवॉल्व ग्राफ़िक्स को अपनी बगल वाली सतह पर लगाता है: उन्हें सामने वाले फ़ेस पर लगाएँ +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on ऑब्जेक्ट {_1}: फुलाएँ का पिछला फ़ेस ग्राफ़िक्स तभी लेता है जब दोनों तरफ़ और कैप चालू हों @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments ग्राफ़िक्स इस सतह के लिए बहुत जटिल हैं: सिंबल्स के आर्ट को सरल बनाएँ या सेगमेंट कम करें @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` अधिकतम {MAX_GRAPHICS} ग्राफ़िक्स लेता है @msg A plane has one face: map its graphics onto the front समतल का एक ही फ़ेस होता है: उसके ग्राफ़िक्स को सामने वाले फ़ेस पर लगाएँ diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index a0182d1f0f..ce9870eb87 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -6138,6 +6138,7 @@ imageTrace Outline Körvonal @msg `{GRAPHICS}` must be an array a `{GRAPHICS}` értéke tömb kell legyen @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types A grafikák a Sík, a Kihúzás, a Forgatás tengely körül és a Felfújás objektumtípusra kerülnek @msg Revolve maps graphics onto its side: map them onto the front A Forgatás tengely körül a grafikákat a palástjára helyezi: az elülső oldalra helyezze őket +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on {_1} objektum: a Felfújás hátoldala csak a Mindkét oldal és a Zárólap bekapcsolásával fogad grafikát @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments A grafikák túl összetettek ehhez a felülethez: egyszerűsítse a szimbólumok rajzát, vagy csökkentse a Szakaszok értékét @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics a `{GRAPHICS}` legfeljebb {MAX_GRAPHICS} grafikát fogad @msg A plane has one face: map its graphics onto the front A síknak egy oldala van: a grafikáit az elülső oldalra helyezze diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 8616ae9c25..2cf2c5020a 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -5769,6 +5769,7 @@ lighting Light Luce @msg `{GRAPHICS}` must be an array `{GRAPHICS}` deve essere un array @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Le grafiche si applicano ai tipi di oggetto Piano, Estrusione, Rivoluzione e Gonfia @msg Revolve maps graphics onto its side: map them onto the front Rivoluzione applica le grafiche sul suo lato: applicatele sulla faccia anteriore +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on oggetto {_1}: il retro di Gonfia accetta grafiche solo con Entrambi i lati e Chiusura attivi @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Le grafiche sono troppo complesse per questa superficie: semplificate il disegno dei simboli o riducete Segmenti @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` accetta al massimo {MAX_GRAPHICS} grafiche @msg A plane has one face: map its graphics onto the front Un piano ha una sola faccia: applicate le sue grafiche sulla faccia anteriore diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index cdfe627f57..5c2d2e8948 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -5813,6 +5813,7 @@ lighting Light ライト @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types グラフィックはオブジェクトの種類が平面、押し出し、回転体、膨張のときにマッピングされます Graphics map onto the Plane, Extrude, Revolve and Inflate object types. グラフィックはオブジェクトの種類が平面、押し出し、回転体、膨張のときにマッピングされます。 @msg Revolve maps graphics onto its side: map them onto the front 回転体はグラフィックを側面にマッピングします。前面にマッピングしてください +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on オブジェクト {_1}: 「膨張」の背面にグラフィックをマッピングするには「両面」と「キャップ」をオンにしてください @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments グラフィックがこのサーフェスには複雑すぎます。シンボルのアートを単純化するか、分割数を減らしてください @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` に指定できるグラフィックは {MAX_GRAPHICS} 個までです @msg A plane has one face: map its graphics onto the front 平面には面が 1 つしかありません。グラフィックは前面にマッピングしてください diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index a02a2ffd30..ad71f6d901 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -7514,6 +7514,7 @@ font-technology Variable ცვლადი @msg `{GRAPHICS}` must be an array `{GRAPHICS}` უნდა იყოს მასივი @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types გრაფიკა თავსდება ობიექტის ტიპებზე „სიბრტყე“, „ამოწევა“, „ბრუნვა“ და „გაბერვა“ @msg Revolve maps graphics onto its side: map them onto the front ბრუნვა გრაფიკას თავის გვერდით ზედაპირზე ათავსებს: განათავსეთ ისინი წინა მხარეზე +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on ობიექტი {_1}: გაბერვის უკანა მხარე გრაფიკას იღებს მხოლოდ ჩართული „ორივე მხარე“ და „თავსახური“ პარამეტრებით @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments გრაფიკა ზედმეტად რთულია ამ ზედაპირისთვის: გაამარტივეთ სიმბოლოების ნახატი ან შეამცირეთ სეგმენტები @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` იღებს მაქსიმუმ {MAX_GRAPHICS} გრაფიკას @msg A plane has one face: map its graphics onto the front სიბრტყეს ერთი მხარე აქვს: მისი გრაფიკა წინა მხარეზე განათავსეთ diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 213ef60172..e1148a76e0 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -5731,6 +5731,7 @@ lighting Light 광원 @msg `{GRAPHICS}` must be an array `{GRAPHICS}`은(는) 배열이어야 합니다 @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types 그래픽은 평면, 돌출, 회전체, 부풀리기 개체 유형에 매핑됩니다 @msg Revolve maps graphics onto its side: map them onto the front 회전체는 그래픽을 옆면에 매핑합니다. 앞면에 매핑하십시오 +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on 개체 {_1}: 부풀리기의 뒷면에 그래픽을 매핑하려면 양면과 캡을 켜세요 @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments 그래픽이 이 표면에 비해 너무 복잡합니다. 심볼의 아트를 단순화하거나 세그먼트를 줄이십시오 @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}`에는 그래픽을 최대 {MAX_GRAPHICS}개까지 넣을 수 있습니다 @msg A plane has one face: map its graphics onto the front 평면에는 면이 하나뿐입니다. 그래픽을 앞면에 매핑하십시오 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 5f7cc834ce..f81a5d07ac 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -7908,6 +7908,7 @@ mark-style Japanese Japans @msg Graphics map onto planar faces: use the Extrude or Plane object type Illustraties worden op platte vlakken geplaatst: gebruik het objecttype Extruderen of Vlak @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Illustraties worden op de objecttypen Vlak, Extruderen, Draaien en Opblazen geplaatst @msg Revolve maps graphics onto its side: map them onto the front Draaien plaatst illustraties op de zijkant: plaats ze op de voorkant +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on object {_1}: de achterkant van Opblazen neemt alleen afbeeldingen aan met Beide zijden en Dop ingeschakeld @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments De illustraties zijn te complex voor dit oppervlak: vereenvoudig de illustraties van de symbolen of verlaag Segmenten @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` neemt maximaal {MAX_GRAPHICS} illustraties op @msg A plane has one face: map its graphics onto the front Een vlak heeft één zijde: plaats de illustraties ervan op de voorkant diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 7130db0392..3aae706a4b 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -5984,6 +5984,7 @@ mark-style Japanese Japońskie @msg `{GRAPHICS}` must be an array `{GRAPHICS}` musi być tablicą @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafiki są nakładane na obiekty typu Płaszczyzna, Wyciągnięcie, Obrót i Nadmuchanie @msg Revolve maps graphics onto its side: map them onto the front Obrót nakłada grafiki na swoją powierzchnię boczną: umieść je na przedniej stronie +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on obiekt {_1}: tył Nadmuchania przyjmuje grafiki tylko przy włączonych opcjach Obie strony i Zakończenie @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafiki są zbyt złożone dla tej powierzchni: uprość rysunki symboli lub zmniejsz Segmenty @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` przyjmuje najwyżej {MAX_GRAPHICS} grafik @msg A plane has one face: map its graphics onto the front Płaszczyzna ma jedną stronę: umieść jej grafiki na przedniej stronie diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 9ff4493250..938e74605b 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -6105,6 +6105,7 @@ mark-style Japanese Japonesas @msg `{GRAPHICS}` must be an array `{GRAPHICS}` deve ser uma matriz @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Os gráficos são mapeados nos tipos de objeto Plano, Extrusão, Revolver e Inflar @msg Revolve maps graphics onto its side: map them onto the front Revolver mapeia os gráficos na sua lateral: mapeie-os na face frontal +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on objeto {_1}: o verso de Inflar recebe gráficos apenas com Ambos os Lados e Tampa ativados @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Os gráficos são complexos demais para esta superfície: simplifique a arte dos símbolos ou reduza Segmentos @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` aceita no máximo {MAX_GRAPHICS} gráficos @msg A plane has one face: map its graphics onto the front Um plano tem uma única face: mapeie seus gráficos na face frontal diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 21a7cf7af1..b6fd9ade6f 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -5767,6 +5767,7 @@ lighting Light Свет @msg `{GRAPHICS}` must be an array `{GRAPHICS}` должен быть массивом @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Графика наносится на объекты типов «Плоскость», «Выдавливание», «Вращение» и «Надувание» @msg Revolve maps graphics onto its side: map them onto the front «Вращение» наносит графику на свою боковую поверхность: размещайте её на передней стороне +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on объект {_1}: задняя сторона «Надувания» принимает графику только при включённых параметрах «С обеих сторон» и «Торцы» @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Графика слишком сложна для этой поверхности: упростите иллюстрации символов или уменьшите «Сегменты» @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` принимает не более {MAX_GRAPHICS} графических элементов @msg A plane has one face: map its graphics onto the front У плоскости одна сторона: размещайте её графику на передней стороне diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 53c8b2a9dc..5d19bb0562 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -5630,6 +5630,7 @@ lighting Light Ljus @msg `{GRAPHICS}` must be an array `{GRAPHICS}` måste vara en matris @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafik placeras på objekttyperna Plan, Extrudera, Rotera runt axel och Blås upp @msg Revolve maps graphics onto its side: map them onto the front Rotera runt axel placerar grafik på sin mantelyta: placera den på framsidan +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on objekt {_1}: baksidan av Blås upp tar emot grafik bara när Båda sidor och Lock är på @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafiken är för komplex för den här ytan: förenkla symbolernas teckning eller minska Segment @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` tar högst {MAX_GRAPHICS} grafiker @msg A plane has one face: map its graphics onto the front Ett plan har en sida: placera dess grafik på framsidan diff --git a/crates/ui-egui/src/i18n/tests.rs b/crates/ui-egui/src/i18n/tests.rs index b632e5cac3..b11b4676ef 100644 --- a/crates/ui-egui/src/i18n/tests.rs +++ b/crates/ui-egui/src/i18n/tests.rs @@ -2772,6 +2772,28 @@ fn three_d_refusals_translate_with_their_values() { assert_eq!(message(de(), &errors[1].0), "ungültige Parameter für `effect.apply`: Licht: intensity muss eine Zahl von 0 bis 100 sein"); } +/// Map Graphic's refusal of Inflate's back while Both sides or Cap is off shows in every +/// complete-message language, with the object's number as given. +#[test] +fn inflate_back_refusal_translates_in_every_complete_catalog() { + use serde_json::json; + let mut s = vectorcraft_engine::Session::new(); + s.execute("file.new", &json!({"width": 400, "height": 400})).unwrap(); + let mark = s.execute("path.create", &json!({"d": "M300 300L310 300L310 320L300 320Z"})).unwrap()["id"].clone(); + s.execute("threeD.addGraphic", &json!({"name": "Mark", "ids": [mark]})).unwrap(); + let id = s.execute("path.create", &json!({"d": "M100 100L200 100L200 200L100 200Z"})).unwrap()["id"].as_u64().unwrap(); + s.execute("effect.apply", &json!({"effect": "threeD.inflate", "item": null, "params": {}})).unwrap(); + let e = s.execute("threeD.mapGraphic", &json!({"symbol": "Mark", "face": "back", "ids": [id]})).unwrap_err().to_string(); + let english = "Inflate's back takes graphics with Both sides and Cap on"; + assert!(e.ends_with(&format!("object {id}: {english}")), "{e}"); + assert_eq!(message(Lang::EN, &e), e); + for code in COMPLETE_MESSAGES { + let lang = Lang::from_code(code).expect("registered"); + let shown = message(lang, &e); + assert!(!shown.contains(english) && shown.contains(&id.to_string()) && shown.contains("`threeD.mapGraphic`"), "{code}: {e} -> {shown}"); + } +} + /// A value a message quotes is a name and is shown as written, even when a catalog row translates /// the same text: a symbol called Rotate stays Rotate while the effect's name is translated. #[test] diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 6a0254cb9f..7867dd5f2f 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -5474,6 +5474,7 @@ lighting Light Işık @msg `{GRAPHICS}` must be an array `{GRAPHICS}` bir dizi olmalıdır @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafikler Düzlem, Ekstrüzyon, Döndür ve Şişir nesne türlerine eşlenir @msg Revolve maps graphics onto its side: map them onto the front Döndür grafikleri yan yüzeyine eşler: onları ön yüze eşle +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on nesne {_1}: Şişir efektinin arka yüzü yalnızca Her iki taraf ve Kapak açıkken grafik alır @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafikler bu yüzey için çok karmaşık: sembollerin resmini basitleştir veya Segmentler değerini azalt @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` en fazla {MAX_GRAPHICS} grafik alır @msg A plane has one face: map its graphics onto the front Bir düzlemin tek yüzü vardır: grafiklerini ön yüze eşle diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 44c176f2c0..b1a36df896 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -5749,6 +5749,7 @@ lighting Light Світло @msg `{GRAPHICS}` must be an array `{GRAPHICS}` має бути масивом @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Графіка наноситься на об’єкти типів «Площина», «Видавлювання», «Обертання» та «Надування» @msg Revolve maps graphics onto its side: map them onto the front «Обертання» наносить графіку на свою бічну поверхню: розміщуйте її на передній стороні +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on об’єкт {_1}: задній бік «Надування» приймає графіку лише з увімкненими параметрами «З обох боків» і «Торці» @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Графіка надто складна для цієї поверхні: спростіть ілюстрації символів або зменште «Сегменти» @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` приймає не більше {MAX_GRAPHICS} графічних елементів @msg A plane has one face: map its graphics onto the front Площина має одну сторону: розміщуйте її графіку на передній стороні diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 8b2a49afc3..07b6c6b51b 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -5550,6 +5550,7 @@ theme Appearance Giao diện @msg `{GRAPHICS}` must be an array `{GRAPHICS}` phải là một mảng @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Đồ họa được đặt lên các loại đối tượng Mặt phẳng, Kéo dài, Xoay tròn và Phình @msg Revolve maps graphics onto its side: map them onto the front Xoay tròn đặt đồ họa lên mặt bên của nó: hãy đặt chúng lên mặt trước +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on đối tượng {_1}: mặt sau của Phình chỉ nhận đồ họa khi bật Cả hai mặt và Nắp @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Đồ họa quá phức tạp cho bề mặt này: hãy đơn giản hóa hình vẽ của các ký hiệu hoặc giảm Đoạn @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` nhận tối đa {MAX_GRAPHICS} đồ họa @msg A plane has one face: map its graphics onto the front Mặt phẳng chỉ có một mặt: hãy đặt đồ họa của nó lên mặt trước diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 542eaf60d8..ebc782b2de 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -6024,6 +6024,7 @@ lighting Light 光源 @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types 图形映射到平面、突出、回转和膨胀对象类型上 Graphics map onto the Plane, Extrude, Revolve and Inflate object types. 图形映射到平面、突出、回转和膨胀对象类型上。 @msg Revolve maps graphics onto its side: map them onto the front 回转将图形映射到其侧面:请将图形映射到正面 +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on 对象 {_1}:只有打开“双面”和“封口”后,膨胀的背面才能贴图 @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments 图形对此表面过于复杂:请简化符号的图稿或减少分段数 @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` 最多接受 {MAX_GRAPHICS} 个图形 @msg A plane has one face: map its graphics onto the front 平面只有一个面:请将其图形映射到正面 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index ccaa45c48a..4fb593e175 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -5860,6 +5860,7 @@ lighting Light 光源 @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types 圖形會對應到「平面」、「突出」、「迴轉」與「膨脹」物件類型 Graphics map onto the Plane, Extrude, Revolve and Inflate object types. 圖形會對應到「平面」、「突出」、「迴轉」與「膨脹」物件類型。 @msg Revolve maps graphics onto its side: map them onto the front 迴轉會將圖形對應到其側面:請將圖形對應到正面 +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on 物件 {_1}:只有開啟「雙面」和「封口」後,膨脹的背面才能對應圖形 @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments 圖形對此表面過於複雜:請簡化符號的圖稿或減少分段數 @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` 最多接受 {MAX_GRAPHICS} 個圖形 @msg A plane has one face: map its graphics onto the front 平面只有一個面:請將其圖形對應到正面 From 3f23c67afefb0a19024187725061b8b507f6224c Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 15 Nov 2026 08:03:58 -0800 Subject: [PATCH 03/49] 3D: graphics on Inflate cover cells around a hole A cell of Inflate's front or back that held a whole hole, or a piece with more than 128 corners, was drawn as one polygon without the art points graphics need, so a graphic crossing it left a gap there. With graphics mapped, such a cell is now cut into triangles with its holes bridged, keeping the corners along its border that neighboring cells share, and each triangle carries its art points. All such cells of one surface share one work budget, and the cut stops as soon as it passes that budget. A cell whose pieces have more than 4,096 corners, or a surface past the budget, is refused as too complex. --- crates/three-d/src/mesh.rs | 42 +++++++++++++--- crates/three-d/src/mesh/tests.rs | 30 ++++++++++++ crates/three-d/src/solid.rs | 4 +- crates/three-d/src/solid/inflate.rs | 48 ++++++++++++++++-- crates/three-d/src/solid/tests.rs | 75 +++++++++++++++++++++++++++++ 5 files changed, 187 insertions(+), 12 deletions(-) diff --git a/crates/three-d/src/mesh.rs b/crates/three-d/src/mesh.rs index cd9623191c..fc01b76785 100644 --- a/crates/three-d/src/mesh.rs +++ b/crates/three-d/src/mesh.rs @@ -8,7 +8,7 @@ //! turned plane) are cut into triangles: each hole is joined to its outline by a bridge, then the //! outline is cut by ear clipping. -use vectorcraft_geom::{FillRule, PathData, Rect}; +use vectorcraft_geom::{FillRule, PathData, Point, Rect}; use crate::solid::{Face3, Keep, extrude_faces, inflate_faces, plane_faces}; use crate::{Extrude, Facet, Inflate, Revolve, V3, View}; @@ -211,6 +211,12 @@ fn spend(work: &mut usize, steps: usize) -> Result<(), String> { /// The triangles covering one face: `contours` (outlines one way round, holes the other) on the /// plane across `normal` (its Newell normal). fn triangulate(contours: &[Vec], normal: V3, work: &mut usize) -> Result, String> { + triangulate_keeping(contours, normal, work, false) +} + +/// [`triangulate`], keeping the corners that lie straight between their neighbors as triangle +/// corners when `keep_straight` is set. +fn triangulate_keeping(contours: &[Vec], normal: V3, work: &mut usize, keep_straight: bool) -> Result, String> { // Cut the face on the coordinate plane it is least slanted to, turned so outlines run // counterclockwise. let (ax, ay, az) = (normal.0.abs(), normal.1.abs(), normal.2.abs()); @@ -281,11 +287,30 @@ fn triangulate(contours: &[Vec], normal: V3, work: &mut usize) -> Result], work: &mut usize, budget: usize) -> Option> { + let contours: Vec> = rings.iter().map(|r| r.iter().map(|q| V3(q.x, q.y, 0.0)).collect()).collect(); + // Counted up from MAX_WORK less the budget, the cut's own checks stop it at the budget. + let start = MAX_WORK - budget.min(MAX_WORK); + let mut spent = start.saturating_add(*work); + let triangles = triangulate_keeping(&contours, V3(0.0, 0.0, 1.0), &mut spent, true); + *work = spent.saturating_sub(start); + let triangles = triangles.ok()?; + let triangles = triangles.into_iter().map(|t| t.map(|v| Point::new(v.0, v.1))); + Some(triangles.filter(|[a, b, c]| (*b - *a).cross(*c - *a) > 0.0).collect()) +} + /// Do segments `a`–`b` and `c`–`d` cross (touching at a shared end does not count)? fn crosses(a: (f64, f64), b: (f64, f64), c: (f64, f64), d: (f64, f64)) -> bool { let same = |p: (f64, f64), q: (f64, f64)| (p.0 - q.0).hypot(p.1 - q.1) < 1e-9; @@ -350,9 +375,10 @@ fn bridge(ring: Vec, hole: &[Corner], others: &[Vec], work: &mut } /// Cut `ring` (counterclockwise, possibly joined to its holes by bridges) into triangles by ear -/// clipping. A corner in line with its neighbors goes without a triangle. If no ear is left (a -/// ring that crosses itself), the rest is cut as a fan. -fn clip(ring: &[Corner], out: &mut Vec<[V3; 3]>, work: &mut usize) -> Result<(), String> { +/// clipping. A corner in line with its neighbors goes without a triangle, unless `keep_straight` +/// is set and it lies straight between them: it then stays a corner of the triangles beside it. If +/// no ear is left (a ring that crosses itself), the rest is cut as a fan. +fn clip(ring: &[Corner], out: &mut Vec<[V3; 3]>, work: &mut usize, keep_straight: bool) -> Result<(), String> { let n = ring.len(); if n < 3 { return Ok(()); @@ -368,8 +394,10 @@ fn clip(ring: &[Corner], out: &mut Vec<[V3; 3]>, work: &mut usize) -> Result<(), let turn = cross(pa, pb, pc); let scale = (pb.x - pa.x).hypot(pb.y - pa.y) * (pc.x - pb.x).hypot(pc.y - pb.y); let mut ear = false; - let drop = turn.abs() <= 1e-12 * scale.max(1e-300); - if !drop && turn > 0.0 { + let flat = turn.abs() <= 1e-12 * scale.max(1e-300); + let straight = keep_straight && flat && (pb.x - pa.x) * (pc.x - pb.x) + (pb.y - pa.y) * (pc.y - pb.y) > 0.0; + let drop = flat && !straight; + if !flat && turn > 0.0 { spend(work, left)?; ear = true; let mut k = next[c]; diff --git a/crates/three-d/src/mesh/tests.rs b/crates/three-d/src/mesh/tests.rs index 76f9b04ecc..3866565d34 100644 --- a/crates/three-d/src/mesh/tests.rs +++ b/crates/three-d/src/mesh/tests.rs @@ -173,6 +173,36 @@ fn a_bridge_through_another_corner_touches_it() { assert!(!super::touches((5.0, 1.0), (0.0, 0.0), (10.0, 0.0))); } +#[test] +fn flat_triangles_keep_corners_that_lie_along_an_edge() { + // A square with a hole, its edges carrying corners midway, as a cell shares with its finer + // neighbors: every corner is a corner of some triangle, and the triangles cover the face. + let p = |x: f64, y: f64| Point::new(x, y); + let outline = vec![p(5.0, 0.0), p(10.0, 0.0), p(10.0, 5.0), p(10.0, 10.0), p(5.0, 10.0), p(0.0, 10.0), p(0.0, 5.0), p(0.0, 0.0)]; + let hole = vec![p(1.0, 4.0), p(1.0, 6.0), p(2.0, 6.0), p(2.0, 4.0)]; + let mut work = 0; + let triangles = flat_triangles(&[outline.clone(), hole], &mut work, usize::MAX).unwrap(); + let area = |t: &[Point; 3]| ((t[1].x - t[0].x) * (t[2].y - t[0].y) - (t[1].y - t[0].y) * (t[2].x - t[0].x)) / 2.0; + assert!(triangles.iter().all(|t| area(t) > 0.0)); + assert!((triangles.iter().map(area).sum::() - 98.0).abs() < 1e-9); + for q in &outline { + assert!(triangles.iter().any(|t| t.contains(q)), "{q:?} is no triangle's corner"); + } + assert!(work > 0); +} + +#[test] +fn flat_triangles_stop_at_their_budget() { + let p = |x: f64, y: f64| Point::new(x, y); + let outline = vec![p(0.0, 0.0), p(10.0, 0.0), p(10.0, 10.0), p(0.0, 10.0)]; + let hole = vec![p(1.0, 4.0), p(1.0, 6.0), p(2.0, 6.0), p(2.0, 4.0)]; + let mut all = 0; + assert!(flat_triangles(&[outline.clone(), hole.clone()], &mut all, usize::MAX).is_some()); + let mut work = 0; + assert!(flat_triangles(&[outline, hole], &mut work, all - 1).is_none()); + assert!(work >= all, "{work} of {all}"); +} + #[test] fn a_beveled_extrusion_stays_closed() { let mut b = BezPath::new(); diff --git a/crates/three-d/src/solid.rs b/crates/three-d/src/solid.rs index a66e72af1c..428acca547 100644 --- a/crates/three-d/src/solid.rs +++ b/crates/three-d/src/solid.rs @@ -29,10 +29,10 @@ use build::{Camera, cuts, edge_distance, newell, section}; pub(crate) use build::{Face3, Keep, extrude_faces, plane_faces}; pub use build::{extrude, plane}; pub use face_map::{FaceMap, extrude_face_map, plane_face_map}; -#[cfg(test)] -use inflate::GRID_WORK; pub(crate) use inflate::inflate_faces; #[cfg(test)] +use inflate::{FLAT_BUDGET, FLAT_WORK, GRID_WORK, MAX_FLAT_CORNERS, MAX_FLAT_WORK}; +#[cfg(test)] pub(crate) use inflate::{INFLATED, PUFFED, SOLVE_FIRST}; pub use inflate::{inflate, inflate_each, inflate_together}; #[cfg(test)] diff --git a/crates/three-d/src/solid/inflate.rs b/crates/three-d/src/solid/inflate.rs index 5b3c883211..812cf88a42 100644 --- a/crates/three-d/src/solid/inflate.rs +++ b/crates/three-d/src/solid/inflate.rs @@ -196,6 +196,28 @@ thread_local! { pub(crate) static INFLATED: std::cell::Cell = const { std::cell::Cell::new(0) }; /// The grid work of the last solid this thread inflated in full, for the tests. pub(super) static GRID_WORK: std::cell::Cell = const { std::cell::Cell::new(0) }; + /// The work of cutting cells with holes for graphics in the last solid this thread inflated + /// in full, for the tests. + pub(super) static FLAT_WORK: std::cell::Cell = const { std::cell::Cell::new(0) }; + /// The work the next solids of this thread may take cutting cells with holes for graphics, + /// for the tests. + pub(super) static FLAT_BUDGET: std::cell::Cell = const { std::cell::Cell::new(MAX_FLAT_WORK) }; +} + +/// Most work one inflated surface may take cutting the cells graphics are mapped onto that +/// [`cell_triangles`] can't take (a hole inside the cell, or a ring of more corners), all its +/// cells together ([`crate::mesh::flat_triangles`]). +pub(super) const MAX_FLAT_WORK: usize = 1 << 26; + +/// Most corners the pieces of one such cell may have. +pub(super) const MAX_FLAT_CORNERS: usize = 4096; + +/// The work cutting cells with holes for graphics may take. +fn flat_budget() -> usize { + #[cfg(test)] + return FLAT_BUDGET.with(std::cell::Cell::get); + #[cfg(not(test))] + MAX_FLAT_WORK } /// Marks the facet the builder `b` added after it held `before` facets, if it added one, as a piece @@ -278,6 +300,8 @@ fn inflated(p: Puff, bounds: Rect, o: Inflate, view: View, reach: f64, keep: Kee // builds the topology of every outline ring near its cell, so a self-crossing outline cost its // crossings again in every cell it spans. Past it, cells take their clipped pieces. let material_left = std::cell::Cell::new(MAX_MATERIAL_SEGMENTS); + // The work of cutting cells with holes for graphics, all the cells together ([`MAX_FLAT_WORK`]). + let mut flat_work = 0usize; // Every ring's bounds, and the crossings of the last few rows the cells' centres lie on (a // row of cells has at most seven, at its three levels). let ring_bounds: Vec> = @@ -432,9 +456,25 @@ fn inflated(p: Puff, bounds: Rect, o: Inflate, view: View, reach: f64, keep: Kee // the front or back: each triangle then carries where its corners lie in the // art's plane. let smoothed = height > 0.0 && smooth; - if (smoothed || o.map_surface) - && let Some(triangles) = cell_triangles(&pieces) - { + let triangles = match (smoothed || o.map_surface).then(|| cell_triangles(&pieces)) { + // A cell graphics are mapped onto that the quick cut can't take (a hole + // inside it, or a ring of more corners) is cut with its holes, against one + // budget for the whole surface. Drawn whole instead, its piece would show + // no graphics. + Some(None) if o.map_surface => { + if pieces.iter().map(Vec::len).fold(0usize, usize::saturating_add) > MAX_FLAT_CORNERS { + return Err(TOO_COMPLEX_SURFACE.into()); + } + let budget = flat_budget(); + let holed = crate::mesh::flat_triangles(&pieces, &mut flat_work, budget); + if flat_work > budget { + return Err(TOO_COMPLEX_SURFACE.into()); + } + Some(holed.ok_or_else(|| TOO_COMPLEX_SURFACE.to_string())?) + } + quick => quick.flatten(), + }; + if let Some(triangles) = triangles { let order = if flat { Order::Last } else { Order::Depth }; for points in triangles { let front = points.map(|q| camera.place(q, half + lift(q))); @@ -550,6 +590,8 @@ fn inflated(p: Puff, bounds: Rect, o: Inflate, view: View, reach: f64, keep: Kee } #[cfg(test)] GRID_WORK.with(|w| w.set(edges.work())); + #[cfg(test)] + FLAT_WORK.with(|w| w.set(flat_work)); if edges.spent() { return Err(TOO_COMPLEX_SURFACE.into()); } diff --git a/crates/three-d/src/solid/tests.rs b/crates/three-d/src/solid/tests.rs index 0f527d968d..4e1a7f3247 100644 --- a/crates/three-d/src/solid/tests.rs +++ b/crates/three-d/src/solid/tests.rs @@ -464,6 +464,81 @@ fn inflate_marks_where_each_piece_lies_in_the_art_for_graphics() { assert!(on(Inflate::default(), behind).iter().all(|f| f.membrane != Some(PlanarFace::Back))); } +/// A square 0.3 pt across with its corner at the lattice point `(qx, qy)` of the grid of a +/// 100 pt shape, offset 0.1 pt: it lies inside one quarter cell of that grid. +fn speck(qx: f64, qy: f64) -> BezPath { + let unit = 100.0 / 48.0 / 4.0; + square(qx * unit + 0.1, qy * unit + 0.1, 0.3) +} + +/// The area of the pieces marked for graphics on `face`. +fn mapped_area(f: &[Facet], face: PlanarFace) -> f64 { + f.iter().filter(|f| f.membrane == Some(face)).map(|f| signed_area(&f.contours[0]).abs()).sum() +} + +/// A hole inside one cell of the surface's grid leaves that cell's piece with a hole in it: +/// graphics still map onto the rest of the cell, front and back, and the hole stays open. +#[test] +fn inflate_maps_graphics_around_a_hole_inside_one_cell() { + let mut b = square(0.0, 0.0, 100.0); + b.extend(speck(96.0, 96.0)); + let (p, r) = shape(&b); + let o = Inflate { map_surface: true, both_sides: true, ..Inflate::default() }; + let f = inflate(&p, FillRule::EvenOdd, r, o, front()).unwrap(); + let mapped = mapped_area(&f, PlanarFace::Front); + assert!(close(mapped, 100.0 * 100.0 - 0.3 * 0.3, 1e-3), "{mapped}"); + let f = inflate(&p, FillRule::EvenOdd, r, o, View { rotation_y: 180.0, ..front() }).unwrap(); + let mapped = mapped_area(&f, PlanarFace::Back); + assert!(close(mapped, 100.0 * 100.0 - 0.3 * 0.3, 1e-3), "{mapped}"); +} + +/// The cells graphics are mapped onto that need their holes cut out share one budget for the +/// whole surface: past it the surface is refused, however little each cell takes. +#[test] +fn inflate_cuts_holed_cells_for_graphics_within_one_budget() { + let mut b = square(0.0, 0.0, 100.0); + for i in 0..8 { + for j in 0..8 { + b.extend(speck(20.0 + 20.0 * i as f64, 20.0 + 20.0 * j as f64)); + } + } + let (p, r) = shape(&b); + let o = Inflate { map_surface: true, ..Inflate::default() }; + let f = inflate(&p, FillRule::EvenOdd, r, o, front()).unwrap(); + assert!(close(mapped_area(&f, PlanarFace::Front), 100.0 * 100.0 - 64.0 * 0.3 * 0.3, 1e-3)); + let all = FLAT_WORK.with(std::cell::Cell::get); + assert!(all > 0); + // Half the work all 64 cells took is far more than any one of them takes. + FLAT_BUDGET.with(|w| w.set(all / 2)); + let half = inflate(&p, FillRule::EvenOdd, r, o, front()); + FLAT_BUDGET.with(|w| w.set(MAX_FLAT_WORK)); + assert_eq!(half.err().as_deref(), Some(TOO_COMPLEX_SOLID)); + // The art draws without graphics as before. + assert!(inflate(&p, FillRule::EvenOdd, r, Inflate::default(), front()).is_ok()); +} + +/// A cell graphics are mapped onto whose pieces have more corners than one cut may take refuses +/// the surface rather than drawing that cell without its graphics. +#[test] +fn inflate_refuses_graphics_on_a_cell_with_too_many_corners() { + let mut b = square(0.0, 0.0, 100.0); + let unit = 100.0 / 48.0 / 4.0; + let c = Point::new(96.5 * unit, 96.5 * unit); + let n = MAX_FLAT_CORNERS + 10; + let mut ring = BezPath::new(); + for k in 0..n { + let a = -std::f64::consts::TAU * k as f64 / n as f64; + let q = (c.x + 0.2 * a.cos(), c.y + 0.2 * a.sin()); + if k == 0 { ring.move_to(q) } else { ring.line_to(q) } + } + ring.close_path(); + b.extend(ring); + let (p, r) = shape(&b); + let mapped = inflate(&p, FillRule::EvenOdd, r, Inflate { map_surface: true, ..Inflate::default() }, front()); + assert_eq!(mapped.err().as_deref(), Some(TOO_COMPLEX_SOLID)); + assert!(inflate(&p, FillRule::EvenOdd, r, Inflate::default(), front()).is_ok()); +} + #[test] fn malformed_and_degenerate_input_is_bounded() { let (p, b) = shape(&square(0.0, 0.0, 100.0)); From f725dd8caaf61b25fbc246b1986066b376cab769 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 15 Nov 2026 09:16:05 -0800 Subject: [PATCH 04/49] 3D: a wireframe is not refused for graphics it does not draw Extrude & Bevel, Inflate and Rotate in wireframe mode draw the faces' edges with no graphics, but the graphics' art was still checked against its limits, and Inflate still built its puffed surface with the graphics on it, so a wireframe could be refused as too complex. Neither check runs in wireframe mode now, as Revolve already skips them. --- crates/effects/src/solids.rs | 8 ++++--- crates/effects/src/solids/tests_graphics.rs | 25 +++++++++++++++++++++ docs/mcp.md | 3 ++- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/crates/effects/src/solids.rs b/crates/effects/src/solids.rs index 548b89ec39..767322769f 100644 --- a/crates/effects/src/solids.rs +++ b/crates/effects/src/solids.rs @@ -309,7 +309,8 @@ pub fn validate_solid_in(doc: Option<&Document>, n: &Node, id: &str, p: &Value) /// Inflate or Rotate, as drawn, or a new one after its other effects when it has none. fn validate_solid_for(doc: Option<&Document>, n: &Node, id: &str, p: &Value, at: (Option, Option)) -> Result<(), String> { validate_solid_params(id, p)?; - if let Some(doc) = doc { + // In wireframe mode the edges are drawn with no graphics, and their art is not checked. + if let Some(doc) = doc.filter(|_| !wireframe::wireframe_params(id, p)) { graphics::validate_symbols(doc, p)?; } let label = label_of(id); @@ -362,10 +363,11 @@ fn check_cast(id: &str, p: &Value, shapes: &[Profile]) -> Result<(), String> { /// past their limits on the front and puffed back of the solids of `shapes`: their art, or the /// parts they draw on its pieces ([`graphics::surface_parts`]), or when the solids can't be built /// with their pieces carrying the graphics. They are built as the art builds them -/// ([`surfaces_with`]). Without `doc` nothing is drawn, and nothing is checked. +/// ([`surfaces_with`]). Without `doc` nothing is drawn, and nothing is checked. In wireframe mode no +/// graphics are drawn, and none are checked. fn check_membrane_graphics(doc: Option<&Document>, n: &Node, id: &str, p: &Value, shapes: &[Profile]) -> Result<(), String> { let Some(doc) = doc else { return Ok(()) }; - if id != INFLATE || mapped_graphics(p).is_empty() { + if id != INFLATE || wireframe::wireframe_params(id, p) || mapped_graphics(p).is_empty() { return Ok(()); } for face in PlanarFace::ALL { diff --git a/crates/effects/src/solids/tests_graphics.rs b/crates/effects/src/solids/tests_graphics.rs index 0729ddf2ba..45fbb1c489 100644 --- a/crates/effects/src/solids/tests_graphics.rs +++ b/crates/effects/src/solids/tests_graphics.rs @@ -463,6 +463,31 @@ fn the_symbol_check_counts_what_the_view_draws() { assert!(validate_three_d_in(Some(&dense_document(true)), &n, EXTRUDE, &flat).is_ok()); } +#[test] +fn a_wireframe_is_not_refused_for_graphics_it_does_not_draw() { + let check = |d: &Document, id: &str, mut p: Value, wire: bool| { + if wire { + p["render"] = json!({"mode": "wireframe"}); + } + validate_three_d_in(Some(d), &object(id, p.clone()), id, &p) + }; + // The straight 30,000-sided polygon at 1000% fits the symbol limit, but cut into pieces on + // Inflate's puffed front it is too complex. + let straight = dense_document(false); + let big = json!({"perspectiveAngle": 0.0, "graphics": [{"symbol": "Dense", "scale": 1000.0}]}); + assert!(validate_symbols(&straight, &big).is_ok()); + let e = check(&straight, INFLATE, big.clone(), false).unwrap_err(); + assert!(e.contains("too complex"), "{e}"); + // Two copies of the curved one under a perspective are past the symbol limit on Extrude & Bevel. + let curved = dense_document(true); + let two = json!({"perspectiveAngle": 60.0, "graphics": [{"symbol": "Dense"}, {"symbol": "Dense", "face": "back"}]}); + let e = check(&curved, EXTRUDE, two.clone(), false).unwrap_err(); + assert!(e.contains("too complex"), "{e}"); + // A wireframe draws the faces' edges and no graphics, so neither is checked. + assert_eq!(check(&straight, INFLATE, big, true), Ok(())); + assert_eq!(check(&curved, EXTRUDE, two, true), Ok(())); +} + #[test] fn a_plane_and_a_hollow_solid() { let d = document(); diff --git a/docs/mcp.md b/docs/mcp.md index a53da0fc79..a425ad2e9f 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -4244,7 +4244,8 @@ joins the edges, so with such an effect its paths can differ from the drawn ones draw the edges, and `effect.expandAppearance` keeps them as paths. Past 1,000,000 edges the source path is drawn, as it is for a solid past its limits. A `render` that is not an object, a key other than `mode`, another mode, and `render` on Extrude & Bevel (Classic), Revolve (Classic) or Rotate (Classic) are refused before the document -changes. See [three-d.md](three-d.md#3d-and-materials-panel). +changes. In wireframe mode the graphics' art is not checked against the graphics limits, so art too complex for the +shaded surface does not refuse the wireframe. See [three-d.md](three-d.md#3d-and-materials-panel). ```json {"name":"run_command","arguments":{"command":"effect.setParams","params":{"index":0,"item":null,"params":{"render":{"mode":"wireframe"}}}}} From bb56fd7d23fdcd16501a5aca80c6d9ce1a100b6e Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 15 Nov 2026 10:30:36 -0800 Subject: [PATCH 05/49] Fill Area: a click adds a path of the enclosed area and keeps the paths around it A new Fill Area tool in the Live Paint Bucket's group adds a closed path of the area under a click, with the current fill, stroke and stroke weight. The paths that bound the area are not changed, and nothing needs to be selected: visible, unlocked paths on every layer bound areas, open paths and the overlap of filled shapes included. The area under the pointer is outlined in red while the pointer is over it, and a click outside every area does nothing and records no undo step. The path appears on the press and is kept on the release; Escape or a canceled touch before the release takes it back. The new path goes directly above the front-most object along the area. When a group, Live Paint group or clipping group holds that object, the path goes above the outermost group in its layer, not inside it. The tool sends the new shapeBuilder.copyRegion command (point, ids, gap, openFilledAsClosed, fill, stroke). It uses the Shape Builder's Gap Detection and Consider Open Filled Paths as Closed, and a double-click opens the Shape Builder Tool Options. The area search maps the paths near the point first and widens the window a few times before it maps every path. When a window's paths have more segments than one Shape Builder map takes, the paths with the most segments are left out, and an area is taken only when none of them reaches it. When all the paths together have more segments than that, only an area the nearby paths enclose is found. In a document of more than 128 segments the hover search runs on another thread, and the outline of an area goes when the document changes under a still pointer. Docs: docs/mcp.md, docs/target-app-parity.md, cursors.toml and the regenerated UI command catalog. Catalog rows for the tool, its undo step and its message. --- ASSETS.md | 1 + assets/icons/dc-fill-area.svg | 1 + crates/engine/src/cmd/buildcmds.rs | 20 +- .../engine/src/cmd/buildcmds/shape_builder.rs | 43 +- crates/engine/src/cmd/plugin_call/reviewed.rs | 1 + crates/engine/src/tests.rs | 1 + crates/engine/src/tests/fill_area.rs | 571 ++++++++++++++++++ crates/mcp/src/ui_catalog.rs | 2 +- crates/tools/src/builder.rs | 22 +- crates/tools/src/builder/fill_area.rs | 523 ++++++++++++++++ crates/tools/src/catalog.rs | 1 + crates/tools/src/cursors.toml | 2 + crates/tools/src/settings.rs | 2 + .../src/dialogs/shape_builder_options.rs | 16 + crates/ui-egui/src/i18n/bg.tsv | 3 + crates/ui-egui/src/i18n/bs.tsv | 3 + crates/ui-egui/src/i18n/ca.tsv | 3 + crates/ui-egui/src/i18n/cs.tsv | 3 + crates/ui-egui/src/i18n/da.tsv | 3 + crates/ui-egui/src/i18n/de.tsv | 3 + crates/ui-egui/src/i18n/el.tsv | 3 + crates/ui-egui/src/i18n/es.tsv | 3 + crates/ui-egui/src/i18n/fi.tsv | 3 + crates/ui-egui/src/i18n/fr.tsv | 3 + crates/ui-egui/src/i18n/gu.tsv | 2 + crates/ui-egui/src/i18n/hi.tsv | 3 + crates/ui-egui/src/i18n/hu.tsv | 3 + crates/ui-egui/src/i18n/id.tsv | 3 + crates/ui-egui/src/i18n/it.tsv | 3 + crates/ui-egui/src/i18n/ja.tsv | 3 + crates/ui-egui/src/i18n/ka.tsv | 3 + crates/ui-egui/src/i18n/ko.tsv | 3 + crates/ui-egui/src/i18n/nl.tsv | 3 + crates/ui-egui/src/i18n/pl.tsv | 3 + crates/ui-egui/src/i18n/pt-br.tsv | 3 + crates/ui-egui/src/i18n/ru.tsv | 3 + crates/ui-egui/src/i18n/sv.tsv | 3 + crates/ui-egui/src/i18n/tr.tsv | 3 + crates/ui-egui/src/i18n/uk.tsv | 3 + crates/ui-egui/src/i18n/vi.tsv | 3 + crates/ui-egui/src/i18n/zh-hans.tsv | 3 + crates/ui-egui/src/i18n/zh-hant.tsv | 3 + crates/ui-egui/src/icon_data.rs | 1 + crates/ui-egui/src/icons.rs | 1 + crates/ui-egui/src/menus/ui_commands.rs | 2 +- crates/ui-egui/src/toolbar.rs | 5 +- docs/mcp.md | 27 +- docs/target-app-parity.md | 1 + 48 files changed, 1308 insertions(+), 18 deletions(-) create mode 100644 assets/icons/dc-fill-area.svg create mode 100644 crates/engine/src/tests/fill_area.rs create mode 100644 crates/tools/src/builder/fill_area.rs diff --git a/ASSETS.md b/ASSETS.md index dbdd8b84d8..768dab55e0 100644 --- a/ASSETS.md +++ b/ASSETS.md @@ -152,6 +152,7 @@ Generated-in-code art is original and has no file to list. This covers the defau | `assets/icons/dc-draw-inside.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-draw-normal.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-ellipse.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | +| `assets/icons/dc-fill-area.svg` | VectorCraft contributors | Original work, drawn for VectorCraft: three crossing lines with the triangle they enclose filled | MIT OR Apache-2.0 | | | `assets/icons/dc-fill-none.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-filter.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | | `assets/icons/dc-flare.svg` | VectorCraft contributors | Original work, drawn for VectorCraft | MIT OR Apache-2.0 | | diff --git a/assets/icons/dc-fill-area.svg b/assets/icons/dc-fill-area.svg new file mode 100644 index 0000000000..50631a7750 --- /dev/null +++ b/assets/icons/dc-fill-area.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/crates/engine/src/cmd/buildcmds.rs b/crates/engine/src/cmd/buildcmds.rs index a605652612..3e5de3f95a 100644 --- a/crates/engine/src/cmd/buildcmds.rs +++ b/crates/engine/src/cmd/buildcmds.rs @@ -39,7 +39,7 @@ mod trace; pub use live_paint::live_paint_gaps; use live_paint::{lp_expand, lp_fill, lp_gap_options, lp_info, lp_make, lp_merge, lp_release, lp_stroke_edge}; -use shape_builder::{sb_merge, sb_regions}; +use shape_builder::{sb_copy_region, sb_merge, sb_regions}; pub(crate) use trace::TracePresetChanges; pub use trace::{TracePreset, TracePresetChange, TraceRun, Traced}; use trace::{trace_expand, trace_make, trace_presets_delete, trace_presets_save, trace_release, trace_set_view}; @@ -67,6 +67,15 @@ pub fn specs() -> Vec { has_selection_or_ids, sb_regions ), + cmd!( + "shapeBuilder.copyRegion", + "Fill Area", + [], + None, + "{point: [x,y], ids?|id?: [id…] (the objects or layers whose paths bound areas; default: every layer, nothing needs to be selected), gap?: pt (0–72; 0: Gap Detection off; out of range is an error), openFilledAsClosed?: true (as shapeBuilder.merge), fill?, stroke?: \"#rrggbb\" | {color|swatch|gradient|none} (default: the current fill and stroke, with the current stroke weight)} add a new closed path of the area under point that the visible, unlocked paths enclose (the region of shapeBuilder.regions holding it: areas a shape already fills and areas open paths bound count too), directly above the front-most object along the area (its outline touches the area's outline, or it covers the area; when a group, Live Paint group, Shaper group or clipping group holds that path, above the outermost group in its layer, never inside it), and select it; the paths around the area are not changed; a point in no enclosed area is an error and changes nothing (no undo step); when the paths together have more than 65,536 segments, only an area the paths near the point enclose is found → {id, above (the object the new path went above)}", + has_doc, + sb_copy_region + ), cmd!( "livePaint.make", "Make", @@ -262,12 +271,17 @@ fn stroke_only(paint: Paint, width: f64) -> Appearance { // ---------- Shape Builder ---------- fn fill_param(s: &Session, p: &Value, cmd: &str) -> Result> { - match p.get("fill") { + paint_param(s, p, "fill", cmd) +} + +/// The paint `p` gives for `key` (`"#rrggbb"` or `{color|swatch|gradient|none}`), as `fill` is read. +fn paint_param(s: &Session, p: &Value, key: &str, cmd: &str) -> Result> { + match p.get(key) { None | Some(Value::Null) => Ok(None), Some(v @ Value::Object(o)) if o.contains_key("color") || o.contains_key("swatch") || o.contains_key("gradient") || o.contains_key("none") => { paint_from(s, v) } - Some(v) => color_value(v).map(|c| Some(Paint::solid(super::paint::new_color(s, p, c)))).ok_or_else(|| bad(cmd, format!("bad fill {v}"))), + Some(v) => color_value(v).map(|c| Some(Paint::solid(super::paint::new_color(s, p, c)))).ok_or_else(|| bad(cmd, format!("bad {key} {v}"))), } } diff --git a/crates/engine/src/cmd/buildcmds/shape_builder.rs b/crates/engine/src/cmd/buildcmds/shape_builder.rs index 472ba2208b..a24d04bcda 100644 --- a/crates/engine/src/cmd/buildcmds/shape_builder.rs +++ b/crates/engine/src/cmd/buildcmds/shape_builder.rs @@ -1,7 +1,7 @@ use super::{ Arc, Beside, BuilderMap, EngineError, FillRule, Node, NodeId, PathData, Point, Rect, Result, Session, Touched, Value, b, bad, check_numbers, - f64_or, fill_param, finite, gap_param, ids_json, json, marquee_param, po, points_param, remnant, replace_leaves, replace_with_pieces, root_ids, - shape_node, switch_or, + f64_or, fill_param, finite, gap_param, ids_json, json, marquee_param, named_ids, number_or, outermost, paint_param, po, point_param, + points_param, remnant, replace_leaves, replace_with_pieces, root_ids, shape_node, switch_or, }; pub(super) fn sb_merge(s: &mut Session, p: &Value) -> Result { @@ -183,6 +183,45 @@ pub(super) fn sb_merge(s: &mut Session, p: &Value) -> Result { Ok(out) } +pub(super) fn sb_copy_region(s: &mut Session, p: &Value) -> Result { + const C: &str = "shapeBuilder.copyRegion"; + let pt = point_param(p, "point").filter(|q| finite(*q)).ok_or_else(|| bad(C, "missing point [x,y]"))?; + let open_filled_as_closed = switch_or(p, "openFilledAsClosed", true, C)?; + let gap = number_or(p, "gap", 0.0, C)?; + if !(0.0..=po::SHAPE_BUILDER_MAX_GAP).contains(&gap) { + return Err(bad(C, format!("gap must be 0 to {} pt, not {gap}", po::SHAPE_BUILDER_MAX_GAP))); + } + let fill = paint_param(s, p, "fill", C)?.unwrap_or_else(|| s.paint.fill.clone()); + let stroke = paint_param(s, p, "stroke", C)?.unwrap_or_else(|| s.paint.stroke.clone()); + let look = s.new_art_look(fill, stroke, s.paint.stroke_width); + let area = { + let d = &s.doc()?.doc; + let roots = match named_ids(p)? { + Some(ids) => { + if let Some(bad_id) = ids.iter().find(|i| d.node(**i).is_none()) { + return Err(EngineError::NoNode(*bad_id)); + } + // An object listed with a layer or group that holds it counts once. + outermost(d, ids) + } + None => b::every_layer(d), + }; + b::AreaFinder::new(d, &roots, gap, open_filled_as_closed).find(pt) + }; + let Some(area) = area else { return Err(EngineError::Other("Fill Area: no enclosed area under the pointer".into())) }; + let id = s.edit("Fill Area", |d, sel| { + let mut n = shape_node(d, area.path.clone(), None); + look.apply(d, &mut n); + let id = n.id; + let mut above = Beside::above(d, &[area.above]); + above.put(d, area.above, vec![n])?; + above.finish(d)?; + sel.set([id]); + Ok(id) + })?; + Ok(json!({ "id": id.0, "above": area.above.0 })) +} + pub(super) fn sb_regions(s: &mut Session, p: &Value) -> Result { let open_filled_as_closed = switch_or(p, "openFilledAsClosed", true, "shapeBuilder.regions")?; check_numbers(p, &["gap"], "shapeBuilder.regions")?; diff --git a/crates/engine/src/cmd/plugin_call/reviewed.rs b/crates/engine/src/cmd/plugin_call/reviewed.rs index f445237d83..4c1ee6fab9 100644 --- a/crates/engine/src/cmd/plugin_call/reviewed.rs +++ b/crates/engine/src/cmd/plugin_call/reviewed.rs @@ -554,6 +554,7 @@ pub(super) const ALLOWED: &[&str] = &[ "shape.rectangularGrid", "shape.spiral", "shape.star", + "shapeBuilder.copyRegion", "shapeBuilder.merge", "shapeBuilder.regions", "shaper.expand", diff --git a/crates/engine/src/tests.rs b/crates/engine/src/tests.rs index 1b420d7805..fd3ee09415 100644 --- a/crates/engine/src/tests.rs +++ b/crates/engine/src/tests.rs @@ -64,6 +64,7 @@ mod expand_symbols; mod eyedropper; mod file; mod fileinfo; +mod fill_area; mod flatpresets; mod flatpreview; mod flatten; diff --git a/crates/engine/src/tests/fill_area.rs b/crates/engine/src/tests/fill_area.rs new file mode 100644 index 0000000000..98c5dc34db --- /dev/null +++ b/crates/engine/src/tests/fill_area.rs @@ -0,0 +1,571 @@ +//! Tests for Fill Area (`shapeBuilder.copyRegion` and the `fillArea` tool). + +use serde_json::{Value, json}; +use vectorcraft_color::{Color, Paint}; +use vectorcraft_doc::Node; +use vectorcraft_geom::{FillRule, PathData, Point}; +use vectorcraft_tools::{Cursor, Mods, Overlay, PointerEvent, PointerKind}; + +use crate::*; + +fn session() -> Session { + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 800, "height": 600})).unwrap(); + s +} + +fn id_of(v: &Value) -> NodeId { + NodeId(v["id"].as_u64().unwrap()) +} + +fn node(s: &Session, id: NodeId) -> Node { + s.doc().unwrap().doc.node(id).cloned().unwrap() +} + +fn outline(s: &Session, id: NodeId) -> (PathData, FillRule) { + vectorcraft_tools::builder::node_outline(&node(s, id)).expect("path") +} + +fn area(s: &Session, id: NodeId) -> f64 { + let (p, r) = outline(s, id); + vectorcraft_pathops::area(&p, r) +} + +fn line(s: &mut Session, a: (f64, f64), b: (f64, f64)) -> NodeId { + id_of(&s.execute("shape.line", &json!({"x1": a.0, "y1": a.1, "x2": b.0, "y2": b.1})).unwrap()) +} + +fn rect(s: &mut Session, x: f64, y: f64, w: f64, h: f64) -> NodeId { + id_of(&s.execute("shape.rectangle", &json!({"x": x, "y": y, "width": w, "height": h})).unwrap()) +} + +/// Two diagonals and a crossbar: they enclose a triangle of 900 pt² above the crossbar. +fn triangle(s: &mut Session) -> [NodeId; 3] { + [line(s, (0.0, 0.0), (100.0, 100.0)), line(s, (100.0, 0.0), (0.0, 100.0)), line(s, (-10.0, 80.0), (110.0, 80.0))] +} + +/// The ids of the default layer's children, back to front. +fn stack(s: &Session) -> Vec { + let d = &s.doc().unwrap().doc; + d.children(d.default_layer()).map(|c| c.iter().map(|n| n.id).collect()).unwrap_or_default() +} + +fn undo_len(s: &Session) -> usize { + s.doc().unwrap().history.undo.len() +} + +fn deselect(s: &mut Session) { + s.execute("select.set", &json!({"ids": []})).unwrap(); +} + +/// Four circles in a 2×2 grid, each touching its neighbors, enclose a diamond nothing fills. With +/// nothing selected, a click in it adds the diamond and leaves the circles as they were. +#[test] +fn fill_area_adds_the_diamond_four_circles_enclose_and_keeps_them() { + let mut s = session(); + let mut circles = vec![]; + for (x, y) in [(0.0, 0.0), (100.0, 0.0), (0.0, 100.0), (100.0, 100.0)] { + circles.push(id_of(&s.execute("shape.ellipse", &json!({"x": x, "y": y, "width": 100, "height": 100})).unwrap())); + } + deselect(&mut s); + let before: Vec<_> = circles.iter().map(|c| outline(&s, *c)).collect(); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [100, 100]})).unwrap(); + let new = id_of(&r); + assert!((area(&s, new) - 2146.0).abs() < 10.0, "{}", area(&s, new)); + assert_eq!(stack(&s).len(), 5, "the four circles and the diamond"); + let after: Vec<_> = circles.iter().map(|c| outline(&s, *c)).collect(); + assert_eq!(after, before, "the circles keep their geometry"); + assert_eq!(s.doc().unwrap().selection.objects, vec![new], "the new path is selected"); +} + +/// The overlap of two filled squares is an area too: the new path covers it, and both squares stay +/// whole (a Shape Builder merge there cuts it out of them). +#[test] +fn fill_area_copies_the_overlap_of_two_filled_squares() { + let mut s = session(); + let a = rect(&mut s, 0.0, 0.0, 100.0, 100.0); + let b = rect(&mut s, 50.0, 0.0, 100.0, 100.0); + deselect(&mut s); + let (oa, ob) = (outline(&s, a), outline(&s, b)); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [75, 50]})).unwrap(); + let new = id_of(&r); + assert!((area(&s, new) - 5000.0).abs() < 1.0, "{}", area(&s, new)); + assert_eq!((outline(&s, a), outline(&s, b)), (oa, ob)); + assert_eq!(stack(&s), vec![a, b, new], "above the front-most square"); + assert_eq!(r["above"], json!(b.0)); +} + +/// Three lines bound a triangle; the new path has the current fill and stroke. +#[test] +fn fill_area_fills_the_triangle_three_lines_bound_with_the_current_paint() { + let mut s = session(); + let lines = triangle(&mut s); + deselect(&mut s); + s.execute("paint.setFill", &json!({"color": "#336699"})).unwrap(); + s.execute("paint.setStroke", &json!({"color": "#993300"})).unwrap(); + let (fill, stroke) = (s.paint.fill.clone(), s.paint.stroke.clone()); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70]})).unwrap(); + let new = id_of(&r); + assert!((area(&s, new) - 900.0).abs() < 1e-6, "{}", area(&s, new)); + let n = node(&s, new); + assert_eq!(n.appearance.fill_paint(), fill); + assert_eq!(n.appearance.stroke_paint(), stroke); + assert_eq!(stack(&s), vec![lines[0], lines[1], lines[2], new]); + // `fill` and `stroke` override the current paint. + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70], "fill": "#00ff00", "stroke": {"none": true}})).unwrap(); + let n = node(&s, id_of(&r)); + assert_eq!(n.appearance.fill_paint(), Paint::solid(Color::rgb(0.0, 1.0, 0.0))); + assert_eq!(n.appearance.stroke_paint(), Paint::None); +} + +/// The new path takes the current stroke weight. +#[test] +fn fill_area_takes_the_current_stroke_weight() { + let mut s = session(); + triangle(&mut s); + deselect(&mut s); + s.execute("paint.setStroke", &json!({"color": "#993300"})).unwrap(); + s.paint.stroke_width = 4.0; + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70]})).unwrap(); + assert_eq!(node(&s, id_of(&r)).appearance.stroke_width(), 4.0); +} + +/// `ids` names the objects or layers whose paths bound areas: without the crossbar the triangle is +/// open, and naming the layer takes every path in it. +#[test] +fn fill_area_ids_limit_the_paths_that_bound_areas() { + let mut s = session(); + let lines = triangle(&mut s); + deselect(&mut s); + let two = json!({"point": [50, 70], "ids": [lines[0].0, lines[1].0]}); + assert!(s.execute("shapeBuilder.copyRegion", &two).is_err()); + let all = json!({"point": [50, 70], "ids": [lines[0].0, lines[1].0, lines[2].0]}); + let r = s.execute("shapeBuilder.copyRegion", &all).unwrap(); + assert!((area(&s, id_of(&r)) - 900.0).abs() < 1e-6); + let layer = s.doc().unwrap().doc.default_layer().unwrap(); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70], "ids": [layer.0]})).unwrap(); + assert!((area(&s, id_of(&r)) - 900.0).abs() < 1e-6); +} + +/// The new path goes above the group, Live Paint group or clipping group that holds the paths +/// along the area, never inside it, and the group keeps its members. +#[test] +fn fill_area_stacks_above_the_group_that_holds_the_paths() { + let mut s = session(); + let lines = triangle(&mut s); + let ids: Vec = lines.iter().map(|l| l.0).collect(); + s.execute("select.set", &json!({"ids": ids})).unwrap(); + let g = id_of(&s.execute("object.group", &json!({})).unwrap()); + deselect(&mut s); + let members = |s: &Session, g: NodeId| -> Vec { node(s, g).children().unwrap().iter().map(|n| n.id).collect() }; + let before = members(&s, g); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70]})).unwrap(); + assert_eq!(stack(&s), vec![g, id_of(&r)]); + assert_eq!(r["above"], json!(g.0)); + assert_eq!(members(&s, g), before); + + let mut s = session(); + let a = rect(&mut s, 0.0, 0.0, 100.0, 100.0); + let b = rect(&mut s, 50.0, 0.0, 100.0, 100.0); + let lp = id_of(&s.execute("livePaint.make", &json!({"ids": [a.0, b.0]})).unwrap()); + deselect(&mut s); + let before = members(&s, lp); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [75, 50]})).unwrap(); + assert!((area(&s, id_of(&r)) - 5000.0).abs() < 1.0, "{}", area(&s, id_of(&r))); + assert_eq!(stack(&s), vec![lp, id_of(&r)]); + assert_eq!(members(&s, lp), before); + + let mut s = session(); + let lines = triangle(&mut s); + let mask = rect(&mut s, -20.0, -20.0, 140.0, 140.0); + let ids: Vec = lines.iter().map(|l| l.0).chain([mask.0]).collect(); + s.execute("select.set", &json!({"ids": ids})).unwrap(); + s.execute("object.clippingMask.make", &json!({})).unwrap(); + let clip = s.doc().unwrap().selection.objects[0]; + deselect(&mut s); + let before = members(&s, clip); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70]})).unwrap(); + assert_eq!(stack(&s), vec![clip, id_of(&r)]); + assert_eq!(members(&s, clip), before); +} + +/// The new path goes directly above the front-most object along the area, not above art that +/// lies elsewhere, and paths on other layers bound areas too. +#[test] +fn fill_area_takes_paths_on_every_layer_and_stacks_above_the_area() { + let mut s = session(); + let first = s.doc().unwrap().doc.default_layer(); + let l1 = line(&mut s, (0.0, 0.0), (100.0, 100.0)); + let l2 = line(&mut s, (100.0, 0.0), (0.0, 100.0)); + let far = rect(&mut s, 400.0, 400.0, 50.0, 50.0); + let other = id_of(&s.execute("layer.new", &json!({"name": "Other"})).unwrap()); + let l3 = line(&mut s, (-10.0, 80.0), (110.0, 80.0)); + let top = rect(&mut s, 500.0, 400.0, 50.0, 50.0); + deselect(&mut s); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70]})).unwrap(); + let new = id_of(&r); + let d = &s.doc().unwrap().doc; + assert_eq!(d.parent_of(new), Some(other)); + let kids: Vec = d.children(Some(other)).unwrap().iter().map(|n| n.id).collect(); + assert_eq!(kids, vec![l3, new, top]); + let kids: Vec = d.children(first).unwrap().iter().map(|n| n.id).collect(); + assert_eq!(kids, vec![l1, l2, far]); +} + +/// An area far larger than the paths near the point: four long lines bound a 400 pt square whose +/// middle no path's bounds hold, and a small triangle inside it is a hole in the area. +#[test] +fn fill_area_finds_an_area_that_reaches_far_from_the_point() { + let mut s = session(); + line(&mut s, (-20.0, 0.0), (420.0, 0.0)); + line(&mut s, (-20.0, 400.0), (420.0, 400.0)); + line(&mut s, (0.0, -20.0), (0.0, 420.0)); + line(&mut s, (400.0, -20.0), (400.0, 420.0)); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [200, 200]})).unwrap(); + assert!((area(&s, id_of(&r)) - 160_000.0).abs() < 1.0, "{}", area(&s, id_of(&r))); + for (a, b) in [((150.0, 250.0), (250.0, 350.0)), ((250.0, 250.0), (150.0, 350.0)), ((140.0, 330.0), (260.0, 330.0))] { + line(&mut s, a, b); + } + deselect(&mut s); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 50]})).unwrap(); + assert!((area(&s, id_of(&r)) - (160_000.0 - 900.0)).abs() < 1.0, "the square less the triangle: {}", area(&s, id_of(&r))); +} + +/// Distant art with more segments than one Shape Builder map takes does not stop four lines from +/// bounding the square between them: the search maps the lines near the point first, and a window +/// that reaches the distant art leaves it out. +#[test] +fn fill_area_finds_a_nearby_area_beside_a_huge_distant_path() { + for (at, huge_x) in [(0.0, 20_000.0), (100.0, 1_300.0)] { + let mut s = session(); + let (lo, hi) = (at, at + 800.0); + line(&mut s, (lo - 20.0, lo), (hi + 20.0, lo)); + line(&mut s, (lo - 20.0, hi), (hi + 20.0, hi)); + line(&mut s, (lo, lo - 20.0), (lo, hi + 20.0)); + line(&mut s, (hi, lo - 20.0), (hi, hi + 20.0)); + let n = vectorcraft_pathops::SHAPE_BUILDER_MAX_SEGMENTS; + let pts: Vec = (0..=n).map(|k| Point::new(huge_x + 400.0 * k as f64 / n as f64, 500.0 + (k % 2) as f64)).collect(); + let look = vectorcraft_doc::Appearance::basic(Paint::None, Paint::solid(Color::BLACK), 1.0); + s.edit("t", |d, _| { + let id = d.alloc_id(); + let top = d.children(d.default_layer()).map_or(0, |c| c.len()); + d.insert(d.default_layer(), top, Node::path(id, PathData::single(vectorcraft_geom::SubPath::polyline(&pts, false)), look))?; + Ok(id) + }) + .unwrap(); + deselect(&mut s); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [at + 400.0, at + 400.0]})).unwrap(); + assert!((area(&s, id_of(&r)) - 640_000.0).abs() < 1.0, "{huge_x}: {}", area(&s, id_of(&r))); + } +} + +/// A path with too many segments near a long, flat area stays out of the map, and the area's far +/// ends still bound it. +#[test] +fn fill_area_finds_a_long_area_beside_a_huge_path() { + let mut s = session(); + line(&mut s, (-10.0, -20.0), (810.0, -20.0)); + line(&mut s, (-10.0, 20.0), (810.0, 20.0)); + line(&mut s, (0.0, -30.0), (0.0, 30.0)); + line(&mut s, (800.0, -30.0), (800.0, 30.0)); + line(&mut s, (-10.0, 0.0), (810.0, 0.0)); + let n = vectorcraft_pathops::SHAPE_BUILDER_MAX_SEGMENTS; + let pts: Vec = (0..=n).map(|k| Point::new(300.0 + 200.0 * k as f64 / n as f64, 60.0 + (k % 2) as f64 * 0.5)).collect(); + let look = vectorcraft_doc::Appearance::basic(Paint::None, Paint::solid(Color::BLACK), 1.0); + s.edit("t", |d, _| { + let id = d.alloc_id(); + let top = d.children(d.default_layer()).map_or(0, |c| c.len()); + d.insert(d.default_layer(), top, Node::path(id, PathData::single(vectorcraft_geom::SubPath::polyline(&pts, false)), look))?; + Ok(id) + }) + .unwrap(); + deselect(&mut s); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [400, 0.5]})).unwrap(); + assert!((area(&s, id_of(&r)) - 16_000.0).abs() < 1.0, "{}", area(&s, id_of(&r))); +} + +/// A path with too many segments that crosses the area cannot be left out, and the paths together +/// are past the segment limit: the square it cuts is not filled across it, whether four lines or one +/// filled rectangle bound the square. +#[test] +fn fill_area_does_not_fill_across_a_huge_path_it_left_out() { + for closed in [false, true] { + let mut s = session(); + if closed { + rect(&mut s, 0.0, 0.0, 400.0, 400.0); + } else { + line(&mut s, (-20.0, 0.0), (420.0, 0.0)); + line(&mut s, (-20.0, 400.0), (420.0, 400.0)); + line(&mut s, (0.0, -20.0), (0.0, 420.0)); + line(&mut s, (400.0, -20.0), (400.0, 420.0)); + } + let n = vectorcraft_pathops::SHAPE_BUILDER_MAX_SEGMENTS; + let pts: Vec = (0..=n).map(|k| Point::new(-20.0 + 440.0 * k as f64 / n as f64, 300.0)).collect(); + let look = vectorcraft_doc::Appearance::basic(Paint::None, Paint::solid(Color::BLACK), 1.0); + s.edit("t", |d, _| { + let id = d.alloc_id(); + let top = d.children(d.default_layer()).map_or(0, |c| c.len()); + d.insert(d.default_layer(), top, Node::path(id, PathData::single(vectorcraft_geom::SubPath::polyline(&pts, false)), look))?; + Ok(id) + }) + .unwrap(); + deselect(&mut s); + let (undo, kids) = (undo_len(&s), stack(&s)); + assert!(s.execute("shapeBuilder.copyRegion", &json!({"point": [200, 100]})).is_err(), "closed: {closed}"); + assert_eq!((undo_len(&s), stack(&s)), (undo, kids)); + } +} + +/// With Gap Detection on, a square on a higher layer within the gap of the area's corners does not +/// bound the area, so the new path stays above the square that does. +#[test] +fn fill_area_gap_does_not_stack_above_a_nearby_path() { + let mut s = session(); + let first = rect(&mut s, 0.0, 0.0, 100.0, 100.0); + let layer = s.doc().unwrap().doc.default_layer(); + let other = id_of(&s.execute("layer.new", &json!({"name": "Other"})).unwrap()); + rect(&mut s, 102.0, 0.0, 100.0, 100.0); + deselect(&mut s); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 50], "gap": 3})).unwrap(); + let d = &s.doc().unwrap().doc; + assert_eq!(d.parent_of(id_of(&r)), layer); + assert_ne!(d.parent_of(id_of(&r)), Some(other)); + assert_eq!(r["above"], json!(first.0)); +} + +/// An object listed in `ids` with the layer that holds it counts once, so the new path still goes +/// above the front-most of two overlapping squares. +#[test] +fn fill_area_ids_count_an_object_and_its_layer_once() { + let mut s = session(); + let back = rect(&mut s, 0.0, 0.0, 100.0, 100.0); + let front = rect(&mut s, 50.0, 0.0, 100.0, 100.0); + deselect(&mut s); + let layer = s.doc().unwrap().doc.default_layer().unwrap(); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [75, 50], "ids": [layer.0, back.0]})).unwrap(); + assert_eq!(stack(&s), vec![back, front, id_of(&r)]); +} + +/// A flat window that reaches a path with too many segments leaves that path out and grows to the +/// paths it had not picked: a crossbar that no path near the point leads to still splits the area. +#[test] +fn fill_area_keeps_paths_a_capped_window_had_not_picked() { + let mut s = session(); + // Four lines bound a box; a line through the point and a crossbar higher up cut it. + line(&mut s, (50.0, -60.0), (50.0, 410.0)); + line(&mut s, (350.0, -60.0), (350.0, 410.0)); + line(&mut s, (40.0, -50.0), (360.0, -50.0)); + line(&mut s, (40.0, 400.0), (360.0, 400.0)); + line(&mut s, (0.0, 100.0), (400.0, 100.0)); + line(&mut s, (40.0, 30.0), (360.0, 30.0)); + let n = vectorcraft_pathops::SHAPE_BUILDER_MAX_SEGMENTS; + let pts: Vec = (0..=n).map(|k| Point::new(380.0 + 20.0 * k as f64 / n as f64, 100.0 + (k % 2) as f64 * 0.5)).collect(); + let look = vectorcraft_doc::Appearance::basic(Paint::None, Paint::solid(Color::BLACK), 1.0); + s.edit("t", |d, _| { + let id = d.alloc_id(); + let top = d.children(d.default_layer()).map_or(0, |c| c.len()); + d.insert(d.default_layer(), top, Node::path(id, PathData::single(vectorcraft_geom::SubPath::polyline(&pts, false)), look))?; + Ok(id) + }) + .unwrap(); + deselect(&mut s); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [200, 99.5]})).unwrap(); + assert!((area(&s, id_of(&r)) - 21_000.0).abs() < 1.0, "between the crossbar and the line: {}", area(&s, id_of(&r))); +} + +/// Two diagonals and a crossbar about 3 pt short of each: the area closes only with a gap of 3 pt +/// or more, and a gap out of 0 to 72 pt is an error. +#[test] +fn fill_area_gap_closes_small_gaps() { + let mut s = session(); + line(&mut s, (0.0, 0.0), (100.0, 100.0)); + line(&mut s, (100.0, 0.0), (0.0, 100.0)); + line(&mut s, (24.0, 80.0), (76.0, 80.0)); + deselect(&mut s); + assert!(s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70]})).is_err()); + assert!(s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70], "gap": 2})).is_err()); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70], "gap": 3})).unwrap(); + let a = area(&s, id_of(&r)); + assert!(a > 850.0 && a < 900.0, "the triangle and its two bridges: {a}"); + for gap in [json!(-1), json!(73), json!("3")] { + assert!(s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70], "gap": gap})).is_err(), "{gap}"); + } +} + +/// Locked and hidden paths do not bound an area: the triangle fills while its crossbar is unlocked +/// and visible, and not once the crossbar is locked or hidden. +#[test] +fn fill_area_skips_locked_and_hidden_paths() { + for how in ["object.lock", "object.hide"] { + let mut s = session(); + let lines = triangle(&mut s); + deselect(&mut s); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70]})).unwrap(); + assert!((area(&s, id_of(&r)) - 900.0).abs() < 1e-6, "{how}"); + s.execute("edit.undo", &json!({})).unwrap(); + s.execute(how, &json!({"ids": [lines[2].0]})).unwrap(); + deselect(&mut s); + let (undo, kids) = (undo_len(&s), stack(&s)); + assert!(s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70]})).is_err(), "{how}"); + assert_eq!((undo_len(&s), stack(&s)), (undo, kids), "{how}"); + } +} + +/// A point in no enclosed area changes nothing and records no undo step; bad params are errors. A +/// point inside the triangle fills it. +#[test] +fn fill_area_outside_every_area_changes_nothing() { + let mut s = session(); + triangle(&mut s); + deselect(&mut s); + assert!(s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70]})).is_ok()); + s.execute("edit.undo", &json!({})).unwrap(); + let (undo, kids) = (undo_len(&s), stack(&s)); + for p in [json!({"point": [500, 500]}), json!({"point": [50, 90]}), json!({"point": [-500, -500]})] { + assert!(s.execute("shapeBuilder.copyRegion", &p).is_err(), "{p}"); + } + for p in [json!({}), json!({"point": [50]}), json!({"point": [50, 70], "fill": "nope"}), json!({"point": [50, 70], "stroke": 3})] { + assert!(s.execute("shapeBuilder.copyRegion", &p).is_err(), "{p}"); + } + assert!(s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70], "ids": [999_999]})).is_err()); + assert_eq!((undo_len(&s), stack(&s)), (undo, kids)); +} + +/// The tool outlines the area under the pointer, shows the bucket over it, and a click adds the +/// path; a click outside every area records nothing. It uses the Shape Builder's Gap Detection. +#[test] +fn fill_area_tool_drives_the_command() { + let mut s = session(); + line(&mut s, (0.0, 0.0), (100.0, 100.0)); + line(&mut s, (100.0, 0.0), (0.0, 100.0)); + line(&mut s, (24.0, 80.0), (76.0, 80.0)); + deselect(&mut s); + let v = ViewInfo::default(); + s.select_tool("fillArea", v).unwrap(); + assert_eq!(s.tool_id(), "fillArea"); + s.pointer(&PointerEvent::new(PointerKind::Move, 50.0, 70.0), v).unwrap(); + assert!(s.overlays(v).is_empty(), "the gap leaves the triangle open"); + assert_eq!(s.cursor(Point::new(50.0, 70.0), Mods::default(), v), Cursor::LivePaintBucket); + let (undo, kids) = (undo_len(&s), stack(&s)); + s.pointer(&PointerEvent::new(PointerKind::Down, 50.0, 70.0), v).unwrap(); + s.pointer(&PointerEvent::new(PointerKind::Up, 50.0, 70.0), v).unwrap(); + assert_eq!((undo_len(&s), stack(&s)), (undo, kids), "nothing to fill"); + // The Shape Builder's options reach the active Fill Area tool. + s.set_tool_option_cmd(&json!({"tool": "shapeBuilder", "values": {"gapDetection": true, "gapLength": 3}})).unwrap(); + assert_eq!(s.tool_options_of("fillArea")["gapLength"], json!(3.0)); + s.pointer(&PointerEvent::new(PointerKind::Move, 50.0, 70.0), v).unwrap(); + let red: Vec<_> = s.overlays(v).into_iter().filter(|o| matches!(o, Overlay::Path { color: [0xff, 0x2a, 0x2a], .. })).collect(); + assert_eq!(red.len(), 1, "the area is outlined in red"); + assert_eq!(s.cursor(Point::new(50.0, 70.0), Mods::default(), v), Cursor::LivePaintBucketFace); + s.pointer(&PointerEvent::new(PointerKind::Down, 50.0, 70.0), v).unwrap(); + s.pointer(&PointerEvent::new(PointerKind::Up, 50.0, 70.0), v).unwrap(); + assert_eq!(s.journal.last().unwrap().0, "shapeBuilder.copyRegion"); + assert_eq!(stack(&s).len(), 4); + assert_eq!(undo_len(&s), undo + 1); + assert_eq!(s.tool_id(), "fillArea"); + assert!(s.set_tool_option_cmd(&json!({"tool": "fillArea", "values": {"highlightColor": "#ff0000"}})).is_err()); + assert!(s.set_tool_option_cmd(&json!({"tool": "fillArea", "values": {"gapLength": "wide"}})).is_err()); + // Setting them on Fill Area sets them for the Shape Builder too. + s.set_tool_option_cmd(&json!({"tool": "fillArea", "values": {"gapLength": 5, "openFilledAsClosed": false}})).unwrap(); + let opts = s.tool_options_of("shapeBuilder"); + assert_eq!((opts["gapLength"].clone(), opts["openFilledAsClosed"].clone()), (json!(5.0), json!(false))); +} + +/// The hover search for a document of more than 128 segments runs on another thread: nothing is +/// outlined until the tool is polled, and a click finds the area at once. +#[test] +fn fill_area_tool_hovers_a_large_document_on_another_thread() { + let mut s = session(); + s.execute("shape.polygon", &json!({"cx": 300, "cy": 300, "radius": 100, "sides": 200})).unwrap(); + deselect(&mut s); + let v = ViewInfo::default(); + s.select_tool("fillArea", v).unwrap(); + s.pointer(&PointerEvent::new(PointerKind::Move, 300.0, 300.0), v).unwrap(); + assert!(s.tool_waiting()); + assert!(s.overlays(v).is_empty()); + // The pointer moves on inside the area before the search is done: its result still serves. + s.pointer(&PointerEvent::new(PointerKind::Move, 305.0, 300.0), v).unwrap(); + s.tool_poll(v, false).unwrap(); + s.tool_poll(v, true).unwrap(); + assert!(!s.tool_waiting()); + assert_eq!(s.overlays(v).len(), 1, "the polygon is outlined"); + // Leaving the area takes the outline away at once, while the next search runs. + s.pointer(&PointerEvent::new(PointerKind::Move, 500.0, 500.0), v).unwrap(); + assert!(s.overlays(v).is_empty()); + s.tool_poll(v, true).unwrap(); + assert!(s.overlays(v).is_empty()); + s.pointer(&PointerEvent::new(PointerKind::Move, 300.0, 300.0), v).unwrap(); + s.tool_poll(v, true).unwrap(); + assert_eq!(s.overlays(v).len(), 1); + // A click while a search runs waits for it. + s.pointer(&PointerEvent::new(PointerKind::Move, 310.0, 300.0), v).unwrap(); + let undo = undo_len(&s); + s.pointer(&PointerEvent::new(PointerKind::Down, 310.0, 300.0), v).unwrap(); + s.pointer(&PointerEvent::new(PointerKind::Up, 310.0, 300.0), v).unwrap(); + assert_eq!(undo_len(&s), undo + 1); +} + +/// A press that is dropped before the release (a long or canceled touch) takes the new path back +/// and records no undo step. +#[test] +fn fill_area_tool_dropped_press_adds_nothing() { + let mut s = session(); + triangle(&mut s); + deselect(&mut s); + let v = ViewInfo::default(); + s.select_tool("fillArea", v).unwrap(); + let (undo, kids) = (undo_len(&s), stack(&s)); + s.pointer(&PointerEvent::new(PointerKind::Down, 50.0, 70.0), v).unwrap(); + assert_eq!(stack(&s).len(), kids.len() + 1, "the path shows during the press"); + s.drop_tool_press(v).unwrap(); + s.pointer(&PointerEvent::new(PointerKind::Up, 50.0, 70.0), v).unwrap(); + assert_eq!((undo_len(&s), stack(&s)), (undo, kids)); +} + +/// The outline under a still pointer goes when the document changes, and the canvas hovers the +/// tool again then. +#[test] +fn fill_area_tool_drops_a_hover_the_document_no_longer_has() { + let mut s = session(); + rect(&mut s, 0.0, 0.0, 100.0, 100.0); + let v = ViewInfo::default(); + s.select_tool("fillArea", v).unwrap(); + assert!(s.tool_wants_rehover()); + s.pointer(&PointerEvent::new(PointerKind::Move, 50.0, 50.0), v).unwrap(); + assert_eq!(s.overlays(v).len(), 1); + s.execute("edit.clear", &json!({})).unwrap(); + assert!(s.overlays(v).is_empty()); + assert_eq!(s.cursor(Point::new(50.0, 50.0), Mods::default(), v), Cursor::LivePaintBucket); +} + +/// Moving the pointer from an area with a hole into the area that fills the hole outlines the +/// inner area instead. +#[test] +fn fill_area_tool_hover_moves_from_an_area_into_its_hole() { + let mut s = session(); + line(&mut s, (-20.0, 0.0), (420.0, 0.0)); + line(&mut s, (-20.0, 400.0), (420.0, 400.0)); + line(&mut s, (0.0, -20.0), (0.0, 420.0)); + line(&mut s, (400.0, -20.0), (400.0, 420.0)); + for (a, b) in [((150.0, 250.0), (250.0, 350.0)), ((250.0, 250.0), (150.0, 350.0)), ((140.0, 330.0), (260.0, 330.0))] { + line(&mut s, a, b); + } + deselect(&mut s); + let v = ViewInfo::default(); + s.select_tool("fillArea", v).unwrap(); + let outlined = |s: &mut Session| -> Vec { + s.overlays(v) + .into_iter() + .filter_map(|o| match o { + Overlay::Path { path, .. } => Some(kurbo::Shape::bounding_box(&path).width()), + _ => None, + }) + .collect() + }; + s.pointer(&PointerEvent::new(PointerKind::Move, 50.0, 50.0), v).unwrap(); + let w = outlined(&mut s); + assert!(w.len() == 1 && (w[0] - 400.0).abs() < 1e-6, "the square: {w:?}"); + s.pointer(&PointerEvent::new(PointerKind::Move, 200.0, 320.0), v).unwrap(); + let w = outlined(&mut s); + assert!(w.len() == 1 && (w[0] - 60.0).abs() < 1e-6, "the triangle in its hole: {w:?}"); +} diff --git a/crates/mcp/src/ui_catalog.rs b/crates/mcp/src/ui_catalog.rs index 6e8626666a..158c34f0b7 100644 --- a/crates/mcp/src/ui_catalog.rs +++ b/crates/mcp/src/ui_catalog.rs @@ -979,7 +979,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ "tool.options", "Tool Options…", "", - "{tool: id} what double-clicking a tool button opens: hand → fits the artboard in the window (view.fitArtboard), zoom → 100% (view.actualSize), rotate|scale|reflect|shear → that Object › Transform dialog (dialog `rotate`, `scale`, `reflect` or `shear`; error `nothing selected` without a selection), selection|directSelection|groupSelection → the Move dialog (dialog `move`; the same error), gradient|magicWand → the Gradient or Magic Wand panel (window.panel), artboard → Artboard Options of the active artboard (dialog `artboardOptions`, fields index, name, x, y, width, height, showCenterMark, showCrossHairs; OK runs artboard.setProps, and with other artboards selected with the Artboard tool a new width or height goes to each of them too, in its `artboards` list, each resized about the reference point the form used for that size, or about its top-left corner when the size was set in the fields directly), flare → Flare Tool Options (dialog `flareOptions`, fields diameter and pathLength (pt), opacity, brightness, growth, fuzziness, longest, rayFuzziness, largest (%), rays, rings, direction (°), raysOn, ringsOn; OK runs tool.setOption {tool: \"flare\", values}: the next flare dragged out uses them, and a Flare click's dialog, which also has x, y and preview (on initially), previews one there and accepts it as one Undo step; Cancel rolls back the preview), lineSegment|arc|rectangularGrid|polarGrid → that tool's Tool Options, its click dialog without x and y (dialog kind = the tool id, `__toolOptions: true`; lineSegment: length (pt), angle (°), fillLine; arc: lengthX, lengthY (pt), reference (0–8), arcType: open|closed, baseAlong: x|y, slope (−100…100), fillArc; rectangularGrid: width, height (pt, the Default Size), reference (0–8), rows, columns, rowSkew, columnSkew (%), frame, fill; polarGrid: the same with concentric, radial, concentricSkew, radialSkew and compound for rows, columns, the skews and frame; OK runs tool.setOption {tool, values} and draws nothing: the next drag uses them (Fill Line, the arc's type, base, slope and fill, the grids' dividers, skews and switches) and a click's dialog opens at them), columnGraph|stackedColumnGraph|barGraph|stackedBarGraph|lineGraph|areaGraph|scatterGraph|pieGraph|radarGraph → Graph Type for the selected graph, or for the series picked in it with Group Selection (dialog `graphType`, fields the options graph.setType {} returns under their names, with legend, pieLegend, piePosition, pieSort, firstRowInFront, firstColumnInFront and filledLines held for every type; overrideValues and rightOverrideValues, Override Calculated Values of the left or only value axis and of the right one: while one is on OK sends axisMin, axisMax and ticks, or rightAxisMin, rightAxisMax and rightTicks, filled with the calculated values where the graph has none, and one turned off sends null, null and 0; __page: options|valueAxis|rightAxis|categoryAxis, the page shown, options when the type picked has no such page; OK runs graph.setType, and with nothing changed closes without a step of history; an overridden value axis whose maximum is not more than its minimum is an error and the dialog stays open; an error without a selected graph), typeOnPath|verticalTypeOnPath → Type on a Path Options for the selected type on a path (dialog `command` running type.pathOptions; error `nothing selected` without a selection, and the command's error when no type on a path is selected),symbolSprayer|symbolShifter|symbolScruncher|symbolSizer|symbolSpinner|symbolStainer|symbolScreener|symbolStyler → Symbolism Tools Options (dialog `symbolismOptions`, fields tool, diameter (pt), intensity and density (1–10), shared by the eight tools; OK runs tool.setOption {tool, values}), blend → Blend Options, perspectiveGrid → Perspective Grid Options, eyedropper → Eyedropper Options (dialog `eyedropperOptions`, fields sampleSize, pickUp, apply; OK runs eyedropper.setOptions), printTiling → resets the print tiling (print.tiling.set {reset: true}), warp|twirl|pucker|bloat|scallop|crystallize|wrinkle → that tool's Tool Options (dialog `liquifyOptions`, fields tool, width, height, angle, intensity %, usePressure, detail, simplify, simplifyOn, rate, complexity, horizontal %, vertical %, affectAnchors, affectIn, affectOut, showBrush; OK runs tool.setOption {tool, values}), pencil|paintbrush|smooth|blobBrush|eraser → that tool's Tool Options (dialog `freehandOptions`, fields tool and the options the tool keeps: fidelity (px for pencil, paintbrush and smooth, the same at any zoom; pt for blobBrush), fill, keepSelected (on for pencil and paintbrush, off for blobBrush), mergeOnlySelection (off), closeWithin and editWithin (px, 0 is off), livePreview (pencil, on: off draws a thin line while the stroke is drawn, and the path's fill and stroke on release), size (pt), angle (°, −180–180; 0) and roundness (%, 1–100; 100) of the eraser's tip; OK runs tool.setOption {tool, values}), livePaintSelection → Live Paint Selection Tool Options (dialog `livePaintSelectionOptions`, fields selectFills and selectStrokes (both on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the highlight's width, 1–20 px; 4); OK runs tool.setOption {tool: \"livePaintSelection\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), livePaintBucket → Live Paint Bucket Options (dialog `livePaintBucketOptions`, fields paintFills (on) and paintStrokes (off), cursorSwatchPreview (on: the active fill or stroke shows above the pointer between the color swatches before and after it; Left and Right without modifiers step it through the color swatches whether it is on or off), highlight (on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the face highlight's width, 1–20 px; 4; an edge's highlight is half as wide); OK runs tool.setOption {tool: \"livePaintBucket\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), shapeBuilder → Shape Builder Tool Options (dialog `shapeBuilderOptions`, fields gapDetection (off), gapLength (pt, 0–72; 3), openFilledAsClosed (on), clickStrokeSplitsPath (off), pickColorFrom: artwork|swatches (artwork), cursorSwatchPreview (off), selection: freeform|straightLine (freeform), highlightFill (on), highlightStroke (on), highlightColor (#rrggbb or a layer color's name; #ff4f4f); OK runs tool.setOption {tool: \"shapeBuilder\", values}; a highlightColor with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), objectsOnPath → Objects on Path Tool Options (dialog `objectsOnPathOptions`, fields pivot (0–8, row by row from the top left; 4, the center) and rotate (°, −360–360; 0); Reset puts 4 and 0 back; Save runs tool.setOption {tool: \"objectsOnPath\", values}: the objects attached next use them, groups attached before keep theirs)", + "{tool: id} what double-clicking a tool button opens: hand → fits the artboard in the window (view.fitArtboard), zoom → 100% (view.actualSize), rotate|scale|reflect|shear → that Object › Transform dialog (dialog `rotate`, `scale`, `reflect` or `shear`; error `nothing selected` without a selection), selection|directSelection|groupSelection → the Move dialog (dialog `move`; the same error), gradient|magicWand → the Gradient or Magic Wand panel (window.panel), artboard → Artboard Options of the active artboard (dialog `artboardOptions`, fields index, name, x, y, width, height, showCenterMark, showCrossHairs; OK runs artboard.setProps, and with other artboards selected with the Artboard tool a new width or height goes to each of them too, in its `artboards` list, each resized about the reference point the form used for that size, or about its top-left corner when the size was set in the fields directly), flare → Flare Tool Options (dialog `flareOptions`, fields diameter and pathLength (pt), opacity, brightness, growth, fuzziness, longest, rayFuzziness, largest (%), rays, rings, direction (°), raysOn, ringsOn; OK runs tool.setOption {tool: \"flare\", values}: the next flare dragged out uses them, and a Flare click's dialog, which also has x, y and preview (on initially), previews one there and accepts it as one Undo step; Cancel rolls back the preview), lineSegment|arc|rectangularGrid|polarGrid → that tool's Tool Options, its click dialog without x and y (dialog kind = the tool id, `__toolOptions: true`; lineSegment: length (pt), angle (°), fillLine; arc: lengthX, lengthY (pt), reference (0–8), arcType: open|closed, baseAlong: x|y, slope (−100…100), fillArc; rectangularGrid: width, height (pt, the Default Size), reference (0–8), rows, columns, rowSkew, columnSkew (%), frame, fill; polarGrid: the same with concentric, radial, concentricSkew, radialSkew and compound for rows, columns, the skews and frame; OK runs tool.setOption {tool, values} and draws nothing: the next drag uses them (Fill Line, the arc's type, base, slope and fill, the grids' dividers, skews and switches) and a click's dialog opens at them), columnGraph|stackedColumnGraph|barGraph|stackedBarGraph|lineGraph|areaGraph|scatterGraph|pieGraph|radarGraph → Graph Type for the selected graph, or for the series picked in it with Group Selection (dialog `graphType`, fields the options graph.setType {} returns under their names, with legend, pieLegend, piePosition, pieSort, firstRowInFront, firstColumnInFront and filledLines held for every type; overrideValues and rightOverrideValues, Override Calculated Values of the left or only value axis and of the right one: while one is on OK sends axisMin, axisMax and ticks, or rightAxisMin, rightAxisMax and rightTicks, filled with the calculated values where the graph has none, and one turned off sends null, null and 0; __page: options|valueAxis|rightAxis|categoryAxis, the page shown, options when the type picked has no such page; OK runs graph.setType, and with nothing changed closes without a step of history; an overridden value axis whose maximum is not more than its minimum is an error and the dialog stays open; an error without a selected graph), typeOnPath|verticalTypeOnPath → Type on a Path Options for the selected type on a path (dialog `command` running type.pathOptions; error `nothing selected` without a selection, and the command's error when no type on a path is selected),symbolSprayer|symbolShifter|symbolScruncher|symbolSizer|symbolSpinner|symbolStainer|symbolScreener|symbolStyler → Symbolism Tools Options (dialog `symbolismOptions`, fields tool, diameter (pt), intensity and density (1–10), shared by the eight tools; OK runs tool.setOption {tool, values}), blend → Blend Options, perspectiveGrid → Perspective Grid Options, eyedropper → Eyedropper Options (dialog `eyedropperOptions`, fields sampleSize, pickUp, apply; OK runs eyedropper.setOptions), printTiling → resets the print tiling (print.tiling.set {reset: true}), warp|twirl|pucker|bloat|scallop|crystallize|wrinkle → that tool's Tool Options (dialog `liquifyOptions`, fields tool, width, height, angle, intensity %, usePressure, detail, simplify, simplifyOn, rate, complexity, horizontal %, vertical %, affectAnchors, affectIn, affectOut, showBrush; OK runs tool.setOption {tool, values}), pencil|paintbrush|smooth|blobBrush|eraser → that tool's Tool Options (dialog `freehandOptions`, fields tool and the options the tool keeps: fidelity (px for pencil, paintbrush and smooth, the same at any zoom; pt for blobBrush), fill, keepSelected (on for pencil and paintbrush, off for blobBrush), mergeOnlySelection (off), closeWithin and editWithin (px, 0 is off), livePreview (pencil, on: off draws a thin line while the stroke is drawn, and the path's fill and stroke on release), size (pt), angle (°, −180–180; 0) and roundness (%, 1–100; 100) of the eraser's tip; OK runs tool.setOption {tool, values}), livePaintSelection → Live Paint Selection Tool Options (dialog `livePaintSelectionOptions`, fields selectFills and selectStrokes (both on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the highlight's width, 1–20 px; 4); OK runs tool.setOption {tool: \"livePaintSelection\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), livePaintBucket → Live Paint Bucket Options (dialog `livePaintBucketOptions`, fields paintFills (on) and paintStrokes (off), cursorSwatchPreview (on: the active fill or stroke shows above the pointer between the color swatches before and after it; Left and Right without modifiers step it through the color swatches whether it is on or off), highlight (on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the face highlight's width, 1–20 px; 4; an edge's highlight is half as wide); OK runs tool.setOption {tool: \"livePaintBucket\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), shapeBuilder → Shape Builder Tool Options (dialog `shapeBuilderOptions`, fields gapDetection (off), gapLength (pt, 0–72; 3), openFilledAsClosed (on), clickStrokeSplitsPath (off), pickColorFrom: artwork|swatches (artwork), cursorSwatchPreview (off), selection: freeform|straightLine (freeform), highlightFill (on), highlightStroke (on), highlightColor (#rrggbb or a layer color's name; #ff4f4f); OK runs tool.setOption {tool: \"shapeBuilder\", values}; a highlightColor with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), fillArea → the same Shape Builder Tool Options (Fill Area uses their gapDetection, gapLength and openFilledAsClosed), objectsOnPath → Objects on Path Tool Options (dialog `objectsOnPathOptions`, fields pivot (0–8, row by row from the top left; 4, the center) and rotate (°, −360–360; 0); Reset puts 4 and 0 back; Save runs tool.setOption {tool: \"objectsOnPath\", values}: the objects attached next use them, groups attached before keep theirs)", ), ( "ui.colorGuideOptions", diff --git a/crates/tools/src/builder.rs b/crates/tools/src/builder.rs index 51617935f5..4cb0a813f9 100644 --- a/crates/tools/src/builder.rs +++ b/crates/tools/src/builder.rs @@ -1,7 +1,7 @@ -//! Shape Builder (Shift+M), Live Paint Bucket (K) and Live Paint Selection (Shift+L). +//! Shape Builder (Shift+M), Live Paint Bucket (K), Fill Area and Live Paint Selection (Shift+L). //! -//! The tools only emit commands (`shapeBuilder.merge`, `livePaint.fill`, `livePaint.strokeEdge`, -//! `select.*`); the planar arrangement comes from `vectorcraft_pathops::shape_builder` (Shape +//! The tools only emit commands (`shapeBuilder.merge`, `shapeBuilder.copyRegion`, `livePaint.fill`, +//! `livePaint.strokeEdge`, `select.*`); the planar arrangement comes from `vectorcraft_pathops::shape_builder` (Shape //! Builder) and `vectorcraft_pathops::live_paint` (Live Paint). //! //! **Live Paint groups** are ordinary groups (no special node kind): the group's name starts with @@ -28,11 +28,13 @@ use crate::{Action, Cursor, Mods, Overlay, PointerEvent, PointerKind, Tool, Tool pub use po::SHAPE_BUILDER_MAX_GAP; mod cache; +mod fill_area; mod live_paint; mod lookup; mod map; use cache::{BACKGROUND_SEGMENTS, CacheKey, RegionCache}; +pub use fill_area::{AreaFinder, EnclosedArea, FillAreaTool, every_layer}; #[cfg(test)] use live_paint::LpHover; pub use live_paint::{ @@ -815,11 +817,16 @@ impl Tool for ShapeBuilderTool { /// is not true or false, a `pickColorFrom` other than `artwork` or `swatches`, a `selection` other /// than `freeform` or `straightLine`, a `highlightColor` that is not an RGB color without an alpha /// part and a `gapLength` that is not a finite number are errors. A finite gap length out of 0 to -/// [`SHAPE_BUILDER_MAX_GAP`] is not an error: the tool clamps it. The Live Paint tools are checked -/// by [`check_live_paint_options`]; Ok for every other tool. Saved settings go to the tools' -/// `set_option` instead, which skips a value it cannot read. +/// [`SHAPE_BUILDER_MAX_GAP`] is not an error: the tool clamps it. `fillArea` takes only +/// `gapDetection`, `gapLength` and `openFilledAsClosed`, checked the same way. The Live Paint tools +/// are checked by [`check_live_paint_options`]; Ok for every other tool. Saved settings go to the +/// tools' `set_option` instead, which skips a value it cannot read. pub fn check_builder_options(tool: &str, values: &serde_json::Map) -> Result<(), String> { - if tool != "shapeBuilder" { + if tool == "fillArea" { + if let Some(key) = values.keys().find(|k| !matches!(k.as_str(), "gapDetection" | "gapLength" | "openFilledAsClosed")) { + return Err(format!("unknown Fill Area option `{key}`")); + } + } else if tool != "shapeBuilder" { return check_live_paint_options(tool, values); } let one_of = |key: &str, v: &Value, names: &[&str]| { @@ -849,6 +856,7 @@ pub fn create(id: &str) -> Option> { "shapeBuilder" => Box::new(ShapeBuilderTool::default()), "livePaintBucket" => Box::new(LivePaintBucketTool::default()), "livePaintSelection" => Box::new(LivePaintSelectionTool::default()), + "fillArea" => Box::new(FillAreaTool::new()), _ => return None, }) } diff --git a/crates/tools/src/builder/fill_area.rs b/crates/tools/src/builder/fill_area.rs new file mode 100644 index 0000000000..d4b841b9ca --- /dev/null +++ b/crates/tools/src/builder/fill_area.rs @@ -0,0 +1,523 @@ +//! The Fill Area tool: a click inside an area that visible, unlocked paths enclose adds a new +//! closed path of that area with the current fill and stroke (`shapeBuilder.copyRegion`). The +//! paths around the area stay as they are, and nothing needs to be selected. + +use super::lookup::path_contains; +use super::*; + +/// The area [`AreaFinder::find`] finds under a point. +#[derive(Clone, Debug, PartialEq)] +pub struct EnclosedArea { + /// The area's outline, as a Shape Builder merge of that one region makes it. + pub path: PathData, + /// The object directly in a layer that holds the front-most path along the area (its outline + /// touches the area's outline, or it covers the area): the new path goes directly above it, so + /// it never goes inside a group, a Live Paint group, a Shaper group or a clipping group. + pub above: NodeId, +} + +/// How many times [`AreaFinder::find`] widens the part of the document it maps before it maps +/// every path. +const WINDOW_ROUNDS: usize = 24; + +/// The side (pt) of the first window [`AreaFinder::find`] maps around a point that no path's bounds +/// hold. +const FIRST_WINDOW: f64 = 32.0; + +/// How many times [`AreaFinder::find`] makes the window four times larger when the paths in it hold +/// no area under the point, before it maps every path: a 32 pt window reaches 8,192 pt. +const NEAR_ROUNDS: usize = 4; + +/// Finds the area under a point among the paths of some objects, mapping only the paths near the +/// point first: an area that lies inside a window is bounded by the paths whose bounds reach the +/// window, so the paths outside it cannot change it. When the maps of [`NEAR_ROUNDS`] larger windows +/// have no area under the point, or the area does not fit after [`WINDOW_ROUNDS`] widenings, the +/// finder maps every path. When a window's paths have more segments than one Shape Builder map +/// takes, the paths with the most segments are left out until the rest fit, and an area is taken +/// only when no path left out reaches it. When every path together has more segments than that, +/// an area no window finds is not found. The map of every path, once a search has needed it, is +/// kept for the next search. +pub struct AreaFinder { + /// The inputs back → front, as [`shape_builder_shapes`] gives them, with their bounds and the + /// object directly in a layer that holds each one ([`outermost`]). + inputs: Vec<(po::Shape, Rect, NodeId)>, + /// The bounds of every input. + total: Option, + gap: f64, + /// The segments of all the inputs. + segments: usize, + /// Whether all the inputs fit the segment limit of one Shape Builder map. Past it a map keeps + /// only the filled areas and loses the lines between them, so no map of every input is made. + fits: bool, + /// The map of every input, with the index of each of its shapes in `inputs`. + full: Option<(BuilderMap, Vec)>, +} + +/// Does `r` hold `p`, edges included? +fn holds(r: &Rect, p: Point) -> bool { + p.x >= r.x0 && p.x <= r.x1 && p.y >= r.y0 && p.y <= r.y1 +} + +/// Do `a` and `b` overlap or touch? +fn meet(a: &Rect, b: &Rect) -> bool { + a.x0 <= b.x1 && b.x0 <= a.x1 && a.y0 <= b.y1 && b.y0 <= a.y1 +} + +/// Does `outer` hold all of `inner`? +fn within(inner: &Rect, outer: &Rect) -> bool { + inner.x0 >= outer.x0 && inner.x1 <= outer.x1 && inner.y0 >= outer.y0 && inner.y1 <= outer.y1 +} + +/// The object directly in a layer (or sublayer) that holds `id`: `id` itself when a layer holds it. +fn outermost(doc: &Document, id: NodeId) -> NodeId { + let Some(line) = doc.ancestry(id) else { return id }; + let layer = line.iter().rposition(|a| doc.node(*a).is_some_and(|n| n.is_layer())); + layer.and_then(|k| line.get(k + 1)).copied().unwrap_or(id) +} + +impl AreaFinder { + /// The finder over the paths of `roots` (layers or objects) that the Shape Builder takes: + /// visible, unlocked paths, compound paths and Live Paint faces and edges that draw, not on a + /// locked artboard. Gaps up to `gap` close, and with `open_filled_as_closed` a filled open path + /// bounds an area as if an invisible edge closed it. + pub fn new(doc: &Document, roots: &[NodeId], gap: f64, open_filled_as_closed: bool) -> Self { + let roots = sorted_roots(doc, roots); + let (shapes, leaves) = shape_builder_shapes(doc, &roots, open_filled_as_closed); + let editable = doc.editable(); + let inputs: Vec<(po::Shape, Rect, NodeId)> = shapes + .into_iter() + .zip(leaves) + .filter(|(_, l)| editable(l.id)) + .filter_map(|(s, l)| { + let b = s.path.bounds()?; + Some((s, b, outermost(doc, l.id))) + }) + .collect(); + let total = inputs.iter().map(|(_, b, _)| *b).reduce(|a, b| a.union(b)); + let gap = if gap.is_finite() { gap.clamp(0.0, SHAPE_BUILDER_MAX_GAP) } else { 0.0 }; + let segments: usize = inputs.iter().flat_map(|(s, ..)| &s.path.subpaths).map(|sp| sp.segment_count()).sum(); + Self { inputs, total, gap, segments, fits: segments <= po::SHAPE_BUILDER_MAX_SEGMENTS, full: None } + } + + /// The area under `p`: the smallest region of the map of the paths that holds `p`. None when + /// `p` is in no enclosed area. + pub fn find(&mut self, p: Point) -> Option { + if let Some((map, picked)) = &self.full { + return self.area_in(map, picked, p); + } + let total = self.total?; + // A gap bridge reaches at most `gap` past a path, so a window takes in every path within + // that of it. + let reach = self.gap + 1.0; + if !holds(&total.inflate(reach, reach), p) { + return None; + } + let mut window = self + .inputs + .iter() + .filter(|(_, b, _)| holds(&b.inflate(reach, reach), p)) + .map(|(_, b, _)| *b) + .reduce(|a, b| a.union(b)) + .unwrap_or_else(|| Rect::from_center_size(p, (FIRST_WINDOW, FIRST_WINDOW))); + let mut near = 0; + let mut every_path = false; + // The paths left out of the windows' maps to keep them within the segment limit, by index. + let mut left_out = vec![false; self.inputs.len()]; + let mut any_left_out = false; + for round in 0..=WINDOW_ROUNDS { + let last = every_path || round == WINDOW_ROUNDS; + if last && !self.fits { + return None; + } + let zone = window.inflate(reach, reach); + let mut picked: Vec = (0..self.inputs.len()) + .filter(|&i| last || (!left_out.get(i).is_some_and(|o| *o) && self.inputs.get(i).is_some_and(|(_, b, _)| meet(b, &zone)))) + .collect(); + // Past the segment limit a map keeps only the filled areas, so the paths with the most + // segments stay out of the window's map. + if !last { + for i in self.over_limit(&picked) { + if let Some(o) = left_out.get_mut(i) { + *o = true; + any_left_out = true; + } + } + picked.retain(|&i| !left_out.get(i).is_some_and(|o| *o)); + } + let every = picked.len() == self.inputs.len(); + let shapes: Vec = picked.iter().filter_map(|&i| self.inputs.get(i).map(|(s, ..)| s.clone())).collect(); + let map = BuilderMap::of_shapes(shapes, false, self.gap); + let bounds = map.region_at(p).and_then(|k| map.regions.get(k)).map(|(.., rb)| *rb); + if every { + let area = self.area_in(&map, &picked, p); + self.full = Some((map, picked)); + return area; + } + let before = window; + match bounds { + // A path left out that reaches the area could cut it, and only the map of every + // path holds both. + Some(rb) if within(&rb, &window) => { + let reached = rb.inflate(reach, reach); + let cut = any_left_out && self.inputs.iter().zip(&left_out).any(|((_, b, _), out)| *out && meet(b, &reached)); + if !cut { + return self.area_in(&map, &picked, p); + } + every_path = true; + } + Some(rb) => window = window.union(rb), + // No area of the paths near the point holds it: an area that does is bounded by + // paths farther away. The window grows four times over a few rounds, and then the + // next round maps every path. + None if near < NEAR_ROUNDS => { + near += 1; + let (w, h) = (window.width().max(FIRST_WINDOW) * 4.0, window.height().max(FIRST_WINDOW) * 4.0); + window = window.union(Rect::from_center_size(window.center(), (w, h))); + } + None => window = total, + } + // A window that did not grow would give the same map again. + if window == before { + every_path = true; + } + } + None + } + + /// The inputs among `picked` to leave out of a map so that the rest fit the segment limit of + /// one Shape Builder map: the ones with the most segments first. Empty when all of `picked` fit. + fn over_limit(&self, picked: &[usize]) -> Vec { + let segments = |i: usize| self.inputs.get(i).map_or(0, |(s, ..)| s.path.subpaths.iter().map(|sp| sp.segment_count()).sum::()); + let mut sum: usize = picked.iter().map(|&i| segments(i)).sum(); + let mut by_size: Vec<(usize, usize)> = picked.iter().map(|&i| (segments(i), i)).collect(); + by_size.sort_by_key(|(n, _)| std::cmp::Reverse(*n)); + let mut out = vec![]; + for (n, i) in by_size { + if sum <= po::SHAPE_BUILDER_MAX_SEGMENTS { + break; + } + sum -= n; + out.push(i); + } + out + } + + /// The area under `p` in `map`, made of the inputs `picked` (in its order). + fn area_in(&self, map: &BuilderMap, picked: &[usize], p: Point) -> Option { + let (region, ..) = map.region_at(p).and_then(|k| map.regions.get(k))?; + let path = po::FaceMerger::with_gap(&map.shapes, self.gap).merge(&[region]); + if path.is_empty() { + return None; + } + let anchors: Vec = region.path.subpaths.iter().flat_map(|sp| sp.anchors.iter().map(|a| a.p)).collect(); + // The front-most shape that covers the area or that an anchor of its outline lies on. A + // shape within the gap of an anchor counts only when no shape is along the area itself, + // so a path near the area that bounds none of it does not decide where the new path goes. + let along = |gap: f64| { + map.shapes.iter().enumerate().rev().find(|(i, s)| { + let tol = outline_snap(&s.path) + gap; + region.sources.contains(i) + || s.path.bounds().is_some_and(|b| { + let b = b.inflate(tol, tol); + anchors.iter().any(|q| holds(&b, *q) && s.path.nearest(*q).is_some_and(|(.., d)| d <= tol)) + }) + }) + }; + let k = along(0.0).or_else(|| along(self.gap)).map_or(map.shapes.len().checked_sub(1)?, |(i, _)| i); + let above = picked.get(k).and_then(|&i| self.inputs.get(i)).map(|(.., id)| *id)?; + Some(EnclosedArea { path, above }) + } +} + +/// The paths the Fill Area tool finds areas among: every layer's. +pub fn every_layer(doc: &Document) -> Vec { + doc.layers.iter().map(|l| l.id).collect() +} + +/// Fill Area (in the Live Paint Bucket's group): a click inside an area that visible, unlocked +/// paths on any layer enclose adds a new closed path of that area with the current fill and stroke +/// (`shapeBuilder.copyRegion`), directly above the front-most object along it. The paths stay as +/// they are and nothing needs to be selected. The area under the pointer is outlined while it +/// hovers. Gap Detection and Consider Open Filled Paths as Closed are the Shape Builder's options. +#[derive(Default)] +pub struct FillAreaTool { + gap_detection: bool, + gap_length: f64, + /// Consider Open Filled Paths as Closed turned off: a filled open path cuts areas as a line + /// does. + open_filled_cuts: bool, + /// The finder for the document as it is, with the key it was made for. Away while a search + /// runs on another thread. + finder: Option<(FinderKey, AreaFinder)>, + /// The area under the pointer, with the document revision it was found in. + hover: Option<((u64, u64), EnclosedArea)>, + /// Where the pointer last moved over the canvas. + at: Option, + /// A hover search running on another thread. + job: Option, + /// The key whose search on another thread failed: hovering does not search it again. + failed: Option, + /// A press added the path as a preview, which the release keeps. + pressing: bool, +} + +/// The document revision, the gap and the open-filled rule an [`AreaFinder`] was made with. +type FinderKey = ((u64, u64), f64, bool); + +/// A search for the area under `p` on another thread, which hands back the finder it took. +struct HoverJob { + key: FinderKey, + p: Point, + done: std::sync::mpsc::Receiver<(AreaFinder, Option)>, +} + +/// Runs `finder.find(p)` on another thread; gives the finder back when no thread starts. +#[cfg(not(target_arch = "wasm32"))] +fn spawn_find(finder: AreaFinder, p: Point) -> Result)>, Box> { + let (tx, done) = std::sync::mpsc::channel(); + let (back_tx, back) = std::sync::mpsc::channel(); + let spawned = std::thread::Builder::new().name("vectorcraft-fill-area".into()).spawn(move || { + // The finder comes in through a channel, so a thread that does not start leaves it here. + if let Ok(mut f) = back.recv() { + let area = AreaFinder::find(&mut f, p); + // The tool may have dropped the receiver meanwhile (another tool, a new revision). + let _ = tx.send((f, area)); + } + }); + match spawned { + Ok(_) => match back_tx.send(finder) { + Ok(()) => Ok(done), + Err(e) => Err(Box::new(e.0)), + }, + Err(_) => Err(Box::new(finder)), + } +} + +/// The web build has no threads. +#[cfg(target_arch = "wasm32")] +fn spawn_find(finder: AreaFinder, _p: Point) -> Result)>, Box> { + Err(Box::new(finder)) +} + +impl FillAreaTool { + /// A tool with the Shape Builder's default options. + pub fn new() -> Self { + Self { gap_length: GAP_LENGTHS[0], ..Self::default() } + } + + fn gap(&self) -> f64 { + if self.gap_detection { self.gap_length } else { 0.0 } + } + + fn open_filled_as_closed(&self) -> bool { + !self.open_filled_cuts + } + + fn finder_key(&self, cx: &ToolContext) -> FinderKey { + (cx.revision, self.gap(), self.open_filled_as_closed()) + } + + /// The finder for the document as `cx` has it, made again when the key changed. + fn take_finder(&mut self, cx: &ToolContext) -> AreaFinder { + let key = self.finder_key(cx); + match self.finder.take() { + Some((k, f)) if k == key => f, + _ => AreaFinder::new(cx.doc, &every_layer(cx.doc), key.1, key.2), + } + } + + /// The hover area when it is current and holds `p`. + fn hover_holding(&self, cx: &ToolContext, p: Point) -> Option<&EnclosedArea> { + self.hover.as_ref().filter(|(rev, a)| *rev == cx.revision && path_contains(&a.path, FillRule::NonZero, p)).map(|(_, a)| a) + } + + /// The area under `p`, found here and now (a click). A search running on another thread is + /// waited for first, so its finder is not made again. + fn area_at(&mut self, cx: &ToolContext, p: Point) -> Option { + if let Some(a) = self.hover_holding(cx, p) { + return Some(a.clone()); + } + while self.job.is_some() { + self.settle(cx, true); + } + let key = self.finder_key(cx); + let mut finder = self.take_finder(cx); + let area = finder.find(p); + self.finder = Some((key, finder)); + area + } + + /// Looks for the area under `p` for the hover. A search of more than [`BACKGROUND_SEGMENTS`] + /// segments runs on another thread, and [`Tool::poll`] takes its result; while one runs, a new + /// position waits for it. + fn hover_at(&mut self, cx: &ToolContext, p: Point) { + self.at = Some(p); + if self.hover_holding(cx, p).is_some() { + return; + } + // The outline of an area the pointer left goes at once, while the next search runs. + self.hover = None; + if self.job.is_some() { + return; + } + let key = self.finder_key(cx); + if self.failed == Some(key) { + self.hover = None; + return; + } + let mut finder = self.take_finder(cx); + if finder.segments > BACKGROUND_SEGMENTS { + match spawn_find(finder, p) { + Ok(done) => { + self.job = Some(HoverJob { key, p, done }); + return; + } + Err(f) => finder = *f, + } + } + self.hover = finder.find(p).map(|a| (key.0, a)); + self.finder = Some((key, finder)); + } + + /// Takes the result of the hover search on another thread when it is done (`wait`: waits for + /// it), and starts the search for where the pointer moved meanwhile. + fn settle(&mut self, cx: &ToolContext, wait: bool) { + let Some(job) = self.job.take() else { return }; + let got = if wait { + job.done.recv().ok() + } else { + match job.done.try_recv() { + Ok(v) => Some(v), + Err(std::sync::mpsc::TryRecvError::Empty) => { + self.job = Some(job); + return; + } + Err(std::sync::mpsc::TryRecvError::Disconnected) => None, + } + }; + let Some((finder, area)) = got else { + // The search failed (a bug in the planar map): hovering does not search it again, and + // a click searches here, which reports the failure. + self.failed = Some(job.key); + self.hover = None; + return; + }; + let current = job.key == self.finder_key(cx); + if current { + self.finder = Some((job.key, finder)); + } + // The area found serves wherever the pointer moved meanwhile, as long as it holds it. + let at = self.at; + self.hover = area.filter(|a| current && at.is_some_and(|p| path_contains(&a.path, FillRule::NonZero, p))).map(|a| (job.key.0, a)); + if let Some(p) = at + && self.hover.is_none() + && (p != job.p || !current) + { + self.hover_at(cx, p); + } + } +} + +impl Tool for FillAreaTool { + fn id(&self) -> &'static str { + "fillArea" + } + + fn pointer(&mut self, cx: &ToolContext, ev: &PointerEvent) -> Vec { + match ev.kind { + PointerKind::Move => { + self.hover_at(cx, ev.pos); + vec![] + } + PointerKind::Down => { + // A click in no enclosed area does nothing. + let found = self.area_at(cx, ev.pos).is_some(); + self.hover = None; + if !found { + return vec![]; + } + let mut params = json!({ "point": [ev.pos.x, ev.pos.y], "gap": self.gap() }); + if !self.open_filled_as_closed() { + params["openFilledAsClosed"] = json!(false); + } + // The path shows at once and is kept on the release; a press that is dropped (a + // long or canceled touch, a second finger) or Escape before the release takes it + // back. + self.pressing = true; + vec![Action::Begin("Fill Area".into()), Action::Preview("shapeBuilder.copyRegion".into(), params)] + } + PointerKind::Up if std::mem::take(&mut self.pressing) => vec![Action::Commit], + _ => vec![], + } + } + + fn key(&mut self, _cx: &ToolContext, key: ToolKey, _mods: Mods) -> Vec { + if key == ToolKey::Escape && std::mem::take(&mut self.pressing) { vec![Action::Cancel] } else { vec![] } + } + + fn busy(&self) -> bool { + self.pressing + } + + fn overlays(&self, cx: &ToolContext) -> Vec { + self.hover + .iter() + .filter(|(rev, _)| *rev == cx.revision) + .map(|(_, a)| Overlay::Path { path: a.path.to_bezpath(), color: HIGHLIGHT_RED, width: 3.0, dashed: false }) + .collect() + } + + fn cursor(&self, cx: &ToolContext, p: Point, _m: Mods) -> Cursor { + if self.hover_holding(cx, p).is_some() { Cursor::LivePaintBucketFace } else { Cursor::LivePaintBucket } + } + + fn hover_ended(&mut self, _cx: &ToolContext) { + self.hover = None; + self.at = None; + } + + /// The area under a still pointer changes with the document and the view. + fn wants_rehover(&self) -> bool { + true + } + + fn waiting(&self) -> bool { + self.job.is_some() + } + + fn poll(&mut self, cx: &ToolContext, wait: bool) -> Vec { + self.settle(cx, wait); + while wait && self.job.is_some() { + self.settle(cx, true); + } + vec![] + } + + /// The Shape Builder's Gap Detection, Gap Length and Consider Open Filled Paths as Closed, + /// which the tool shares. + fn options(&self) -> Value { + json!({ + "gapDetection": self.gap_detection, + "gapLength": self.gap_length, + "openFilledAsClosed": self.open_filled_as_closed(), + }) + } + + fn set_option(&mut self, key: &str, v: &Value) { + match key { + "gapDetection" => self.gap_detection = v.as_bool().unwrap_or(self.gap_detection), + "gapLength" => { + if let Some(n) = v.as_f64().filter(|n| n.is_finite()) { + self.gap_length = n.clamp(0.0, SHAPE_BUILDER_MAX_GAP); + } + } + "openFilledAsClosed" => { + if let Some(b) = v.as_bool() { + self.open_filled_cuts = !b; + } + } + _ => {} + } + self.hover = None; + } +} diff --git a/crates/tools/src/catalog.rs b/crates/tools/src/catalog.rs index 9bbd7cbdfb..b9263c39a9 100644 --- a/crates/tools/src/catalog.rs +++ b/crates/tools/src/catalog.rs @@ -92,6 +92,7 @@ pub const TOOL_GROUPS: &[&[ToolInfo]] = &[ &[ t("shapeBuilder", "Shape Builder Tool", Some("Shift+M"), "tool-shape-builder"), t("livePaintBucket", "Live Paint Bucket", Some("K"), "tool-bucket"), + t("fillArea", "Fill Area Tool", None, "tool-fill-area"), t("livePaintSelection", "Live Paint Selection Tool", Some("Shift+L"), "tool-live-select"), ], &[ diff --git a/crates/tools/src/cursors.toml b/crates/tools/src/cursors.toml index 51756bf0fd..3a850c72f9 100644 --- a/crates/tools/src/cursors.toml +++ b/crates/tools/src/cursors.toml @@ -514,6 +514,7 @@ id = "LivePaintBucket" group = "Colour and gradient" shown_when = [ "The Live Paint Bucket where a click paints nothing: away from Live Paint groups and the selected paths' regions, or over a part the Paint Fills and Paint Strokes options (and Shift) leave unpainted.", + "The Fill Area tool outside every area that visible, unlocked paths enclose, where a click adds nothing.", "With Use Precise Cursors on, the crosshair shows instead.", ] hotspot = "The drop the paint pours onto." @@ -524,6 +525,7 @@ id = "LivePaintBucketFace" group = "Colour and gradient" shown_when = [ "The Live Paint Bucket over a face of a Live Paint group, or a region of the selected paths, that a click fills.", + "The Fill Area tool over an enclosed area, where a click adds a path of that area.", "With Use Precise Cursors on, the crosshair shows instead.", ] hotspot = "The drop the paint pours onto." diff --git a/crates/tools/src/settings.rs b/crates/tools/src/settings.rs index a5c92b00b0..2c6c5a75e5 100644 --- a/crates/tools/src/settings.rs +++ b/crates/tools/src/settings.rs @@ -69,6 +69,8 @@ const ROWS: &[Row] = &[ "highlightColor", ], ), + // Fill Area uses the Shape Builder's Gap Detection and open-filled-path options. + (&["fillArea"], Some("shapeBuilder"), &["openFilledAsClosed", "gapDetection", "gapLength"]), // Objects on Path Tool Options: the Pivot and Rotate of the objects attached next. (&["objectsOnPath"], None, &["pivot", "rotate"]), (&["artboard"], None, &["moveArt", "scaleArt"]), diff --git a/crates/ui-egui/src/dialogs/shape_builder_options.rs b/crates/ui-egui/src/dialogs/shape_builder_options.rs index 9393e0707e..b49d9f7e17 100644 --- a/crates/ui-egui/src/dialogs/shape_builder_options.rs +++ b/crates/ui-egui/src/dialogs/shape_builder_options.rs @@ -159,6 +159,22 @@ mod tests { assert_eq!(opts["openFilledAsClosed"], true); } + /// Double-clicking the Fill Area tool opens the Shape Builder Tool Options, whose Gap + /// Detection the active Fill Area tool takes on OK. + #[test] + fn the_fill_area_tool_opens_the_shape_builder_options() { + let mut a = app(); + a.select_tool("fillArea"); + let r = a.run("tool.options", json!({"tool": "fillArea"})).unwrap(); + assert_eq!(r["dialog"], json!(KIND)); + let d = a.ui.dialog.as_mut().unwrap(); + d.fields.insert("gapDetection".into(), json!(true)); + d.fields.insert("gapLength".into(), json!(6)); + super::super::confirm(&mut a).unwrap(); + let opts = a.session.tool_options_of("fillArea"); + assert_eq!((opts["gapDetection"].clone(), opts["gapLength"].clone()), (json!(true), json!(6.0))); + } + #[test] fn double_clicking_the_tool_opens_its_options_and_ok_keeps_them() { let mut app = app(); diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index 61e90c789d..1d2633fe99 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -1906,6 +1906,8 @@ font-technology Variable Променливи List Workspaces Извеждане на работни пространства Live Paint Динамично оцветяване Live Paint Bucket Кофа за динамично оцветяване + Fill Area Запълване на област + Fill Area Tool Инструмент „Запълване на област“ Live Paint Bucket (Stroke) Кофа за динамично оцветяване (Щрих) Live Paint Info Информация за динамично оцветяване Live Paint Selection Tool Инструмент за селекция на динамично оцветяване @@ -4311,6 +4313,7 @@ axis Both И двете @msg Saved {path} Записано: {path} @msg Select text or click into text with the Type tool to insert glyphs Изберете текст или щракнете в текста с инструмента „Текст“, за да вмъкнете глифи @msg Shape Builder: no region under the pointer Инструмент за създаване на форми: няма област под показалеца +@msg Fill Area: no enclosed area under the pointer Запълване на област: няма затворена област под показалеца @msg Shape Builder: select paths or compound paths Инструмент за създаване на форми: изберете пътища или съставни пътища @msg Show All Hidden Attributes: nothing is hidden Показване на всички скрити атрибути: нищо не е скрито @msg Split Into Grid: select paths large enough for the grid Разделяне на мрежа: изберете пътища, достатъчно големи за мрежата diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index b3a4eefc2f..d84b3e6128 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -3451,6 +3451,8 @@ theme Appearance Izgled Symbolism Tool Alat simbolizam Image Trace Presets Predlošci praćenja slike Live Paint Bucket Kanta za živo bojenje + Fill Area Popuni područje + Fill Area Tool Alat za popunjavanje područja Live Paint Bucket (Stroke) Kanta za živo bojenje (potez) Live Paint Info Informacije o živom bojenju Shape Builder Graditelj oblika @@ -4685,6 +4687,7 @@ imageTrace Outline Obris @msg Saved {path} Sačuvano: {path} @msg Select text or click into text with the Type tool to insert glyphs Odaberite tekst ili kliknite u tekst alatom za tekst da umetnete glifove @msg Shape Builder: no region under the pointer Graditelj oblika: nema regije ispod pokazivača +@msg Fill Area: no enclosed area under the pointer Popuni područje: nema zatvorenog područja ispod pokazivača @msg Shape Builder: select paths or compound paths Graditelj oblika: odaberite putanje ili složene putanje @msg Show All Hidden Attributes: nothing is hidden Prikaži sve skrivene atribute: ništa nije skriveno @msg Split Into Grid: select paths large enough for the grid Podijeli u mrežu: odaberite putanje dovoljno velike za mrežu diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 2f9f1d8fdc..26dea6bf21 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -2479,6 +2479,8 @@ digits Malayalam Malaiàlam Live curve fitting Ajustament de corbes en directe Live Paint Pintura interactiva Live Paint Bucket Galleda de pintura interactiva + Fill Area Emplena l'àrea + Fill Area Tool Eina Emplena l'àrea Live Paint Bucket (Stroke) Galleda de pintura interactiva (traç) Live Paint Info Informació de pintura interactiva Live Paint Selection Tool Eina de selecció de pintura interactiva @@ -6298,6 +6300,7 @@ digits Malayalam Malaiàlam @msg shadings of more than 4096 patches or triangles were left out els ombrejats de més de 4096 pedaços o triangles s’han omès @msg shadings whose functions are of an unknown type are filled with their middle colour els ombrejats les funcions dels quals són d’un tipus desconegut s’omplen amb el seu color central @msg Shape Builder: no region under the pointer Constructor de formes: no hi ha cap regió sota el punter +@msg Fill Area: no enclosed area under the pointer Emplena l'àrea: no hi ha cap àrea tancada sota el punter @msg Shape Builder: select paths or compound paths Constructor de formes: selecciona traçats o traçats compostos @msg shortcut for `{k}` must be a string la drecera de `{k}` ha de ser una cadena @msg Show All Hidden Attributes: nothing is hidden Mostra tots els atributs ocults: no hi ha res d’ocult diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 4628b89a1d..a519d436fc 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -3543,6 +3543,8 @@ theme Appearance Motiv Symbolism Tool Nástroj symbolů Image Trace Presets Přednastavení vektorizace obrazu Live Paint Bucket Kbelík živé malby + Fill Area Vyplnit oblast + Fill Area Tool Nástroj Vyplnit oblast Live Paint Bucket (Stroke) Kbelík živé malby (tah) Live Paint Info Informace o živé malbě Shape Builder Tvorba tvarů @@ -4888,6 +4890,7 @@ imageTrace Outline Obrys @msg Saved {path} Uloženo: {path} @msg Select text or click into text with the Type tool to insert glyphs Glyfy vložíte, když vyberete text nebo do něj kliknete nástrojem Text @msg Shape Builder: no region under the pointer Tvorba tvarů: pod ukazatelem není žádná oblast +@msg Fill Area: no enclosed area under the pointer Vyplnit oblast: pod ukazatelem není žádná uzavřená oblast @msg Shape Builder: select paths or compound paths Tvorba tvarů: vyberte cesty nebo složené cesty @msg Show All Hidden Attributes: nothing is hidden Zobrazit všechny skryté atributy: nic není skryto @msg Split Into Grid: select paths large enough for the grid Rozdělit do mřížky: vyberte cesty dost velké pro mřížku diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index 8b822be042..62fc5496e9 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -3892,6 +3892,8 @@ theme Appearance Udseende Symbolism Tool Symbolværktøj Image Trace Presets Forudindstillinger til billedsporing Live Paint Bucket Live Paint-spand + Fill Area Udfyld område + Fill Area Tool Værktøjet Udfyld område Live Paint Bucket (Stroke) Live Paint-spand (kontur) Live Paint Info Live Paint-info Shape Builder Formbygger @@ -5093,6 +5095,7 @@ imageTrace Outline Kontur @msg Saved {path} Gemte {path} @msg Select text or click into text with the Type tool to insert glyphs Markér tekst, eller klik i tekst med tekstværktøjet, for at indsætte glyffer @msg Shape Builder: no region under the pointer Figurbygger: intet område under markøren +@msg Fill Area: no enclosed area under the pointer Udfyld område: intet lukket område under markøren @msg Shape Builder: select paths or compound paths Figurbygger: markér kurver eller sammensatte kurver @msg Show All Hidden Attributes: nothing is hidden Vis alle skjulte attributter: intet er skjult @msg Split Into Grid: select paths large enough for the grid Opdel i gitter: markér kurver, der er store nok til gitteret diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 752a60accd..27d2b641d3 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -1979,6 +1979,8 @@ file-filter Templates Vorlagen List Workspaces Arbeitsbereiche auflisten Live Paint Interaktiv malen Live Paint Bucket Interaktiv-malen-Werkzeug + Fill Area Fläche füllen + Fill Area Tool Fläche-füllen-Werkzeug Live Paint Bucket (Stroke) Interaktiv-malen-Werkzeug (Kontur) Live Paint Info Informationen zu „Interaktiv malen“ Live Paint Selection Tool Interaktiv-malen-Auswahlwerkzeug @@ -4490,6 +4492,7 @@ theme Appearance Erscheinungsbild @msg Saved {path} {path} gespeichert @msg Select text or click into text with the Type tool to insert glyphs Wählen Sie Text aus oder klicken Sie mit dem Text-Werkzeug in einen Text, um Glyphen einzufügen @msg Shape Builder: no region under the pointer Formerstellung: kein Bereich unter dem Zeiger +@msg Fill Area: no enclosed area under the pointer Fläche füllen: kein geschlossener Bereich unter dem Zeiger @msg Shape Builder: select paths or compound paths Formerstellung: Wählen Sie Pfade oder zusammengesetzte Pfade aus @msg Show All Hidden Attributes: nothing is hidden Alle ausgeblendeten Attribute einblenden: Es ist nichts ausgeblendet @msg Split Into Grid: select paths large enough for the grid In Raster teilen: Wählen Sie Pfade aus, die groß genug für das Raster sind diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 9b32ea177c..fa15a3f764 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -2582,6 +2582,7 @@ axis Both Και τα δύο @msg Saved {path} Αποθηκεύτηκε το {path} @msg Select text or click into text with the Type tool to insert glyphs Επιλέξτε κείμενο ή κάντε κλικ μέσα σε κείμενο με το εργαλείο κειμένου για εισαγωγή γλύφων @msg Shape Builder: no region under the pointer Δημιουργία σχημάτων: δεν υπάρχει περιοχή κάτω από τον δείκτη +@msg Fill Area: no enclosed area under the pointer Γέμισμα περιοχής: δεν υπάρχει κλειστή περιοχή κάτω από τον δείκτη @msg Shape Builder: select paths or compound paths Δημιουργία σχημάτων: επιλέξτε διαδρομές ή σύνθετες διαδρομές @msg Show All Hidden Attributes: nothing is hidden Εμφάνιση όλων των κρυφών χαρακτηριστικών: δεν υπάρχουν κρυφά χαρακτηριστικά @msg Split Into Grid: select paths large enough for the grid Διαίρεση σε πλέγμα: επιλέξτε αρκετά μεγάλες διαδρομές για το πλέγμα @@ -2991,6 +2992,8 @@ theme Appearance Εμφάνιση List View Προβολή λίστας List Workspaces Λίστα χώρων εργασίας Live Paint Bucket Κουβάς δυναμικής βαφής + Fill Area Γέμισμα περιοχής + Fill Area Tool Εργαλείο γεμίσματος περιοχής Live Paint Bucket (Stroke) Κουβάς δυναμικής βαφής (περίγραμμα) Live Paint Info Πληροφορίες δυναμικής βαφής Live Paint Selection Tool Επιλογή δυναμικής βαφής (Live Paint Selection Tool) diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 9c81265e9d..8b64b99e89 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -1976,6 +1976,8 @@ font-technology Variable Variables List Workspaces Enumerar espacios de trabajo Live Paint Pintura interactiva Live Paint Bucket Bote de pintura interactiva + Fill Area Rellenar área + Fill Area Tool Herramienta Rellenar área Live Paint Bucket (Stroke) Bote de pintura interactiva (trazo) Live Paint Info Información de pintura interactiva Live Paint Selection Tool Herramienta Selección de pintura interactiva @@ -4579,6 +4581,7 @@ axis Both Ambos @msg Saved {path} Se guardó {path} @msg Select text or click into text with the Type tool to insert glyphs Selecciona texto o haz clic dentro del texto con la herramienta Texto para insertar glifos @msg Shape Builder: no region under the pointer Generador de formas: no hay ninguna región bajo el puntero +@msg Fill Area: no enclosed area under the pointer Rellenar área: no hay ninguna área cerrada bajo el puntero @msg Shape Builder: select paths or compound paths Generador de formas: selecciona trazados o trazados compuestos @msg Show All Hidden Attributes: nothing is hidden Mostrar todos los atributos ocultos: no hay nada oculto @msg Split Into Grid: select paths large enough for the grid Dividir en cuadrícula: selecciona trazados lo bastante grandes para la cuadrícula diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 67897bbe68..7bd151914d 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -3482,6 +3482,8 @@ theme Appearance Ulkoasu Symbolism Tool Symbolityökalu Image Trace Presets Kuvan jäljityksen esiasetukset Live Paint Bucket Elävän maalauksen ämpäri + Fill Area Täytä alue + Fill Area Tool Alueen täyttötyökalu Live Paint Bucket (Stroke) Elävän maalauksen ämpäri (viiva) Live Paint Info Elävän maalauksen tiedot Shape Builder Muodonmuodostin @@ -4812,6 +4814,7 @@ imageTrace Outline Ääriviiva @msg Saved {path} Tallennettiin {path} @msg Select text or click into text with the Type tool to insert glyphs Valitse tekstiä tai napsauta tekstiin tekstityökalulla, niin voit lisätä merkkejä @msg Shape Builder: no region under the pointer Muodonmuodostin: osoittimen alla ei ole aluetta +@msg Fill Area: no enclosed area under the pointer Täytä alue: osoittimen alla ei ole suljettua aluetta @msg Shape Builder: select paths or compound paths Muodonmuodostin: valitse polkuja tai yhdistelmäpolkuja @msg Show All Hidden Attributes: nothing is hidden Näytä kaikki piilotetut attribuutit: mitään ei ole piilotettu @msg Split Into Grid: select paths large enough for the grid Jaa ruudukoksi: valitse ruudukolle riittävän suuret polut diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 9c04f43b1b..00a12a3f59 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -1970,6 +1970,8 @@ font-technology Variable Variables List Workspaces Lister les espaces de travail Live Paint Peinture dynamique Live Paint Bucket Pot de peinture dynamique + Fill Area Remplir la zone + Fill Area Tool Outil Remplir la zone Live Paint Bucket (Stroke) Pot de peinture dynamique (contour) Live Paint Info Informations sur la peinture dynamique Live Paint Selection Tool Outil Sélection de peinture dynamique @@ -4557,6 +4559,7 @@ axis Both Les deux @msg Saved to User Defined: {_1} Enregistré dans Défini par l’utilisateur : {_1} @msg Saved {path} {path} enregistré @msg Select text or click into text with the Type tool to insert glyphs Sélectionnez du texte ou cliquez dans un texte avec l’outil Texte pour insérer des glyphes +@msg Fill Area: no enclosed area under the pointer Remplir la zone : aucune zone fermée sous le pointeur @msg Shape Builder: no region under the pointer Concepteur de forme : aucune zone sous le pointeur @msg Shape Builder: select paths or compound paths Concepteur de forme : sélectionnez des tracés ou des tracés transparents @msg Show All Hidden Attributes: nothing is hidden Afficher tous les attributs masqués : rien n’est masqué diff --git a/crates/ui-egui/src/i18n/gu.tsv b/crates/ui-egui/src/i18n/gu.tsv index 4807c7ec25..9705fe9b1a 100644 --- a/crates/ui-egui/src/i18n/gu.tsv +++ b/crates/ui-egui/src/i18n/gu.tsv @@ -2029,6 +2029,8 @@ List Workspaces વર્કસ્પેસની યાદી Live Paint લાઇવ પેઇન્ટ Live Paint Bucket લાઇવ પેઇન્ટ બકેટ + Fill Area વિસ્તાર ભરો + Fill Area Tool વિસ્તાર ભરો ટૂલ Live Paint Bucket (Stroke) લાઇવ પેઇન્ટ બકેટ (સ્ટ્રોક) Live Paint Info લાઇવ પેઇન્ટ માહિતી Live Paint Selection Tool લાઇવ પેઇન્ટ પસંદગી ટૂલ diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 15582a2dbd..4bd2dde82b 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -2728,6 +2728,8 @@ antiAlias Sharp शार्प Live curve fitting लाइव वक्र फिटिंग Live Paint लाइव पेंट Live Paint Bucket लाइव पेंट बकेट + Fill Area क्षेत्र भरें + Fill Area Tool क्षेत्र भरें टूल Live Paint Bucket (Stroke) लाइव पेंट बाल्टी (स्ट्रोक) Live Paint Info लाइव पेंट जानकारी Live Paint Selection Tool लाइव पेंट सिलेक्शन टूल @@ -8089,6 +8091,7 @@ antiAlias Sharp शार्प @msg shadings of more than 4096 patches or triangles were left out 4096 से अधिक पैच या त्रिकोणों के छायांकन को छोड़ दिया गया था @msg shadings whose functions are of an unknown type are filled with their middle colour छायांकन जिसका कार्य अज्ञात प्रकार के होते हैं, उनके मध्य रंग से भरे होते हैं @msg Shape Builder: no region under the pointer आकृति बिल्डर: सूचक के तहत कोई क्षेत्र नहीं +@msg Fill Area: no enclosed area under the pointer क्षेत्र भरें: सूचक के तहत कोई बंद क्षेत्र नहीं @msg Shape Builder: select paths or compound paths आकृति बिल्डर: पाथ या मिश्रित पाथ सिलेक्ट करें @msg Shaper needs 1–64 source paths शेपर के लिए 1–64 स्रोत पाथ चाहिए @msg shortcut for `{k}` must be a string `{k}` के लिए शॉर्टकट एक स्ट्रिंग होना चाहिए diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 8ddb1d34ca..8e8bae5fb7 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -2474,6 +2474,8 @@ file-filter Templates Sablonok List Workspaces Munkaterületek listázása Live Paint Élő festés Live Paint Bucket Élő festékesvödör + Fill Area Terület kitöltése + Fill Area Tool Területkitöltő eszköz Live Paint Bucket (Stroke) Élő festékesvödör (körvonal) Live Paint Info Élő festés adatai Live Paint Selection Tool Élőfestés-kijelölés @@ -5820,6 +5822,7 @@ imageTrace Outline Körvonal @msg shadings of more than 4096 patches or triangles were left out kimaradtak a 4096-nál több foltból vagy háromszögből álló árnyalások @msg shadings whose functions are of an unknown type are filled with their middle colour az ismeretlen típusú függvényt használó árnyalások a középső színükkel kitöltve jelennek meg @msg Shape Builder: no region under the pointer Alakzatépítő: a mutató alatt nincs terület +@msg Fill Area: no enclosed area under the pointer Terület kitöltése: a mutató alatt nincs zárt terület @msg Shape Builder: select paths or compound paths Alakzatépítő: jelölj ki útvonalakat vagy összetett útvonalakat @msg shortcut for `{k}` must be a string `{k}` billentyűparancsa csak szöveg lehet @msg Show All Hidden Attributes: nothing is hidden Összes rejtett attribútum megjelenítése: nincs rejtett elem diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index 8d7639c430..33aa3dca40 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -3226,6 +3226,8 @@ theme Appearance Tampilan Symbolism Tool Alat simbolisme Image Trace Presets Preset telusur gambar Live Paint Bucket Ember Live Paint + Fill Area Isi Area + Fill Area Tool Alat Isi Area Live Paint Bucket (Stroke) Ember Live Paint (guratan) Live Paint Info Info Live Paint Shape Builder Pembangun bentuk @@ -4427,6 +4429,7 @@ imageTrace Outline Kontur @msg Saved {path} Berhasil menyimpan {path} @msg Select text or click into text with the Type tool to insert glyphs Pilih teks atau klik di dalam teks dengan alat Teks untuk menyisipkan glif @msg Shape Builder: no region under the pointer Pembangun Bentuk: tidak ada area di bawah penunjuk +@msg Fill Area: no enclosed area under the pointer Isi Area: tidak ada area tertutup di bawah penunjuk @msg Shape Builder: select paths or compound paths Pembangun Bentuk: pilih jalur atau jalur majemuk @msg Show All Hidden Attributes: nothing is hidden Tampilkan semua atribut tersembunyi: tidak ada yang tersembunyi @msg Split Into Grid: select paths large enough for the grid Bagi menjadi kisi: pilih jalur yang cukup besar untuk kisi diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 1c0590ff98..dd640f71e6 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -2012,6 +2012,8 @@ file-filter Templates Modelli List Workspaces Elenca aree di lavoro Live Paint Pittura dinamica Live Paint Bucket Secchiello pittura dinamica + Fill Area Riempi area + Fill Area Tool Strumento Riempi area Live Paint Bucket (Stroke) Secchiello pittura dinamica (traccia) Live Paint Info Informazioni pittura dinamica Live Paint Selection Tool Strumento Selezione pittura dinamica @@ -4620,6 +4622,7 @@ axis Both Entrambi @msg Saved {path} Salvato {path} @msg Select text or click into text with the Type tool to insert glyphs Seleziona del testo o fai clic nel testo con lo strumento Testo per inserire glifi @msg Shape Builder: no region under the pointer Generatore forme: nessuna regione sotto il puntatore +@msg Fill Area: no enclosed area under the pointer Riempi area: nessuna area chiusa sotto il puntatore @msg Shape Builder: select paths or compound paths Generatore forme: seleziona tracciati o tracciati composti @msg Show All Hidden Attributes: nothing is hidden Mostra tutti gli attributi nascosti: non c'è nulla di nascosto @msg Split Into Grid: select paths large enough for the grid Dividi in griglia: seleziona tracciati abbastanza grandi per la griglia diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index dedcdb328e..bc4ceb16bf 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -2277,6 +2277,8 @@ antiAlias Sharp シャープ List View リスト表示 List Workspaces ワークスペースの一覧 Live Paint Bucket ライブペイントツール + Fill Area 領域を塗りつぶし + Fill Area Tool 領域塗りつぶしツール Live Paint Bucket (Stroke) ライブペイントツール (線) Live Paint Info ライブペイント情報 Live Paint Selection Tool ライブペイント選択ツール @@ -4533,6 +4535,7 @@ swatch Bright Violet ビビッドバイオレット @msg Live Paint: select paths or compound paths ライブペイント: パスまたは複合パスを選択してください @msg Live Paint: these paths are too degenerate to paint ライブペイント: これらのパスは形状がつぶれすぎていてペイントできません @msg Shape Builder: no region under the pointer シェイプ形成ツール: ポインターの下に領域がありません +@msg Fill Area: no enclosed area under the pointer 領域を塗りつぶし: ポインターの下に閉じた領域がありません @msg Shape Builder: select paths or compound paths シェイプ形成ツール: パスまたは複合パスを選択してください @msg image data `{_1}` is missing 画像データ `{_1}` が見つかりません @msg no Live Paint edge near that point その位置の近くにライブペイントのエッジがありません diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index d9d75dd737..45f0616852 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -5196,6 +5196,8 @@ theme Appearance იერსახე Symbolism Tool სიმბოლოების ხელსაწყო Image Trace Presets გამოსახულების ვექტორიზაციის პრესეტები Live Paint Bucket ცოცხალი შეღებვის სათლი + Fill Area არის შევსება + Fill Area Tool არის შევსების ხელსაწყო Live Paint Bucket (Stroke) ცოცხალი შეღებვის სათლი (კონტური) Live Paint Info ცოცხალი შეღებვის ინფორმაცია Shape Builder ფიგურების კონსტრუქტორი @@ -6354,6 +6356,7 @@ font-technology Variable ცვლადი @msg Saved {path} შენახულია: {path} @msg Select text or click into text with the Type tool to insert glyphs გლიფების ჩასასმელად მონიშნეთ ტექსტი ან ტექსტის ხელსაწყოთი დაწკაპეთ ტექსტში @msg Shape Builder: no region under the pointer ფიგურების კონსტრუქტორი: მაჩვენებლის ქვეშ არე არ არის +@msg Fill Area: no enclosed area under the pointer არის შევსება: მაჩვენებლის ქვეშ დახურული არე არ არის @msg Shape Builder: select paths or compound paths ფიგურების კონსტრუქტორი: მონიშნეთ ტრაექტორიები ან შედგენილი ტრაექტორიები @msg Show All Hidden Attributes: nothing is hidden ყველა დამალული ატრიბუტის ჩვენება: დამალული არაფერია @msg Split Into Grid: select paths large enough for the grid ბადედ გაყოფა: მონიშნეთ ბადისთვის საკმარისად დიდი ტრაექტორიები diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 90f4e1f3fd..6ebaaa67bc 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -2267,6 +2267,8 @@ antiAlias Sharp 날카롭게 List View 목록 보기 List Workspaces 작업 영역 목록 Live Paint Bucket 라이브 페인트 통 + Fill Area 영역 채우기 + Fill Area Tool 영역 채우기 도구 Live Paint Bucket (Stroke) 라이브 페인트 통 (선) Live Paint Info 라이브 페인트 정보 Live Paint Selection Tool 라이브 페인트 선택 도구 @@ -4460,6 +4462,7 @@ theme Appearance 외관 @msg Live Paint: select paths or compound paths 라이브 페인트: 패스 또는 컴파운드 패스를 선택하세요 @msg Live Paint: these paths are too degenerate to paint 라이브 페인트: 이 패스는 퇴화되어 칠할 수 없습니다 @msg Shape Builder: no region under the pointer 모양 빌더: 포인터 아래에 영역이 없습니다 +@msg Fill Area: no enclosed area under the pointer 영역 채우기: 포인터 아래에 닫힌 영역이 없습니다 @msg Shape Builder: select paths or compound paths 모양 빌더: 패스 또는 컴파운드 패스를 선택하세요 @msg image data `{_1}` is missing 이미지 데이터 `{_1}`이(가) 없습니다 @msg no Live Paint edge near that point 그 지점 근처에 라이브 페인트 가장자리가 없습니다 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 990e369f0f..f118f22f15 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -3788,6 +3788,8 @@ theme Appearance Vormgeving Symbolism Tool Symbolisatiegereedschap Image Trace Presets Voorinstellingen voor afbeeldingtracering Live Paint Bucket Live Paint-emmer + Fill Area Gebied vullen + Fill Area Tool Gereedschap Gebied vullen Live Paint Bucket (Stroke) Live Paint-emmer (streek) Live Paint Info Live Paint-info Shape Builder Vormopbouw @@ -4990,6 +4992,7 @@ imageTrace Outline Contour @msg Saved {path} {path} opgeslagen @msg Select text or click into text with the Type tool to insert glyphs Selecteer tekst of klik met het tekstgereedschap in tekst om glyphs in te voegen @msg Shape Builder: no region under the pointer Vormbouwer: geen gebied onder de aanwijzer +@msg Fill Area: no enclosed area under the pointer Gebied vullen: geen gesloten gebied onder de aanwijzer @msg Shape Builder: select paths or compound paths Vormbouwer: selecteer paden of samengestelde paden @msg Show All Hidden Attributes: nothing is hidden Alle verborgen kenmerken tonen: er is niets verborgen @msg Split Into Grid: select paths large enough for the grid In raster verdelen: selecteer paden die groot genoeg zijn voor het raster diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 647a0c62bd..f7900b61c5 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -3422,6 +3422,8 @@ theme Appearance Wygląd Symbolism Tool Narzędzie symboli Image Trace Presets Ustawienia obrysu obrazu Live Paint Bucket Wiadro aktywnego malowania + Fill Area Wypełnij obszar + Fill Area Tool Narzędzie Wypełnij obszar Live Paint Bucket (Stroke) Wiadro aktywnego malowania (obrys) Live Paint Info Informacje o aktywnym malowaniu Shape Builder Kreator kształtów @@ -4711,6 +4713,7 @@ imageTrace Outline Kontur @msg Saved {path} Zapisano {path} @msg Select text or click into text with the Type tool to insert glyphs Zaznacz tekst lub kliknij w tekst narzędziem Tekst, aby wstawić glify @msg Shape Builder: no region under the pointer Kreator kształtów: brak obszaru pod wskaźnikiem +@msg Fill Area: no enclosed area under the pointer Wypełnij obszar: brak zamkniętego obszaru pod wskaźnikiem @msg Shape Builder: select paths or compound paths Kreator kształtów: zaznacz ścieżki lub ścieżki złożone @msg Show All Hidden Attributes: nothing is hidden Pokaż wszystkie ukryte atrybuty: nic nie jest ukryte @msg Split Into Grid: select paths large enough for the grid Podziel na siatkę: zaznacz ścieżki wystarczająco duże dla siatki diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 2c0817772d..bc38bc7477 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -1658,6 +1658,8 @@ antiAlias Sharp Nítido List Workspaces Listar Espaços de Trabalho Live Paint Pintura ao Vivo Live Paint Bucket Balde de Pintura ao Vivo + Fill Area Preencher área + Fill Area Tool Ferramenta Preencher Área Live Paint Bucket (Stroke) Balde de Pintura ao Vivo (Traçado) Live Paint Info Informações da Pintura ao Vivo Live Paint Selection Tool Ferramenta Seleção de Pintura ao Vivo @@ -3954,6 +3956,7 @@ axis Both Ambos @msg Saved {path} {path} salvo @msg Select text or click into text with the Type tool to insert glyphs Selecione texto ou clique em um texto com a ferramenta Texto para inserir glifos @msg Shape Builder: no region under the pointer Criador de formas: nenhuma região sob o ponteiro +@msg Fill Area: no enclosed area under the pointer Preencher área: nenhuma área fechada sob o ponteiro @msg Shape Builder: select paths or compound paths Criador de formas: selecione traçados ou traçados compostos @msg Show All Hidden Attributes: nothing is hidden Mostrar todos os atributos ocultos: nada está oculto @msg Split Into Grid: select paths large enough for the grid Dividir em grade: selecione traçados grandes o bastante para a grade diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 28db02bb34..ddaf229a94 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -2003,6 +2003,8 @@ file-filter Templates Шаблоны List Workspaces Перечислить рабочие среды Live Paint Быстрая заливка Live Paint Bucket Быстрая заливка (ведро) + Fill Area Заливка области + Fill Area Tool Инструмент «Заливка области» Live Paint Bucket (Stroke) Быстрая заливка (обводка) Live Paint Info Сведения о быстрой заливке Live Paint Selection Tool Инструмент «Выделение быстрой заливки» @@ -4616,6 +4618,7 @@ axis Both Оба @msg Saved {path} Сохранено: {path} @msg Select text or click into text with the Type tool to insert glyphs Выделите текст или щёлкните внутри текста инструментом «Текст», чтобы вставить глифы @msg Shape Builder: no region under the pointer Создание фигур: под указателем нет области +@msg Fill Area: no enclosed area under the pointer Заливка области: под указателем нет замкнутой области @msg Shape Builder: select paths or compound paths Создание фигур: выделите контуры или составные контуры @msg Show All Hidden Attributes: nothing is hidden Показать все скрытые атрибуты: ничего не скрыто @msg Split Into Grid: select paths large enough for the grid Разделение на сетку: выделите контуры, достаточно большие для сетки diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 2f19e59397..ef3259a8bb 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -1915,6 +1915,8 @@ font-technology Variable Variabla List Workspaces Lista arbetslayouter Live Paint Direktmålning Live Paint Bucket Direktmålningshink + Fill Area Fyll område + Fill Area Tool Verktyget Fyll område Live Paint Bucket (Stroke) Direktmålningshink (kontur) Live Paint Info Direktmålningsinfo Live Paint Selection Tool Markeringsverktyg för direktmålning @@ -4489,6 +4491,7 @@ axis Both Båda @msg Saved {path} Sparade {path} @msg Select text or click into text with the Type tool to insert glyphs Markera text eller klicka i text med textverktyget för att infoga glyfer @msg Shape Builder: no region under the pointer Formbyggare: inget område under pekaren +@msg Fill Area: no enclosed area under the pointer Fyll område: inget slutet område under pekaren @msg Shape Builder: select paths or compound paths Formbyggare: markera banor eller sammansatta banor @msg Show All Hidden Attributes: nothing is hidden Visa alla dolda attribut: ingenting är dolt @msg Split Into Grid: select paths large enough for the grid Dela upp i rutnät: markera banor som är tillräckligt stora för rutnätet diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 7639c326cb..41b181cbe5 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -1802,6 +1802,8 @@ font-technology Variable Değişken List Workspaces Çalışma Alanlarını Listeleme Live Paint Canlı Boyama Live Paint Bucket Canlı Boyama Kovası + Fill Area Alanı Doldur + Fill Area Tool Alan Doldurma Aracı Live Paint Bucket (Stroke) Canlı Boya Kovası (Strok) Live Paint Info Canlı Boyama Bilgisi Live Paint Selection Tool Canlı Boyama Seçim Aracı @@ -4332,6 +4334,7 @@ axis Both Her İkisi @msg Saved {path} {path} kaydedildi @msg Select text or click into text with the Type tool to insert glyphs Glif eklemek için metni seçin veya Yazım aracıyla metne tıklayın @msg Shape Builder: no region under the pointer Şekil Oluşturucu: işaretçinin altında bölge yok +@msg Fill Area: no enclosed area under the pointer Alanı Doldur: işaretçinin altında kapalı alan yok @msg Shape Builder: select paths or compound paths Şekil Oluşturucu: yolları veya bileşik yolları seçin @msg Show All Hidden Attributes: nothing is hidden Tüm Gizli Özellikleri Göster: hiçbir şey gizli değildir @msg Split Into Grid: select paths large enough for the grid Izgaraya Böl: ızgara için yeterince büyük yollar seçin diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index b95631a14b..0d6ca7aabb 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -2006,6 +2006,8 @@ file-filter Templates Шаблони List Workspaces Перелічити робочі середовища Live Paint Швидка заливка Live Paint Bucket Швидка заливка (відро) + Fill Area Заливка області + Fill Area Tool Інструмент «Заливка області» Live Paint Bucket (Stroke) Швидка заливка (обведення) Live Paint Info Відомості про швидку заливку Live Paint Selection Tool Інструмент «Виділення швидкої заливки» @@ -4604,6 +4606,7 @@ axis Both Обидві @msg Saved {path} Збережено: {path} @msg Select text or click into text with the Type tool to insert glyphs Виділіть текст або клацніть всередині тексту інструментом «Текст», щоб вставити гліфи @msg Shape Builder: no region under the pointer Створення фігур: під вказівником немає області +@msg Fill Area: no enclosed area under the pointer Заливка області: під вказівником немає замкненої області @msg Shape Builder: select paths or compound paths Створення фігур: виділіть контури або складені контури @msg Show All Hidden Attributes: nothing is hidden Показати всі приховані атрибути: нічого не приховано @msg Split Into Grid: select paths large enough for the grid Поділ на сітку: виділіть контури, досить великі для сітки diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 3cc07d98cc..ab56736406 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -2308,6 +2308,8 @@ digits Hindi Hindi List Workspaces Liệt kê không gian làm việc Live Paint Tô trực tiếp Live Paint Bucket Xô Tô trực tiếp + Fill Area Tô vùng + Fill Area Tool Công cụ Tô vùng Live Paint Bucket (Stroke) Xô Tô trực tiếp (Nét) Live Paint Info Thông tin Tô trực tiếp Live Paint Selection Tool Công cụ Chọn Tô trực tiếp @@ -5495,6 +5497,7 @@ theme Appearance Giao diện @msg shadings of more than 4096 patches or triangles were left out các vùng tô có hơn 4096 mảnh hoặc tam giác đã bị bỏ qua @msg shadings whose functions are of an unknown type are filled with their middle colour các vùng tô có hàm loại không xác định được tô bằng màu giữa @msg Shape Builder: no region under the pointer Xây dựng hình dạng: không có vùng nào dưới con trỏ +@msg Fill Area: no enclosed area under the pointer Tô vùng: không có vùng kín nào dưới con trỏ @msg Shape Builder: select paths or compound paths Xây dựng hình dạng: chọn đường dẫn hoặc đường dẫn phức @msg shortcut for `{k}` must be a string phím tắt cho `{k}` phải là chuỗi @msg Show All Hidden Attributes: nothing is hidden Hiện tất cả thuộc tính ẩn: không có gì bị ẩn diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index f96d93d9ea..0583b22448 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -1883,6 +1883,8 @@ file-filter Templates 模板 List Workspaces 列出工作区 Live Paint 实时上色 Live Paint Bucket 实时上色工具 + Fill Area 填充区域 + Fill Area Tool 填充区域工具 Live Paint Bucket (Stroke) 实时上色工具 (描边) Live Paint Info 实时上色信息 Live Paint Selection Tool 实时上色选择工具 @@ -4247,6 +4249,7 @@ imageTrace Outline 轮廓 @msg Live Paint: select paths or compound paths 实时上色:请选择路径或复合路径 @msg Live Paint: these paths are too degenerate to paint 实时上色:这些路径过于退化,无法上色 @msg Shape Builder: no region under the pointer 形状生成器:指针下方没有区域 +@msg Fill Area: no enclosed area under the pointer 填充区域:指针下方没有封闭区域 @msg Shape Builder: select paths or compound paths 形状生成器:请选择路径或复合路径 @msg image data `{_1}` is missing 缺少图像数据 `{_1}` @msg no Live Paint edge near that point 该点附近没有实时上色边缘 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 6a962013ca..5847a39151 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -1892,6 +1892,7 @@ file-filter Templates 範本 @msg Live Paint: select paths or compound paths 即時上色:請選取路徑或複合路徑 @msg Live Paint: these paths are too degenerate to paint 即時上色:這些路徑過度退化,無法上色 @msg Shape Builder: no region under the pointer 形狀建立:指標下方沒有區域 +@msg Fill Area: no enclosed area under the pointer 填滿區域:指標下方沒有封閉區域 @msg Shape Builder: select paths or compound paths 形狀建立:請選取路徑或複合路徑 @msg image data `{_1}` is missing 找不到影像資料 `{_1}` @msg no Live Paint edge near that point 該點附近沒有即時上色邊緣 @@ -3073,6 +3074,8 @@ file-filter Templates 範本 List Workspaces 列出工作區 Live Paint 即時上色 Live Paint Bucket 即時上色油漆桶 + Fill Area 填滿區域 + Fill Area Tool 填滿區域工具 Live Paint Bucket (Stroke) 即時上色油漆桶 (筆畫) Live Paint Info 即時上色資訊 Live Paint Selection Tool 即時上色選取工具 diff --git a/crates/ui-egui/src/icon_data.rs b/crates/ui-egui/src/icon_data.rs index f521e45c22..5239fc05c0 100644 --- a/crates/ui-egui/src/icon_data.rs +++ b/crates/ui-egui/src/icon_data.rs @@ -82,6 +82,7 @@ pub static ICONS: &[(&str, &[u8])] = &[ ("dc-draw-inside", include_bytes!("../../../assets/icons/dc-draw-inside.svg")), ("dc-draw-normal", include_bytes!("../../../assets/icons/dc-draw-normal.svg")), ("dc-ellipse", include_bytes!("../../../assets/icons/dc-ellipse.svg")), + ("dc-fill-area", include_bytes!("../../../assets/icons/dc-fill-area.svg")), ("dc-fill-none", include_bytes!("../../../assets/icons/dc-fill-none.svg")), ("dc-filter", include_bytes!("../../../assets/icons/dc-filter.svg")), ("dc-flare", include_bytes!("../../../assets/icons/dc-flare.svg")), diff --git a/crates/ui-egui/src/icons.rs b/crates/ui-egui/src/icons.rs index e352653279..c795aeb7ee 100644 --- a/crates/ui-egui/src/icons.rs +++ b/crates/ui-egui/src/icons.rs @@ -77,6 +77,7 @@ pub fn tool_icon(name: &str) -> &'static str { "tool-puppet" => "dc-puppet", "tool-shape-builder" => "dc-shape-builder", "tool-bucket" => "dc-live-bucket", + "tool-fill-area" => "dc-fill-area", "tool-live-select" => "dc-live-select", "tool-perspective" => "dc-perspective", "tool-perspective-select" => "dc-perspective", diff --git a/crates/ui-egui/src/menus/ui_commands.rs b/crates/ui-egui/src/menus/ui_commands.rs index 5b73f36ab6..2a8771f37c 100644 --- a/crates/ui-egui/src/menus/ui_commands.rs +++ b/crates/ui-egui/src/menus/ui_commands.rs @@ -980,7 +980,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ "tool.options", "Tool Options…", "", - "{tool: id} what double-clicking a tool button opens: hand → fits the artboard in the window (view.fitArtboard), zoom → 100% (view.actualSize), rotate|scale|reflect|shear → that Object › Transform dialog (dialog `rotate`, `scale`, `reflect` or `shear`; error `nothing selected` without a selection), selection|directSelection|groupSelection → the Move dialog (dialog `move`; the same error), gradient|magicWand → the Gradient or Magic Wand panel (window.panel), artboard → Artboard Options of the active artboard (dialog `artboardOptions`, fields index, name, x, y, width, height, showCenterMark, showCrossHairs; OK runs artboard.setProps, and with other artboards selected with the Artboard tool a new width or height goes to each of them too, in its `artboards` list, each resized about the reference point the form used for that size, or about its top-left corner when the size was set in the fields directly), flare → Flare Tool Options (dialog `flareOptions`, fields diameter and pathLength (pt), opacity, brightness, growth, fuzziness, longest, rayFuzziness, largest (%), rays, rings, direction (°), raysOn, ringsOn; OK runs tool.setOption {tool: \"flare\", values}: the next flare dragged out uses them, and a Flare click's dialog, which also has x, y and preview (on initially), previews one there and accepts it as one Undo step; Cancel rolls back the preview), lineSegment|arc|rectangularGrid|polarGrid → that tool's Tool Options, its click dialog without x and y (dialog kind = the tool id, `__toolOptions: true`; lineSegment: length (pt), angle (°), fillLine; arc: lengthX, lengthY (pt), reference (0–8), arcType: open|closed, baseAlong: x|y, slope (−100…100), fillArc; rectangularGrid: width, height (pt, the Default Size), reference (0–8), rows, columns, rowSkew, columnSkew (%), frame, fill; polarGrid: the same with concentric, radial, concentricSkew, radialSkew and compound for rows, columns, the skews and frame; OK runs tool.setOption {tool, values} and draws nothing: the next drag uses them (Fill Line, the arc's type, base, slope and fill, the grids' dividers, skews and switches) and a click's dialog opens at them), columnGraph|stackedColumnGraph|barGraph|stackedBarGraph|lineGraph|areaGraph|scatterGraph|pieGraph|radarGraph → Graph Type for the selected graph, or for the series picked in it with Group Selection (dialog `graphType`, fields the options graph.setType {} returns under their names, with legend, pieLegend, piePosition, pieSort, firstRowInFront, firstColumnInFront and filledLines held for every type; overrideValues and rightOverrideValues, Override Calculated Values of the left or only value axis and of the right one: while one is on OK sends axisMin, axisMax and ticks, or rightAxisMin, rightAxisMax and rightTicks, filled with the calculated values where the graph has none, and one turned off sends null, null and 0; __page: options|valueAxis|rightAxis|categoryAxis, the page shown, options when the type picked has no such page; OK runs graph.setType, and with nothing changed closes without a step of history; an overridden value axis whose maximum is not more than its minimum is an error and the dialog stays open; an error without a selected graph), typeOnPath|verticalTypeOnPath → Type on a Path Options for the selected type on a path (dialog `command` running type.pathOptions; error `nothing selected` without a selection, and the command's error when no type on a path is selected),symbolSprayer|symbolShifter|symbolScruncher|symbolSizer|symbolSpinner|symbolStainer|symbolScreener|symbolStyler → Symbolism Tools Options (dialog `symbolismOptions`, fields tool, diameter (pt), intensity and density (1–10), shared by the eight tools; OK runs tool.setOption {tool, values}), blend → Blend Options, perspectiveGrid → Perspective Grid Options, eyedropper → Eyedropper Options (dialog `eyedropperOptions`, fields sampleSize, pickUp, apply; OK runs eyedropper.setOptions), printTiling → resets the print tiling (print.tiling.set {reset: true}), warp|twirl|pucker|bloat|scallop|crystallize|wrinkle → that tool's Tool Options (dialog `liquifyOptions`, fields tool, width, height, angle, intensity %, usePressure, detail, simplify, simplifyOn, rate, complexity, horizontal %, vertical %, affectAnchors, affectIn, affectOut, showBrush; OK runs tool.setOption {tool, values}), pencil|paintbrush|smooth|blobBrush|eraser → that tool's Tool Options (dialog `freehandOptions`, fields tool and the options the tool keeps: fidelity (px for pencil, paintbrush and smooth, the same at any zoom; pt for blobBrush), fill, keepSelected (on for pencil and paintbrush, off for blobBrush), mergeOnlySelection (off), closeWithin and editWithin (px, 0 is off), livePreview (pencil, on: off draws a thin line while the stroke is drawn, and the path's fill and stroke on release), size (pt), angle (°, −180–180; 0) and roundness (%, 1–100; 100) of the eraser's tip; OK runs tool.setOption {tool, values}), livePaintSelection → Live Paint Selection Tool Options (dialog `livePaintSelectionOptions`, fields selectFills and selectStrokes (both on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the highlight's width, 1–20 px; 4); OK runs tool.setOption {tool: \"livePaintSelection\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), livePaintBucket → Live Paint Bucket Options (dialog `livePaintBucketOptions`, fields paintFills (on) and paintStrokes (off), cursorSwatchPreview (on: the active fill or stroke shows above the pointer between the color swatches before and after it; Left and Right without modifiers step it through the color swatches whether it is on or off), highlight (on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the face highlight's width, 1–20 px; 4; an edge's highlight is half as wide); OK runs tool.setOption {tool: \"livePaintBucket\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), shapeBuilder → Shape Builder Tool Options (dialog `shapeBuilderOptions`, fields gapDetection (off), gapLength (pt, 0–72; 3), openFilledAsClosed (on), clickStrokeSplitsPath (off), pickColorFrom: artwork|swatches (artwork), cursorSwatchPreview (off), selection: freeform|straightLine (freeform), highlightFill (on), highlightStroke (on), highlightColor (#rrggbb or a layer color's name; #ff4f4f); OK runs tool.setOption {tool: \"shapeBuilder\", values}; a highlightColor with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), objectsOnPath → Objects on Path Tool Options (dialog `objectsOnPathOptions`, fields pivot (0–8, row by row from the top left; 4, the center) and rotate (°, −360–360; 0); Reset puts 4 and 0 back; Save runs tool.setOption {tool: \"objectsOnPath\", values}: the objects attached next use them, groups attached before keep theirs)", + "{tool: id} what double-clicking a tool button opens: hand → fits the artboard in the window (view.fitArtboard), zoom → 100% (view.actualSize), rotate|scale|reflect|shear → that Object › Transform dialog (dialog `rotate`, `scale`, `reflect` or `shear`; error `nothing selected` without a selection), selection|directSelection|groupSelection → the Move dialog (dialog `move`; the same error), gradient|magicWand → the Gradient or Magic Wand panel (window.panel), artboard → Artboard Options of the active artboard (dialog `artboardOptions`, fields index, name, x, y, width, height, showCenterMark, showCrossHairs; OK runs artboard.setProps, and with other artboards selected with the Artboard tool a new width or height goes to each of them too, in its `artboards` list, each resized about the reference point the form used for that size, or about its top-left corner when the size was set in the fields directly), flare → Flare Tool Options (dialog `flareOptions`, fields diameter and pathLength (pt), opacity, brightness, growth, fuzziness, longest, rayFuzziness, largest (%), rays, rings, direction (°), raysOn, ringsOn; OK runs tool.setOption {tool: \"flare\", values}: the next flare dragged out uses them, and a Flare click's dialog, which also has x, y and preview (on initially), previews one there and accepts it as one Undo step; Cancel rolls back the preview), lineSegment|arc|rectangularGrid|polarGrid → that tool's Tool Options, its click dialog without x and y (dialog kind = the tool id, `__toolOptions: true`; lineSegment: length (pt), angle (°), fillLine; arc: lengthX, lengthY (pt), reference (0–8), arcType: open|closed, baseAlong: x|y, slope (−100…100), fillArc; rectangularGrid: width, height (pt, the Default Size), reference (0–8), rows, columns, rowSkew, columnSkew (%), frame, fill; polarGrid: the same with concentric, radial, concentricSkew, radialSkew and compound for rows, columns, the skews and frame; OK runs tool.setOption {tool, values} and draws nothing: the next drag uses them (Fill Line, the arc's type, base, slope and fill, the grids' dividers, skews and switches) and a click's dialog opens at them), columnGraph|stackedColumnGraph|barGraph|stackedBarGraph|lineGraph|areaGraph|scatterGraph|pieGraph|radarGraph → Graph Type for the selected graph, or for the series picked in it with Group Selection (dialog `graphType`, fields the options graph.setType {} returns under their names, with legend, pieLegend, piePosition, pieSort, firstRowInFront, firstColumnInFront and filledLines held for every type; overrideValues and rightOverrideValues, Override Calculated Values of the left or only value axis and of the right one: while one is on OK sends axisMin, axisMax and ticks, or rightAxisMin, rightAxisMax and rightTicks, filled with the calculated values where the graph has none, and one turned off sends null, null and 0; __page: options|valueAxis|rightAxis|categoryAxis, the page shown, options when the type picked has no such page; OK runs graph.setType, and with nothing changed closes without a step of history; an overridden value axis whose maximum is not more than its minimum is an error and the dialog stays open; an error without a selected graph), typeOnPath|verticalTypeOnPath → Type on a Path Options for the selected type on a path (dialog `command` running type.pathOptions; error `nothing selected` without a selection, and the command's error when no type on a path is selected),symbolSprayer|symbolShifter|symbolScruncher|symbolSizer|symbolSpinner|symbolStainer|symbolScreener|symbolStyler → Symbolism Tools Options (dialog `symbolismOptions`, fields tool, diameter (pt), intensity and density (1–10), shared by the eight tools; OK runs tool.setOption {tool, values}), blend → Blend Options, perspectiveGrid → Perspective Grid Options, eyedropper → Eyedropper Options (dialog `eyedropperOptions`, fields sampleSize, pickUp, apply; OK runs eyedropper.setOptions), printTiling → resets the print tiling (print.tiling.set {reset: true}), warp|twirl|pucker|bloat|scallop|crystallize|wrinkle → that tool's Tool Options (dialog `liquifyOptions`, fields tool, width, height, angle, intensity %, usePressure, detail, simplify, simplifyOn, rate, complexity, horizontal %, vertical %, affectAnchors, affectIn, affectOut, showBrush; OK runs tool.setOption {tool, values}), pencil|paintbrush|smooth|blobBrush|eraser → that tool's Tool Options (dialog `freehandOptions`, fields tool and the options the tool keeps: fidelity (px for pencil, paintbrush and smooth, the same at any zoom; pt for blobBrush), fill, keepSelected (on for pencil and paintbrush, off for blobBrush), mergeOnlySelection (off), closeWithin and editWithin (px, 0 is off), livePreview (pencil, on: off draws a thin line while the stroke is drawn, and the path's fill and stroke on release), size (pt), angle (°, −180–180; 0) and roundness (%, 1–100; 100) of the eraser's tip; OK runs tool.setOption {tool, values}), livePaintSelection → Live Paint Selection Tool Options (dialog `livePaintSelectionOptions`, fields selectFills and selectStrokes (both on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the highlight's width, 1–20 px; 4); OK runs tool.setOption {tool: \"livePaintSelection\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), livePaintBucket → Live Paint Bucket Options (dialog `livePaintBucketOptions`, fields paintFills (on) and paintStrokes (off), cursorSwatchPreview (on: the active fill or stroke shows above the pointer between the color swatches before and after it; Left and Right without modifiers step it through the color swatches whether it is on or off), highlight (on), color (the highlight color, #rrggbb or a layer color's name; #ff2a2a), width (the face highlight's width, 1–20 px; 4; an edge's highlight is half as wide); OK runs tool.setOption {tool: \"livePaintBucket\", values}; a color with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), shapeBuilder → Shape Builder Tool Options (dialog `shapeBuilderOptions`, fields gapDetection (off), gapLength (pt, 0–72; 3), openFilledAsClosed (on), clickStrokeSplitsPath (off), pickColorFrom: artwork|swatches (artwork), cursorSwatchPreview (off), selection: freeform|straightLine (freeform), highlightFill (on), highlightStroke (on), highlightColor (#rrggbb or a layer color's name; #ff4f4f); OK runs tool.setOption {tool: \"shapeBuilder\", values}; a highlightColor with an alpha part (#rrggbbaa or #rgba) is an error and OK changes nothing), fillArea → the same Shape Builder Tool Options (Fill Area uses their gapDetection, gapLength and openFilledAsClosed), objectsOnPath → Objects on Path Tool Options (dialog `objectsOnPathOptions`, fields pivot (0–8, row by row from the top left; 4, the center) and rotate (°, −360–360; 0); Reset puts 4 and 0 back; Save runs tool.setOption {tool: \"objectsOnPath\", values}: the objects attached next use them, groups attached before keep theirs)", ), ( "ui.colorGuideOptions", diff --git a/crates/ui-egui/src/toolbar.rs b/crates/ui-egui/src/toolbar.rs index c4da70d84f..ae8f74abc4 100644 --- a/crates/ui-egui/src/toolbar.rs +++ b/crates/ui-egui/src/toolbar.rs @@ -58,7 +58,7 @@ pub const BASIC: &[(&str, &[&[&str]])] = &[ &[ &["width", "warp", "twirl", "pucker", "bloat", "scallop", "crystallize", "wrinkle"], &["rotate", "reflect", "scale", "shear", "reshape", "freeTransform", "puppetWarp"], - &["shapeBuilder", "livePaintBucket", "livePaintSelection", "blend"], + &["shapeBuilder", "livePaintBucket", "fillArea", "livePaintSelection", "blend"], &["dimension"], ], ), @@ -454,7 +454,8 @@ pub fn open_options(app: &mut VectorcraftApp, tool: &str) -> Result Ok(crate::dialogs::shape_builder_options::open(app)), + // Fill Area uses the Shape Builder's Gap Detection and open-filled-path options. + "shapeBuilder" | "fillArea" => Ok(crate::dialogs::shape_builder_options::open(app)), // The Objects on Path tool: the Pivot and Rotate of the objects it attaches next. "objectsOnPath" => Ok(crate::dialogs::objects_on_path_options::open(app)), // The Line Segment, Arc and grid tools: their Tool Options, the options of their next diff --git a/docs/mcp.md b/docs/mcp.md index 7bbc2f4cb7..340479d26f 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -2024,7 +2024,7 @@ and `type.fractionalWidths`; `flip` in `type.dynamicTextPreset`; `remove` and `o `swatch.addUsedColors`; `visible` in `appearance.setItem`; `copy` in `appearance.transfer`; `reverse` and `append` in `appearance.copyFrom`; `reverse` and `stroke` in `paint.editGradient`; `stroke` in `paint.setGradientGeom` and in `paint.freeform.addPoint`, `setPoint`, `deletePoint`, `addLine`, `splitLine` and `get`; `erase`, -`openFilledAsClosed` and `splitStroke` in `shapeBuilder.merge`; `openFilledAsClosed` in `shapeBuilder.regions`; `closeGaps` in `livePaint.gapOptions`; and +`openFilledAsClosed` and `splitStroke` in `shapeBuilder.merge`; `openFilledAsClosed` in `shapeBuilder.regions` and `shapeBuilder.copyRegion`; `closeGaps` in `livePaint.gapOptions`; and `enhanced` in `imageTrace.make` and `imageTrace.makeAndExpand`. A null is read as a key left out. These commands refuse a string or another value that is not a number with `` `radius` must be a number, not "2" ``, @@ -2043,7 +2043,7 @@ and `fitMinPercent` in `text.areaOptions`; `x` and `y` in `symbol.place`; `radiu `symbol.spray`; `radius` and `intensity` in `symbol.adjust`; `to` in `swatch.move`; `weight` and `opacity` in `appearance.setItem`; `r`, `g`, `b`, `c`, `m`, `y`, `k`, `gray` and `tint` in `edit.colors.adjustBalance`; `steps` and `amount` in `color.harmony`; `angle` in `paint.editGradient` and in the `gradient` of a command that takes a paint; `t` in -`paint.freeform.splitLine`; `tolerance` and `gap` in `shapeBuilder.merge`; `gap` in `shapeBuilder.regions`; and +`paint.freeform.splitLine`; `tolerance` and `gap` in `shapeBuilder.merge`; `gap` in `shapeBuilder.regions` and `shapeBuilder.copyRegion`; and `width` and `tolerance` in `livePaint.strokeEdge`. A null is read as a key left out. A gradient stop that names a swatch refuses a `tint` that is not a number with `` stop 0: `tint` must be a number ``. @@ -11032,6 +11032,29 @@ a stroke when it has `rect`. With both `rect` and `points`, the command also tou {"name":"run_command","arguments":{"command":"shapeBuilder.merge","params":{"rect":[50,50,200,200]}}} ``` +The Fill Area tool (`fillArea`, in the Live Paint Bucket's group) adds a new closed path of the area under a click +and leaves the paths around it as they are. Nothing needs to be selected: the visible, unlocked paths on every layer +bound areas, filled or not, open paths included, and the overlap of two filled shapes is an area of its own. While the +pointer hovers an area, the tool outlines it in red and the pointer shows the bucket with paint; elsewhere the pointer +shows the empty bucket, and a click there does nothing. The new path appears on the press and is kept on the release; +Escape or a canceled touch before the release takes it back. In a document of more than 128 path segments the tool looks +for the hovered area on another thread, and the outline appears when that search is done. The tool sends `shapeBuilder.copyRegion` with `point`, the Shape Builder's gap +length (`gap`, 0 with Gap Detection off) and its `openFilledAsClosed`: the two tools share `gapDetection`, `gapLength` +and `openFilledAsClosed`, so `tool.setOption` on either one sets them for both, and `fillArea` has no other options. +Double-clicking the Fill Area tool opens the Shape Builder Tool Options (`tool.options {tool: "fillArea"}`, dialog +`shapeBuilderOptions`). +The new path takes the current fill, stroke and stroke weight (`fill` and `stroke` override the paints), goes directly +above the front-most object along the area (one whose outline touches the area's outline, or that covers it) and is +selected. When a group, Live Paint group, Shaper group or clipping group holds that object, the new path goes above the +outermost group in its layer, not inside it, and the group keeps its members. A point in no enclosed area is the error "Fill Area: no enclosed area under the pointer" and records no undo +step; a `gap` outside 0 to 72 is an error. It returns `{id, above}`. The command looks for the area among the paths +near the point first. When the paths together have more than 65,536 segments and the paths near the point do not +enclose it, the point counts as in no enclosed area. + +```json +{"name":"run_command","arguments":{"command":"shapeBuilder.copyRegion","params":{"point":[50,70],"gap":3}}} +``` + ## Perspective grid The grid is document data (`perspective.grid.set` edits the model directly). `perspective.grid.get` reads it: diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 21b0074bbd..a95061c53c 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1267,6 +1267,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur As VectorCraft's own rule, OK in Shape Builder Tool Options gives an error for a highlight Color with an alpha part (`#rrggbbaa` or `#rgba`) and changes nothing. Regression test: `dialogs::shape_builder_options::tests::a_highlight_color_with_an_alpha_part_is_refused`. With Pick Color From Artwork, a merged shape takes the appearance, opacity and blending mode of the object where the drag starts, else of the object where it ends, else of the front-most selected object, as the [Shape Builder combine page](https://web.archive.org/web/20251006211643/https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/draw-shapes/combine-shapes-with-shape-builder-tool.html) describes. A click in an area that no selected object covers, such as a hole other shapes enclose, takes the front-most selected object's look (`shapeBuilder.merge` `points`: the first point is where the drag starts, and the last point is where it ends). A Shift-drag with the Shape Builder tool draws a rectangular marquee for merging many paths at once, as [Combine shapes with the Shape Builder tool](https://web.archive.org/web/20251006211643/https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/draw-shapes/combine-shapes-with-shape-builder-tool.html) describes: the regions it reaches are shaded while it is drawn and merge into one shape on release, or with Alt they are deleted. The marquee reaches each region whose outline crosses it or has an anchor inside it, and the region that holds the whole marquee; this rule is VectorCraft's own. For Pick Color From Artwork, the marquee's starting corner is where the drag starts and the opposite corner is where it ends (`shapeBuilder.merge` `rect`). + As VectorCraft's own tool, Fill Area (in the Live Paint Bucket's group) adds a new closed path of the area under a click with the current fill and stroke, directly above the front-most object along it, and leaves the paths around it as they are. It needs no selection: the visible, unlocked paths on every layer bound areas, open paths and the overlap of filled shapes included, and it uses the Shape Builder's Gap Detection (`shapeBuilder.copyRegion`). Regression tests: `tests::fill_area::*`. Shape Builder pieces on dense hatches (lines at exact 0.25 or 0.5 pt steps across another line) come back one per stretch between crossings, with no speck where the sweep cut a line's two passes a rounding error apart: the planar map contracts the stub between such cuts into one vertex, bounded by each cluster's extent so a run of tiny level segments keeps its length (`crates/pathops/src/planar.rs` tests `a_dense_hatch_at_exact_binary_steps_cuts_each_line_once_per_crossing`, `a_run_of_tiny_level_segments_is_not_contracted_as_stubs`, `a_line_crossed_where_its_two_passes_part_is_cut_once`). The planar map's edge-source grid stays linear in memory on any input: a segment is filed once per cell it crosses, and the grid holds at most a budget of cell references (a few dozen per item plus a few rows' worth), past which the remaining items go to a short scanned list and are still found, so thousands of coincident segments cannot make the index quadratic (`crates/pathops/src/planar.rs` test `rect_index_holds_a_bounded_number_of_references`). The Blob Brush Tool Options have Keep selected and Merge only with selection, both off by default: while Keep selected is off, the blob a stroke draws or merges into is not selected afterwards, and while Merge only with selection is on, a stroke merges only with selected blobs of its color that it touches (`path.blob` `keepSelected` and `mergeOnlySelection`). From 6fed8b22f2b4a8047433e295348b4888e06d66be Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 15 Nov 2026 16:48:27 -0800 Subject: [PATCH 06/49] Docs: the M12 milestone row names the Fill Area tool --- docs/roadmap.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/roadmap.md b/docs/roadmap.md index da1645efb2..f869de1e01 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -168,7 +168,7 @@ Gujarati interface follow-up (2026-11-14): the catalog and zero/one plural rule | M9 | Live effects (+ 3D & Materials) | 🟡 2D effects done incl. Effect → Pathfinder, Color Adjustments and Document Raster Effects Settings; PDF export warns when the pixel cap lowers raster-effect resolution; Artistic › Colored Pencil, Cutout, Dry Brush, Film Grain, Fresco, Neon Glow, Paint Daubs, Palette Knife, Poster Edges, Rough Pastels, Smudge Stick, Sponge, Underpainting and Watercolor and Sketch › Halftone Pattern, Bas Relief, Charcoal, Conté Crayon, Photocopy, Stamp, Torn Edges and Water Paper done (57/57 Photoshop filters); Revolve with automatic smooth vector shading, default-on circular caps and continuous rims, Extrude & Bevel, Inflate and Rotate with one to ten colored directional lights and four original lighting presets; SVG Filters, remaining raster effects and 3D materials and shadows pending | 81–130 | | M10 | Brushes, symbols, patterns, Repeat | 🟡 pattern swatches (5 tile types, Pattern Options, editing mode, SVG ``/PDF export) and live Repeat (radial/grid/mirror) done; interactive selected mirror axis implemented (focused and native checks passed; full CI blocked by an unrelated text test); symbol libraries done (Window › Symbol Libraries, six generated libraries (Basic Shapes, UI Frames, Map Markers, Inventory Icons, Skill Icons, Weather Icons), User Defined, Other Library…, Save Symbols); brush libraries done (Window › Brush Libraries, ten generated libraries including Tech Circuit, Ink and Wash, Bristle Brushes and Dry Media, User Defined, Other Library…, Save Brushes); symbol editing shows draggable 9-slice guides (#5280), with guides outside the artwork still unsupported; brushes/symbols in progress | 23–37 | | M11 | Artboards & views (selected-set deletion shared by Artboards menu, trash and Properties, retaining artboard 1 when all are selected; Artboard deletion keys keep the first of an all-selected set and protect artwork; history prunes invalid indices while preserving valid multiselection (history tests and full workspace CI pass); click-to-fit objects with the Artboard tool (#1227), artboard escape routing and document setup modal handoff done; artboard panel/tool with Move Artwork for X/Y fields and Artboard Options, Trim View, middle-button pan, print tiling and the status bar's artboard navigator with synchronized Artboard tool selection done; Window › Arrange › Tile and Consolidate All Windows done; multiple windows, presentation polish) (cached canvas reprojection preserves scale during resize, rotation and DPI changes; regression-tested and contributor-confirmed 2026-10-19; estimates unchanged) (cached canvas dimensions match the renderer limit before cache-key creation, view construction and worker submission; regression-tested; estimates unchanged); status-bar pointer coordinates follow the active ruler origin and General units | 🟡; Artboard Options shares existing presets and orientation controls and can fit artwork without moving it; artwork fitting includes all drawn document art across artboards and off-board; artwork bounds are cached by active document and revision, and selection uses the shared bounds cache across artboards | 15–25 | -| M12 | Advanced color & art (CMYK/ICC, separations, Gradient Mesh, Live Paint, Image Trace, Graphs) | 🟡 Gradient Mesh, Live Paint, Image Trace (junction-returning pieces retain their positioned boundaries; a simpler contour walk with identical output; an edge's sub-pixel shift is the same from either side; notches read only their own piece; collapsed loops keep few segments; large images trace with a warning; Auto Color keeps rare distinct colours; quick presets trace at once and the Image Trace button opens the adjustment controls; Properties reopens them; tiny fitted contours retain islands and holes; Create Strokes: exact crop EDT, Guo–Hall thinning and maximal-disc graph simplification; 15 presets, the 14 documented ones each with an enhanced version; Ignore Color, Shapes, Auto Grouping and Gradients options; measured in `image-trace-quality.md`; closed outlines retain their interior after straightening; the Flat Logo mode places edges to a fraction of a pixel, restores sharp corners, snaps lines and circles, and refuses gradients; live trace result bounds and selection highlights exclude the retained bitmap except in source-image views), Recolor Artwork, colour management (ICC, soft proofing, separations preview), Graphs (all 9 tools, Graph Data/Type, group-selected series colours persist through regenerate/save/open) done; Graph Design and Marker designs, Transpose and Switch x/y, `\|` label line breaks, the pie options, drop shadows, the legend across the top, overlapping widths, First Row/Column in Front, filled lines, kept label formatting and the Graph Data worksheet done; graph Column designs pending; Vector Halftone Preview keeps the selection box without drawing dot selection marks (#6369); Live Paint Bucket fills faces crossed in one drag (#6373) | 6–10 | +| M12 | Advanced color & art (CMYK/ICC, separations, Gradient Mesh, Live Paint, Image Trace, Graphs) | 🟡 Gradient Mesh, Live Paint, Image Trace (junction-returning pieces retain their positioned boundaries; a simpler contour walk with identical output; an edge's sub-pixel shift is the same from either side; notches read only their own piece; collapsed loops keep few segments; large images trace with a warning; Auto Color keeps rare distinct colours; quick presets trace at once and the Image Trace button opens the adjustment controls; Properties reopens them; tiny fitted contours retain islands and holes; Create Strokes: exact crop EDT, Guo–Hall thinning and maximal-disc graph simplification; 15 presets, the 14 documented ones each with an enhanced version; Ignore Color, Shapes, Auto Grouping and Gradients options; measured in `image-trace-quality.md`; closed outlines retain their interior after straightening; the Flat Logo mode places edges to a fraction of a pixel, restores sharp corners, snaps lines and circles, and refuses gradients; live trace result bounds and selection highlights exclude the retained bitmap except in source-image views), Recolor Artwork, colour management (ICC, soft proofing, separations preview), Graphs (all 9 tools, Graph Data/Type, group-selected series colours persist through regenerate/save/open) done; Graph Design and Marker designs, Transpose and Switch x/y, `\|` label line breaks, the pie options, drop shadows, the legend across the top, overlapping widths, First Row/Column in Front, filled lines, kept label formatting and the Graph Data worksheet done; graph Column designs pending; Vector Halftone Preview keeps the selection box without drawing dot selection marks (#6369); Live Paint Bucket fills faces crossed in one drag (#6373); the Fill Area tool in the Live Paint Bucket group adds a path of the area a click encloses and keeps the paths around it | 6–10 | | M13 | Automation (Actions ✅ record/playback, persisted; variables, scripting, batch) | 🟡 MCP `add_text` exposes existing vertical point, area and path type; `script.run` and File › Scripts › Other Script… run JavaScript files, and Window › Script Console shows their output; the script document model and batch work remain | 18–27 | | M14 | 1.0 polish (preferences, shortcut editor, workspaces, accessibility, packaging for all OSes) (status messages and readouts use stable responsive allocations sized for localized labels and ordinary coordinates; sample widths cached by language/unit/DPI; regression-tested and contributor-confirmed 2026-10-19; estimates unchanged) | 🟡 Icon-strip flyouts resize on their free edges and retain sizes (#5713); interim macOS cursor delivery (#2292) uses existing artwork and host-owned AppKit cursors; headless coverage only, native menu/focus/handback and display validation pending. Dock groups collapse to their tabs by a double-click on a tab (UI.8); Preferences › General › Constrain Angle acts for the arrow keys, Shift drags and new objects (#394, 2026-10-21); numeric-field pointer selection and focus regression-tested (#1326; a release more than 1 pt from the press keeps the caret, a tap within 1 pt selects all, #6659); RPM runtime capabilities and glibc floor checked (#1275; real-distro install/start-up pending), Eyedropper cursor with precise-setting checks (#1269), Preferences, shortcut editor (chords with Shift and a punctuation key fire as typed; other apps' text shortcut sets imported), workspaces (each keeps its layout changes until Reset , UI.7), Window › Help Bar shown or hidden apart from the status bar and kept in saved workspaces, panels docked by dragging into any dock group (as tabs or a top/bottom split) or into the icon column, and closed from a dock tab's context menu (UI.6), a custom title bar on Windows/Linux with a Home button, content-sized dialogs, menus that scroll when longer than the window and macOS native menu dismissal done (M14.8), and native macOS save sheets with a Format menu (#866); titled PDF exports set `DisplayDocTitle` for viewers and accessibility checkers (#3646); accessibility and broader Windows/Linux packaging/QA pending; floating tab groups collapse into the side icon rail and opened rail panels fold back into it (#5925, in part), with pointer and native-window regression coverage; estimates unchanged; numeric spinner arrows keep repeating while held with the mouse (#6307); Swatches item context menus tested in all five views and rendered layouts inspected; Linux full CI passed, Windows engine baseline limitations documented (G12) | 18–28 | | — | Interaction fidelity pass (every tool's modifiers, Properties panel per context, isolation, nuance; width-point creation and adjoining adjustment regression-tested; dialog layout reviewed) | ⬜ (new ruler-guide Alt orientation implemented; existing-guide Escape cancellation regression-tested; broader pass remains) | 60–90 | From 30f852b62bb23e35bf7b7e6a37da60327943dcbf Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 15 Nov 2026 18:13:55 -0800 Subject: [PATCH 07/49] 3D: an Inflate frame places no handles when a fill's solid fails When a later fill of an Inflate object could not be built, or the solids together passed the face limit, the graphic frame kept the facets of the solids built before it and showed graphic handles, while the art drew its source path. The frame now places no handle in that case. A stroke left out past its limits still places none of its own. --- crates/effects/src/solids.rs | 10 ++++++---- crates/effects/src/solids/tests.rs | 27 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/crates/effects/src/solids.rs b/crates/effects/src/solids.rs index 07b10dfada..8ffcb1cef4 100644 --- a/crates/effects/src/solids.rs +++ b/crates/effects/src/solids.rs @@ -2412,11 +2412,13 @@ fn frame_of(doc: Option<&Document>, n: &Node, item: Option, pick: &Pick<' let (parts, bounds) = solid_parts(&shapes, b); if fx.id == INFLATE { // Inflate's graphics lie on its puffed front and back: the pieces the viewer sees place - // their handles. Solids that can't be built place none. + // their handles. A stroke left out places none of its own. When a fill's solid can't be + // built, or the solids together pass the limit, the art draws its source and no piece + // places a handle. let built: Vec = built_solids_cast(INFLATE, &p, &parts, bounds, MAX_OBJECT_FACES, false, true) - .filter_map(|r| r.ok().flatten()) - .flat_map(|(f, _)| f) - .collect(); + .collect::, String>>() + .map(|solids| solids.into_iter().flatten().flat_map(|(f, _)| f).collect()) + .unwrap_or_default(); return Some(graphics::GraphicFrame::inflated(bounds, graphics::MembraneFrame::of(&built))); } let options = extrude_options(&p); diff --git a/crates/effects/src/solids/tests.rs b/crates/effects/src/solids/tests.rs index 986e575689..d2ad2cb0cc 100644 --- a/crates/effects/src/solids/tests.rs +++ b/crates/effects/src/solids/tests.rs @@ -1206,6 +1206,33 @@ fn a_groups_solids_together_past_the_limit_draw_the_source() { assert_eq!(three_d_wireframe_in(None, &past), Err(vectorcraft_three_d::TOO_COMPLEX_SOLID.to_string())); } +/// An Inflate group whose second member's fill is past the limits draws its source art, and its +/// frame places no graphic handle on the first member's puff. +#[test] +fn an_inflate_frame_places_no_handle_when_a_fill_is_past_the_limits() { + let mut b = BezPath::new(); + b.move_to((0.0, 0.0)); + b.line_to((40_000.0, 0.0)); + b.line_to((40_000.0, 40_000.0)); + b.line_to((0.0, 40_000.0)); + b.close_path(); + let square = Node::path(NodeId(1), PathData::from_bezpath(&b), Appearance::basic(Paint::solid(RED), Paint::None, 0.0)); + let view = json!({"rotationX": 0.0, "rotationY": 0.0, "rotationZ": 0.0}); + let group = |members: Vec| { + let mut g = Node::group(NodeId(9999), members.into_iter().map(Arc::new).collect()); + g.appearance.effects.push(fx(INFLATE, view.clone())); + g + }; + let center = MappedGraphic::from_value(&json!({"symbol": "Mark"})).unwrap(); + // The square alone builds, and the graphic's handle sits on its puff. + let alone = group(vec![square.clone()]); + assert!(graphic_frame(None, &alone, None).unwrap().handle(¢er).is_some()); + // 70,000 corners: more points than a fill's solid takes. + let past = group(vec![square, polygon_node(2, 70_000)]); + assert!(solid_art(&past).is_none(), "the source art draws"); + assert!(graphic_frame(None, &past, None).unwrap().handle(¢er).is_none()); +} + /// A fill and strokes whose solids each fit, but not all of them together, draw the source art, /// and the strokes after the one past the limit are not left out to make room. #[test] From 63d02a2568bb2ab74b0f8d15ae3580c6f0a73186 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 15 Nov 2026 18:42:33 -0800 Subject: [PATCH 08/49] 3D: a drag over overlapping Inflate pieces maps through the nearer one Where two pieces of Inflate's puffed front or back overlap on the page, a handle drag picked the piece whose center was nearer, so a tilted piece hidden at the pointer could take the drag and move the graphic to the wrong offset. Each piece now keeps its plane, and the pointer maps through the piece that is nearest at that point. --- crates/effects/src/solids/graphics.rs | 29 ++++++++++++++------- crates/effects/src/solids/tests_graphics.rs | 24 +++++++++++++++++ 2 files changed, 44 insertions(+), 9 deletions(-) diff --git a/crates/effects/src/solids/graphics.rs b/crates/effects/src/solids/graphics.rs index 1d7e4e8d45..03ae75a927 100644 --- a/crates/effects/src/solids/graphics.rs +++ b/crates/effects/src/solids/graphics.rs @@ -28,7 +28,7 @@ use vectorcraft_doc::color::{BlendMode, Paint}; use vectorcraft_doc::{Appearance, AppearanceItem, Document, FillLayer, Node, NodeId, NodeKind, Symbol}; use vectorcraft_geom::kurbo::{CubicBez, ParamCurve, PathEl, Shape}; use vectorcraft_geom::{Affine, BezPath, FillRule, PathData, Point, Rect, SubPath, Vec2}; -use vectorcraft_three_d::{FaceMap, Facet, PlanarFace}; +use vectorcraft_three_d::{DepthPlane, FaceMap, Facet, PlanarFace}; /// The effect parameter that holds the graphics. pub const GRAPHICS: &str = "graphics"; @@ -1017,8 +1017,8 @@ pub struct GraphicFrame { /// The pieces of Inflate's front and puffed back that show their outside to the viewer, as the /// graphics are drawn on them ([`surface_parts`]): each piece's face, its corners in the art's plane -/// (offsets from the center of the object's bounds) and on the page, and its depth (larger is -/// nearer). +/// (offsets from the center of the object's bounds) and on the page, its depth (larger is nearer) +/// and its plane, for its depth at a point of the page. #[derive(Clone, Debug, Default, PartialEq)] pub struct MembraneFrame { pieces: Vec, @@ -1030,6 +1030,15 @@ struct MembranePiece { uv: [Point; 3], page: [Point; 3], depth: f64, + plane: Option, +} + +impl MembranePiece { + /// The piece's depth at page point `p`: its plane's depth there, or its own depth when it has + /// no plane or the plane gives none. + fn depth_at(&self, p: Point) -> f64 { + self.plane.and_then(|plane| plane.depth_at(p)).unwrap_or(self.depth) + } } impl MembraneFrame { @@ -1043,15 +1052,15 @@ impl MembraneFrame { let cell = f.surface.as_ref().filter(|c| c.outward)?; let uv = <[Point; 3]>::try_from(cell.uv.as_slice()).ok()?; let page = <[Point; 3]>::try_from(cell.page.as_slice()).ok()?; - Some(MembranePiece { face, uv, page, depth: f.depth }) + Some(MembranePiece { face, uv, page, depth: f.depth, plane: f.plane }) }) .collect(); Self { pieces } } /// Point `p` of `face` in the art's plane mapped onto the page, or with `from_page` a page point - /// mapped into the art's plane, through the nearest piece of that face that holds it. `None` - /// when no piece the viewer sees holds it. + /// mapped into the art's plane, through the piece of that face that holds it and is nearest at + /// that point of the page. `None` when no piece the viewer sees holds it. fn map(&self, face: PlanarFace, p: Point, from_page: bool) -> Option { let inside = |t: &[Point; 3], q: Point| { let side = |a: Point, b: Point| (b - a).cross(q - a); @@ -1061,11 +1070,13 @@ impl MembraneFrame { let mut best: Option<(Point, f64)> = None; for piece in self.pieces.iter().filter(|piece| piece.face == face) { let (from, to) = if from_page { (&piece.page, &piece.uv) } else { (&piece.uv, &piece.page) }; - if !inside(from, p) || best.is_some_and(|(_, depth)| depth >= piece.depth) { + if !inside(from, p) { continue; } - if let Some(q) = triangle_map(from, to).map(|m| m * p).filter(|q| q.is_finite()) { - best = Some((q, piece.depth)); + let Some(q) = triangle_map(from, to).map(|m| m * p).filter(|q| q.is_finite()) else { continue }; + let depth = piece.depth_at(if from_page { p } else { q }); + if best.is_none_or(|(_, nearest)| depth > nearest) { + best = Some((q, depth)); } } best.map(|(q, _)| q) diff --git a/crates/effects/src/solids/tests_graphics.rs b/crates/effects/src/solids/tests_graphics.rs index 45fbb1c489..2fe175a4aa 100644 --- a/crates/effects/src/solids/tests_graphics.rs +++ b/crates/effects/src/solids/tests_graphics.rs @@ -1032,3 +1032,27 @@ fn an_inflate_frame_puts_the_handle_on_the_puff_and_reads_it_back() { let (x, y) = frame.offset_at(PlanarFace::Back, page).unwrap(); assert!((x - 15.0).abs() < 1e-6 && (y - 5.0).abs() < 1e-6, "{x} {y}"); } + +/// Where two pieces of an Inflate face overlap on the page, a point maps through the piece nearer +/// at that point, though the other is nearer at its center. +#[test] +fn overlapping_inflate_pieces_map_a_point_through_the_one_nearer_there() { + let page = [Point::new(0.0, 0.0), Point::new(20.0, 0.0), Point::new(10.0, 20.0)]; + let piece = |shift: f64, depth: f64, normal: [f64; 3], offset: f64| MembranePiece { + face: PlanarFace::Front, + uv: page.map(|p| p + Vec2::new(shift, 0.0)), + page, + depth, + plane: Some(DepthPlane { normal, offset, center: Point::ORIGIN, eye: None }), + }; + // The tilted piece is nearer at its center (depth 10) but at depth 0 where x is 10; the flat + // one lies at depth 5 everywhere. + let tilted = piece(0.0, 10.0, [1.0, 0.0, 1.0], 10.0); + let flat = piece(100.0, 5.0, [0.0, 0.0, 1.0], 5.0); + let frame = GraphicFrame::inflated(Rect::new(0.0, 0.0, 20.0, 20.0), MembraneFrame { pieces: vec![tilted, flat] }); + let (x, y) = frame.offset_at(PlanarFace::Front, Point::new(10.0, 5.0)).unwrap(); + assert!((x - 110.0).abs() < 1e-6 && (y - 5.0).abs() < 1e-6, "{x} {y}"); + // Near the tilted piece's left corner it is the nearer one. + let (x, _) = frame.offset_at(PlanarFace::Front, Point::new(2.0, 0.5)).unwrap(); + assert!((x - 2.0).abs() < 1e-6, "{x}"); +} From f190b81896d5854451b81c4bddb441dcd29eaa97 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 15 Nov 2026 18:42:33 -0800 Subject: [PATCH 09/49] 3D: the Materials tab builds the graphics frame once per edit While the Materials tab was open, the artboard built the selected object's graphics frame on every frame it drew, which for Inflate means building its whole solid. The frame is now kept until the document changes, and an object without mapped graphics builds none. --- crates/ui-egui/src/panels/tests_three_d.rs | 31 ++++++++++++++++++++++ crates/ui-egui/src/panels/three_d.rs | 31 +++++++++++++++++++--- 2 files changed, 59 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/panels/tests_three_d.rs b/crates/ui-egui/src/panels/tests_three_d.rs index f06994c1dc..f3b860afed 100644 --- a/crates/ui-egui/src/panels/tests_three_d.rs +++ b/crates/ui-egui/src/panels/tests_three_d.rs @@ -624,6 +624,8 @@ fn a_graphics_handle_drags_it_over_its_face_in_one_undo_step() { let n = std::sync::Arc::make_mut(&mut st.doc).node_mut(id).unwrap(); n.appearance.effects[0].visible = false; n.appearance.effects.push(vectorcraft_effects::new_effect("threeD.extrude", &json!({})).unwrap()); + // An edit moves the revision, as a command's does. + st.revision += 1; } let mut shown = true; ctx.run_ui(egui::RawInput::default(), |ui| { @@ -639,6 +641,35 @@ fn a_graphics_handle_drags_it_over_its_face_in_one_undo_step() { assert!(!frame(&mut app, vec![button(target, true)])); } +/// The frame the graphics' handles are placed on is built once for each revision of the document, +/// and not at all for an object without graphics. +#[test] +fn the_graphics_frame_is_built_once_for_each_revision() { + type Cached = (super::FrameKey, Option>); + let (mut app, ctx) = materials_app(); + let cached = |ctx: &egui::Context| ctx.data(|m| m.get_temp::(super::frame_cache_id())).and_then(|(_, frame)| frame); + let handles = |app: &VectorcraftApp| { + let mut shown = false; + ctx.run_ui(egui::RawInput::default(), |ui| { + crate::panels::set_pstate(ui.ctx(), super::DRAWN, Some(super::root_pass(ui.ctx()))); + shown = super::graphic_handles(app, ui.ctx()).is_some(); + }) + .textures_delta + .clear(); + shown + }; + assert!(!handles(&app)); + assert!(cached(&ctx).is_none(), "no graphics, no frame"); + app.run("threeD.mapGraphic", json!({"symbol": "Graphic"})).unwrap(); + assert!(handles(&app)); + let first = cached(&ctx).unwrap(); + assert!(handles(&app)); + assert!(std::sync::Arc::ptr_eq(&first, &cached(&ctx).unwrap()), "the same revision reuses the frame"); + app.run("threeD.mapGraphic", json!({"symbol": "Graphic"})).unwrap(); + assert!(handles(&app)); + assert!(!std::sync::Arc::ptr_eq(&first, &cached(&ctx).unwrap()), "an edit builds it again"); +} + /// One frame of the artboard's graphic handles over an 800 × 600 canvas with `events`: whether the /// handles took the pointer. fn handles_frame(app: &mut VectorcraftApp, ctx: &egui::Context, events: Vec) -> bool { diff --git a/crates/ui-egui/src/panels/three_d.rs b/crates/ui-egui/src/panels/three_d.rs index be7731daf5..db47e73ac4 100644 --- a/crates/ui-egui/src/panels/three_d.rs +++ b/crates/ui-egui/src/panels/three_d.rs @@ -8,6 +8,8 @@ //! adds the selected objects that have a 3D effect to Asset Export as 3D assets (`assets.add3D`) //! and shows that panel with their assets selected. +use std::sync::Arc; + use egui::Ui; use serde_json::{Map, Value, json}; use vectorcraft_doc::{Effect, Node, NodeId, NodeKind}; @@ -392,7 +394,7 @@ fn materials_open(ctx: &egui::Context) -> bool { /// What [`graphic_handles`] gives: the object's frame, its graphics, and each seen graphic's index /// and page point. -type Handles = (vectorcraft_effects::GraphicFrame, Vec, Vec<(usize, vectorcraft_geom::Point)>); +type Handles = (Arc, Vec, Vec<(usize, vectorcraft_geom::Point)>); /// The handles of the graphics mapped onto the first selected object, while the Materials tab is /// open: each graphic's index, its face and where its center lands on the page, for the graphics @@ -410,8 +412,6 @@ fn graphic_handles(app: &VectorcraftApp, ctx: &egui::Context) -> Option if t.item.is_some_and(|k| n.appearance.items.get(k).is_none_or(|it| !it.visible())) { return None; } - // The frame of the effect whose graphics are listed: none while that effect is hidden. - let frame = vectorcraft_effects::graphic_frame_at(Some(&st.doc), n, t.item, t.index)?; // A geometry effect after the 3D effect of any selected object moves or bends its drawn // graphics away from their places in the frame: no handles, so a drag does not put a graphic // away from the pointer. @@ -420,15 +420,40 @@ fn graphic_handles(app: &VectorcraftApp, ctx: &egui::Context) -> Option return None; } let list = vectorcraft_effects::mapped_graphics(&vectorcraft_effects::merged_params(&t.effect, &t.params)); + // Without graphics there are no handles, and no frame is built. + if list.is_empty() { + return None; + } // Selected objects with different graphics show no handles: a drag sends the whole list. let graphics_of = |t: Target| vectorcraft_effects::mapped_graphics(&vectorcraft_effects::merged_params(&t.effect, &t.params)); if st.selection.objects.iter().skip(1).filter_map(|id| find(st.doc.node(*id)?)).any(|o| graphics_of(o) != list) { return None; } + // The frame of the effect whose graphics are listed: none while that effect is hidden. It is + // built once for each revision of the document, not on every frame the panel draws. + let key: FrameKey = (st.uid, st.revision, n.id.0, t.item, t.index); + let cached = ctx.data(|m| m.get_temp::<(FrameKey, Option>)>(frame_cache_id())); + let frame = match cached { + Some((k, frame)) if k == key => frame, + _ => { + let frame = vectorcraft_effects::graphic_frame_at(Some(&st.doc), n, t.item, t.index).map(Arc::new); + ctx.data_mut(|m| m.insert_temp(frame_cache_id(), (key, frame.clone()))); + frame + } + }?; let handles = list.iter().enumerate().filter_map(|(i, g)| frame.handle(g).filter(|(_, seen)| *seen).map(|(p, _)| (i, p))).collect(); Some((frame, list, handles)) } +/// What the cached frame of [`graphic_handles`] was built for: the document's uid and revision, the +/// object's id, and the fill or stroke and index of its 3D effect. +type FrameKey = (u64, u64, u64, Option, usize); + +/// Temp-memory key of the frame [`graphic_handles`] last built. +fn frame_cache_id() -> egui::Id { + egui::Id::unique("three-d-graphic-frame") +} + /// Temp-memory key of a drag of a graphic's handle on the artboard. fn handle_drag_id() -> egui::Id { egui::Id::unique("three-d-graphic-handle-drag") From 48a708dc0ffa56018396a054898806d5e62f776b Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 15 Nov 2026 18:53:09 -0800 Subject: [PATCH 10/49] 3D: Inflate faces that carry graphics keep their colored-light underlay Under colored lights with smooth shading, a face of Inflate's front or back that carries part of a mapped graphic is drawn as a group of the face and those parts. The underlay that closes the seams between faces did not take such a group, so the whole run was drawn without it and hairline gaps could show between triangles. Such a face now takes its facet's underlay and stays in the order with its parts. --- crates/effects/src/lighting.rs | 13 +++++++++++-- crates/effects/src/solids/tests.rs | 24 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/crates/effects/src/lighting.rs b/crates/effects/src/lighting.rs index e62e34b55e..7f7f1099e3 100644 --- a/crates/effects/src/lighting.rs +++ b/crates/effects/src/lighting.rs @@ -173,11 +173,20 @@ pub(crate) fn footprint(path: &vectorcraft_geom::BezPath, seam: f64) -> vectorcr /// footprints. Where two facets' antialiased edges meet, the underlay fills what they leave /// uncovered with the neighbors' own colors, so the background does not show through. `None` unless /// every face is a facet a surface draws: a path filled and stroked by its seam, or a facet composed -/// in a clip of its footprint, neither with an opacity mask. +/// in a clip of its footprint, neither with an opacity mask. A face drawn with the parts of Inflate's +/// graphics on it, a group of the facet and those parts, takes its facet's underlay and stays in the +/// order with its parts, which are cut to the facet's outline, so the clip keeps them. pub(crate) fn sealed(id: vectorcraft_doc::NodeId, faces: &[std::sync::Arc]) -> Option { use std::sync::Arc; use vectorcraft_doc::{Node, NodeKind}; - let (clip, mut underlay) = underlay(id, faces)?; + let facets: Vec> = faces + .iter() + .map(|face| match &face.kind { + NodeKind::Group { children, clip: false } if face.extras().mask.is_none() => children.first().cloned(), + _ => Some(face.clone()), + }) + .collect::>()?; + let (clip, mut underlay) = underlay(id, &facets)?; underlay.extend(faces.iter().cloned()); Some(Node::new(id, NodeKind::Group { children: vec![Arc::new(clip), Arc::new(Node::group(id, underlay))], clip: true })) } diff --git a/crates/effects/src/solids/tests.rs b/crates/effects/src/solids/tests.rs index d2ad2cb0cc..c4a33a76a2 100644 --- a/crates/effects/src/solids/tests.rs +++ b/crates/effects/src/solids/tests.rs @@ -587,6 +587,30 @@ fn drawn_face_bounds(f: &Node) -> Rect { } } +/// Under a colored light, an Inflate in a solid color with a graphic on its front lies over an +/// underlay of its faces, the faces that carry parts of the graphic included. +#[test] +fn a_colored_inflate_with_a_graphic_lies_over_an_underlay_of_its_faces() { + let mut d = Document::new(1000.0, 1000.0); + let mark = Node::path( + NodeId(0), + vectorcraft_geom::shapes::rectangle(Rect::new(500.0, 500.0, 510.0, 510.0)), + Appearance::basic(Paint::solid(BLUE), Paint::None, 0.0), + ); + d.symbols.push(vectorcraft_doc::Symbol { dynamic: false, name: "Mark".into(), art: Arc::new(mark) }); + let square = vectorcraft_geom::shapes::rectangle(Rect::new(0.0, 0.0, 100.0, 100.0)); + let mut n = Node::path(NodeId(7), square, Appearance::basic(Paint::solid(RED), Paint::None, 0.0)); + let p = json!({"rotationX": -20, "rotationY": -30, "rotationZ": 0, "lights": [{"color": "#ff8080"}], "graphics": [{"symbol": "Mark", "scale": 300.0}]}); + n.appearance.effects.push(fx(INFLATE, p)); + let art = solid_art_in(Some(&d), &n).unwrap(); + let order = art.children().unwrap()[0].children().unwrap(); + let faces: Vec> = order.iter().flat_map(unsealed).collect(); + assert!(faces.len() > order.len(), "the faces lie over an underlay"); + let carrying = faces.iter().filter(|f| matches!(f.kind, NodeKind::Group { clip: false, .. })).count(); + assert!(carrying > 0, "faces carry parts of the graphic"); + assert!(order.iter().all(|run| !Arc::ptr_eq(&unsealed(run)[0], run)), "every face is in a sealed run"); +} + /// Under a light that is not white, a solid-color fill and a solid-color stroke, plain, dashed or /// with a width profile, draw their faces in one order, the faces of both solids in the order of /// their depths where they overlap, in Inflate and in Extrude & Bevel, with and without perspective From 5d262e2f6eb71907c9bc9548488669fc437896a9 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 15 Nov 2026 23:34:23 -0800 Subject: [PATCH 11/49] i18n: French catalog row the merge of main split The merge of main joined the source and translation of the "graphics are too complex for this surface" message without a tab, so bundled_catalogs_are_consistent rejected fr.tsv. The row now matches main's. The merge also kept the old "Plane, Extrude and Revolve" message row, whose source string the branch replaced; it has been removed. --- crates/ui-egui/src/i18n/fr.tsv | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 3069219a0f..b70ee1c079 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -5815,10 +5815,9 @@ lighting Light Lumière @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} {key} de `{GRAPHICS}` doit être un nombre de {lo} à {hi} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` doit être un tableau @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Les graphiques s’appliquent aux types d’objet Plan, Extrusion, Révolution et Gonfler -@msg Graphics map onto the Plane, Extrude and Revolve object types Les graphiques s’appliquent aux types d’objet Plan, Extrusion et Révolution @msg Revolve maps graphics onto its side: map them onto the front Révolution applique les graphiques sur sa face latérale : appliquez-les sur la face avant @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on objet {_1} : l’arrière de Gonfler n’accepte des graphiques qu’avec Deux côtés et Fermeture activés -@msg The graphics are too complex for this surface: simplify the symbols' art or reduce SegmentsLes graphiques sont trop complexes pour cette surface : simplifiez l’illustration des symboles ou réduisez Segments +@msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Les graphiques sont trop complexes pour cette surface : simplifiez l’illustration des symboles ou réduisez Segments @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` accepte au plus {MAX_GRAPHICS} graphiques @msg A plane has one face: map its graphics onto the front Un plan n’a qu’une face : appliquez ses graphiques sur la face avant @msg The graphics are too complex: simplify the symbols' art Les graphiques sont trop complexes : simplifiez l’illustration des symboles From f4d7260c620306380f7c310bb4a4029d0f5eef5e Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 15 Nov 2026 23:41:52 -0800 Subject: [PATCH 12/49] i18n: no-break space before the colon in the French Inflate back refusal french_catalog_uses_nonbreaking_prose_punctuation requires a no-break space before a colon in French prose. The row for the Inflate back refusal had an ordinary space. --- crates/ui-egui/src/i18n/fr.tsv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index b70ee1c079..3e7a7ad55a 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -5816,7 +5816,7 @@ lighting Light Lumière @msg `{GRAPHICS}` must be an array `{GRAPHICS}` doit être un tableau @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Les graphiques s’appliquent aux types d’objet Plan, Extrusion, Révolution et Gonfler @msg Revolve maps graphics onto its side: map them onto the front Révolution applique les graphiques sur sa face latérale : appliquez-les sur la face avant -@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on objet {_1} : l’arrière de Gonfler n’accepte des graphiques qu’avec Deux côtés et Fermeture activés +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on objet {_1} : l’arrière de Gonfler n’accepte des graphiques qu’avec Deux côtés et Fermeture activés @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Les graphiques sont trop complexes pour cette surface : simplifiez l’illustration des symboles ou réduisez Segments @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` accepte au plus {MAX_GRAPHICS} graphiques @msg A plane has one face: map its graphics onto the front Un plan n’a qu’une face : appliquez ses graphiques sur la face avant From f2376b05f7a095c25479c11ed6553e224f0ae2a8 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 16 Nov 2026 00:13:32 -0800 Subject: [PATCH 13/49] 3D: Inflate graphics keep membrane corners on an ear's new edge With corners kept along a cell's edges, ear clipping could still take an ear whose new edge ran through kept corners, leaving them off every triangle and the triangles beside them flat. Such an ear is now passed over. docs/three-d.md now says that a membrane cell that cannot be cut into triangles makes the object draw without its graphics, and commands refuse them. --- crates/three-d/src/mesh.rs | 5 +++++ crates/three-d/src/mesh/tests.rs | 14 ++++++++++++++ docs/three-d.md | 3 ++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/crates/three-d/src/mesh.rs b/crates/three-d/src/mesh.rs index d0ce362f1e..fbc5546d18 100644 --- a/crates/three-d/src/mesh.rs +++ b/crates/three-d/src/mesh.rs @@ -408,6 +408,11 @@ fn clip(ring: &[Corner], out: &mut Vec<[V3; 3]>, work: &mut usize, keep_straight ear = false; break; } + // A kept corner on the ear's new edge would be left off every triangle. + if keep_straight && touches((p.x, p.y), (pc.x, pc.y), (pa.x, pa.y)) { + ear = false; + break; + } k = next[k]; } } diff --git a/crates/three-d/src/mesh/tests.rs b/crates/three-d/src/mesh/tests.rs index a4db1d77fb..9980e900d1 100644 --- a/crates/three-d/src/mesh/tests.rs +++ b/crates/three-d/src/mesh/tests.rs @@ -191,6 +191,20 @@ fn flat_triangles_keep_corners_that_lie_along_an_edge() { assert!(work > 0); } +#[test] +fn flat_triangles_keep_corners_on_the_edge_an_ear_would_cut() { + // The first ear's new edge runs along the bottom, through its two middle corners. + let p = |x: f64, y: f64| Point::new(x, y); + let outline = vec![p(0.0, 3.0), p(0.0, 0.0), p(1.0, 0.0), p(2.0, 0.0), p(3.0, 0.0)]; + let mut work = 0; + let triangles = flat_triangles(std::slice::from_ref(&outline), &mut work, usize::MAX).unwrap(); + let area = |t: &[Point; 3]| ((t[1].x - t[0].x) * (t[2].y - t[0].y) - (t[1].y - t[0].y) * (t[2].x - t[0].x)) / 2.0; + assert!((triangles.iter().map(area).sum::() - 4.5).abs() < 1e-9); + for q in &outline { + assert!(triangles.iter().any(|t| t.contains(q)), "{q:?} is no triangle's corner"); + } +} + #[test] fn flat_triangles_stop_at_their_budget() { let p = |x: f64, y: f64| Point::new(x, y); diff --git a/docs/three-d.md b/docs/three-d.md index 45531ad4df..d01b6ab6de 100644 --- a/docs/three-d.md +++ b/docs/three-d.md @@ -508,7 +508,8 @@ These rules are VectorCraft's own: not drawn); it reads the right way round from behind, and Twist and Taper turn and shrink its graphics with it. The membrane is cut into triangles, and each one draws the part of the graphic that falls on it, shaded as that triangle is shaded and drawn only where the surface's outside faces the viewer; nearer triangles drawn - after it cover it. A cell of the membrane that cannot be cut into triangles takes no graphic. Every solid of + after it cover it. When a cell of the membrane cannot be cut into triangles, the object draws without its + graphics and commands refuse them, as when the triangles take more faces than a 3D effect draws. Every solid of the object (a fill's, and a stroke's outline) carries the graphics. The handle sits on the point of the puffed face above the graphic's center, and only where the viewer sees that face. The cutting into straight pieces, the seam strokes and the limits below are those of Revolve; when the triangles take more faces than a 3D From 8f47eaa23f53f3fcbe8d697ae6945d6cd8286af3 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 16 Nov 2026 00:20:01 -0800 Subject: [PATCH 14/49] 3D: no Inflate graphic handle where a nearer facet covers it A graphic's handle on Inflate's front or back was placed through the nearest piece of its own face only, so a nearer piece of the other face, a side or a back cap could hide a handle that still showed and could be dragged. The handle and the offset read from the page are now left out where a facet drawn over that point of the page covers it: one clearly nearer there, or one drawn last (a cap turned toward the viewer), unless the piece is itself drawn last after it. --- crates/effects/src/solids/graphics.rs | 87 +++++++++++++++++---- crates/effects/src/solids/tests_graphics.rs | 53 ++++++++++++- 2 files changed, 123 insertions(+), 17 deletions(-) diff --git a/crates/effects/src/solids/graphics.rs b/crates/effects/src/solids/graphics.rs index 03ae75a927..2ef74b1b10 100644 --- a/crates/effects/src/solids/graphics.rs +++ b/crates/effects/src/solids/graphics.rs @@ -1018,10 +1018,41 @@ pub struct GraphicFrame { /// The pieces of Inflate's front and puffed back that show their outside to the viewer, as the /// graphics are drawn on them ([`surface_parts`]): each piece's face, its corners in the art's plane /// (offsets from the center of the object's bounds) and on the page, its depth (larger is nearer) -/// and its plane, for its depth at a point of the page. +/// and its plane, for its depth at a point of the page. The other facets the viewer sees (the +/// sides, and pieces that show the surface's inside) are kept as `covers`, for where they hide +/// a piece. #[derive(Clone, Debug, Default, PartialEq)] pub struct MembraneFrame { pieces: Vec, + covers: Vec, +} + +/// A facet that can hide a piece of Inflate's front or back: its contours on the page (nonzero +/// winding), its depth, its plane and its place among the solid's facets. +#[derive(Clone, Debug, PartialEq)] +struct Cover { + contours: Vec>, + depth: f64, + plane: Option, + index: usize, +} + +impl Cover { + /// Does the facet hold page point `p`? + fn holds(&self, p: Point) -> bool { + let mut winding = 0i32; + for c in &self.contours { + for (a, b) in c.iter().zip(c.iter().cycle().skip(1)).take(c.len()) { + let side = (*b - *a).cross(p - *a); + if a.y <= p.y && b.y > p.y && side > 0.0 { + winding += 1; + } else if a.y > p.y && b.y <= p.y && side < 0.0 { + winding -= 1; + } + } + } + winding != 0 + } } #[derive(Clone, Debug, PartialEq)] @@ -1031,6 +1062,9 @@ struct MembranePiece { page: [Point; 3], depth: f64, plane: Option, + /// The piece's place among the solid's facets: of two facets drawn last, the later one is drawn + /// over the other. + index: usize, } impl MembranePiece { @@ -1043,31 +1077,35 @@ impl MembranePiece { impl MembraneFrame { /// The pieces of `facets` that carry where they lie in the art's plane and show the outside of - /// Inflate's front or back. + /// Inflate's front or back, and the other facets not turned away from the viewer as covers. pub(super) fn of<'a>(facets: impl IntoIterator) -> Self { - let pieces = facets - .into_iter() - .filter_map(|f| { - let face = f.membrane?; - let cell = f.surface.as_ref().filter(|c| c.outward)?; + let (mut pieces, mut covers) = (Vec::new(), Vec::new()); + for (index, f) in facets.into_iter().enumerate() { + let piece = f.membrane.zip(f.surface.as_ref().filter(|c| c.outward)).and_then(|(face, cell)| { let uv = <[Point; 3]>::try_from(cell.uv.as_slice()).ok()?; let page = <[Point; 3]>::try_from(cell.page.as_slice()).ok()?; - Some(MembranePiece { face, uv, page, depth: f.depth, plane: f.plane }) - }) - .collect(); - Self { pieces } + Some(MembranePiece { face, uv, page, depth: f.depth, plane: f.plane, index }) + }); + match piece { + Some(piece) => pieces.push(piece), + None if !f.away => covers.push(Cover { contours: f.contours.clone(), depth: f.depth, plane: f.plane, index }), + None => {} + } + } + Self { pieces, covers } } /// Point `p` of `face` in the art's plane mapped onto the page, or with `from_page` a page point /// mapped into the art's plane, through the piece of that face that holds it and is nearest at - /// that point of the page. `None` when no piece the viewer sees holds it. + /// that point of the page. `None` when no piece the viewer sees holds it, or when a nearer piece + /// of the other face or a nearer cover hides that point of the page. fn map(&self, face: PlanarFace, p: Point, from_page: bool) -> Option { let inside = |t: &[Point; 3], q: Point| { let side = |a: Point, b: Point| (b - a).cross(q - a); let s = [side(t[0], t[1]), side(t[1], t[2]), side(t[2], t[0])]; s.iter().all(|v| *v >= -1e-9) || s.iter().all(|v| *v <= 1e-9) }; - let mut best: Option<(Point, f64)> = None; + let mut best: Option<(Point, f64, &MembranePiece)> = None; for piece in self.pieces.iter().filter(|piece| piece.face == face) { let (from, to) = if from_page { (&piece.page, &piece.uv) } else { (&piece.uv, &piece.page) }; if !inside(from, p) { @@ -1075,11 +1113,28 @@ impl MembraneFrame { } let Some(q) = triangle_map(from, to).map(|m| m * p).filter(|q| q.is_finite()) else { continue }; let depth = piece.depth_at(if from_page { p } else { q }); - if best.is_none_or(|(_, nearest)| depth > nearest) { - best = Some((q, depth)); + if best.is_none_or(|(_, nearest, _)| depth > nearest) { + best = Some((q, depth, piece)); } } - best.map(|(q, _)| q) + let (q, depth, shown) = best?; + let at = if from_page { p } else { q }; + // A facet drawn last (depth `f64::MAX`) is drawn over every other one, and over another + // drawn last before it. Otherwise, where the front, the back and the sides meet, they give + // the same depth there, and only a facet clearly nearer covers. + let hides = |raw: f64, there: f64, index: usize| match (raw == f64::MAX, shown.depth == f64::MAX) { + (true, true) => index > shown.index, + (true, false) => true, + (false, true) => false, + (false, false) => there > depth + 1e-6 * depth.abs().max(1.0), + }; + let covered = self + .pieces + .iter() + .filter(|piece| piece.face != face) + .any(|piece| inside(&piece.page, at) && hides(piece.depth, piece.depth_at(at), piece.index)) + || self.covers.iter().any(|c| c.holds(at) && hides(c.depth, c.plane.and_then(|plane| plane.depth_at(at)).unwrap_or(c.depth), c.index)); + (!covered).then_some(q) } } diff --git a/crates/effects/src/solids/tests_graphics.rs b/crates/effects/src/solids/tests_graphics.rs index 2fe175a4aa..1873156469 100644 --- a/crates/effects/src/solids/tests_graphics.rs +++ b/crates/effects/src/solids/tests_graphics.rs @@ -1044,15 +1044,66 @@ fn overlapping_inflate_pieces_map_a_point_through_the_one_nearer_there() { page, depth, plane: Some(DepthPlane { normal, offset, center: Point::ORIGIN, eye: None }), + index: 0, }; // The tilted piece is nearer at its center (depth 10) but at depth 0 where x is 10; the flat // one lies at depth 5 everywhere. let tilted = piece(0.0, 10.0, [1.0, 0.0, 1.0], 10.0); let flat = piece(100.0, 5.0, [0.0, 0.0, 1.0], 5.0); - let frame = GraphicFrame::inflated(Rect::new(0.0, 0.0, 20.0, 20.0), MembraneFrame { pieces: vec![tilted, flat] }); + let frame = GraphicFrame::inflated(Rect::new(0.0, 0.0, 20.0, 20.0), MembraneFrame { pieces: vec![tilted, flat], covers: vec![] }); let (x, y) = frame.offset_at(PlanarFace::Front, Point::new(10.0, 5.0)).unwrap(); assert!((x - 110.0).abs() < 1e-6 && (y - 5.0).abs() < 1e-6, "{x} {y}"); // Near the tilted piece's left corner it is the nearer one. let (x, _) = frame.offset_at(PlanarFace::Front, Point::new(2.0, 0.5)).unwrap(); assert!((x - 2.0).abs() < 1e-6, "{x}"); } + +/// A graphic on Inflate's back has no handle where a nearer piece of the front covers its center +/// on the page, and the back has no offset there; where the back is nearer, it has both. +#[test] +fn an_inflate_back_graphic_covered_by_a_nearer_front_piece_has_no_handle() { + let page = [Point::new(0.0, 0.0), Point::new(20.0, 0.0), Point::new(10.0, 20.0)]; + let piece = |face: PlanarFace, depth: f64| MembranePiece { face, uv: page, page, depth, plane: None, index: 0 }; + let frame = |front: f64, back: f64| { + let pieces = vec![piece(PlanarFace::Front, front), piece(PlanarFace::Back, back)]; + GraphicFrame::inflated(Rect::new(0.0, 0.0, 20.0, 20.0), MembraneFrame { pieces, covers: vec![] }) + }; + let g = MappedGraphic::from_value(&json!({"symbol": "Mark", "face": "back", "x": -10.0, "y": 5.0})).unwrap(); + let covered = frame(10.0, 5.0); + assert!(covered.handle(&g).is_none()); + assert!(covered.offset_at(PlanarFace::Back, Point::new(10.0, 5.0)).is_none()); + assert!(covered.offset_at(PlanarFace::Front, Point::new(10.0, 5.0)).is_some()); + let seen = frame(5.0, 10.0); + let (at, _) = seen.handle(&g).unwrap(); + assert!((at.x - 10.0).abs() < 1e-6 && (at.y - 5.0).abs() < 1e-6, "{at:?}"); + assert!(seen.offset_at(PlanarFace::Back, Point::new(10.0, 5.0)).is_some()); +} + +/// A nearer side facet that covers a graphic's center on Inflate's front hides its handle; one +/// behind the front, or beside the center, leaves it. A facet drawn last (a back cap) hides it +/// whatever its plane's depth, unless the front piece is drawn last too, after it. +#[test] +fn an_inflate_graphic_covered_by_a_nearer_side_has_no_handle() { + let page = [Point::new(0.0, 0.0), Point::new(20.0, 0.0), Point::new(10.0, 20.0)]; + let front = |depth: f64, index: usize| MembranePiece { face: PlanarFace::Front, uv: page, page, depth, plane: None, index }; + let side = |x0: f64, depth: f64, index: usize| Cover { + contours: vec![vec![Point::new(x0, 0.0), Point::new(x0 + 4.0, 0.0), Point::new(x0 + 4.0, 20.0), Point::new(x0, 20.0)]], + depth, + // A plane behind the front, as a back cap's is. + plane: Some(DepthPlane { normal: [0.0, 0.0, 1.0], offset: 1.0, center: Point::ORIGIN, eye: None }), + index, + }; + let frame = |piece: MembranePiece, cover: Cover| { + GraphicFrame::inflated(Rect::new(0.0, 0.0, 20.0, 20.0), MembraneFrame { pieces: vec![piece], covers: vec![cover] }) + }; + let g = MappedGraphic::from_value(&json!({"symbol": "Mark", "face": "front", "x": 10.0, "y": 5.0})).unwrap(); + let mut nearer = side(8.0, 10.0, 1); + nearer.plane = None; + assert!(frame(front(5.0, 0), nearer.clone()).handle(&g).is_none()); + assert!(frame(front(5.0, 0), nearer).offset_at(PlanarFace::Front, Point::new(10.0, 5.0)).is_none()); + assert!(frame(front(5.0, 0), side(8.0, 10.0, 1)).handle(&g).is_some()); + assert!(frame(front(5.0, 0), side(14.0, 10.0, 1)).handle(&g).is_some()); + assert!(frame(front(5.0, 0), side(8.0, f64::MAX, 1)).handle(&g).is_none()); + assert!(frame(front(f64::MAX, 0), side(8.0, f64::MAX, 1)).handle(&g).is_none()); + assert!(frame(front(f64::MAX, 2), side(8.0, f64::MAX, 1)).handle(&g).is_some()); +} From 227b6b9984faec2686b46ed6825a10fb09cf41fd Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 16 Nov 2026 01:05:46 -0800 Subject: [PATCH 15/49] 3D: no Inflate graphic handle where a nearer piece of its own face covers it Where two pieces of an Inflate face overlap on the page, a graphic's center mapped through the farther piece had a handle at a point the nearer piece covers, and that point read back as a different offset. Every other piece now counts as a cover, of either face. A piece drawn last is chosen over the others by draw order, as the cover check orders them, so two overlapping pieces drawn last map through the later one. --- crates/effects/src/solids/graphics.rs | 16 ++++++++++++---- crates/effects/src/solids/tests_graphics.rs | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/crates/effects/src/solids/graphics.rs b/crates/effects/src/solids/graphics.rs index 2ef74b1b10..ad0c802728 100644 --- a/crates/effects/src/solids/graphics.rs +++ b/crates/effects/src/solids/graphics.rs @@ -1097,8 +1097,8 @@ impl MembraneFrame { /// Point `p` of `face` in the art's plane mapped onto the page, or with `from_page` a page point /// mapped into the art's plane, through the piece of that face that holds it and is nearest at - /// that point of the page. `None` when no piece the viewer sees holds it, or when a nearer piece - /// of the other face or a nearer cover hides that point of the page. + /// that point of the page. `None` when no piece the viewer sees holds it, or when another nearer + /// piece, of either face, or a nearer cover hides that point of the page. fn map(&self, face: PlanarFace, p: Point, from_page: bool) -> Option { let inside = |t: &[Point; 3], q: Point| { let side = |a: Point, b: Point| (b - a).cross(q - a); @@ -1113,7 +1113,15 @@ impl MembraneFrame { } let Some(q) = triangle_map(from, to).map(|m| m * p).filter(|q| q.is_finite()) else { continue }; let depth = piece.depth_at(if from_page { p } else { q }); - if best.is_none_or(|(_, nearest, _)| depth > nearest) { + // A piece drawn last is drawn over every other one, and the later of two drawn last is + // drawn over the other, whatever their planes' depths. + let over = |(_, nearest, other): (Point, f64, &MembranePiece)| match (piece.depth == f64::MAX, other.depth == f64::MAX) { + (true, true) => piece.index > other.index, + (true, false) => true, + (false, true) => false, + (false, false) => depth > nearest, + }; + if best.is_none_or(over) { best = Some((q, depth, piece)); } } @@ -1131,7 +1139,7 @@ impl MembraneFrame { let covered = self .pieces .iter() - .filter(|piece| piece.face != face) + .filter(|piece| !std::ptr::eq(*piece, shown)) .any(|piece| inside(&piece.page, at) && hides(piece.depth, piece.depth_at(at), piece.index)) || self.covers.iter().any(|c| c.holds(at) && hides(c.depth, c.plane.and_then(|plane| plane.depth_at(at)).unwrap_or(c.depth), c.index)); (!covered).then_some(q) diff --git a/crates/effects/src/solids/tests_graphics.rs b/crates/effects/src/solids/tests_graphics.rs index 1873156469..ca3ba46d59 100644 --- a/crates/effects/src/solids/tests_graphics.rs +++ b/crates/effects/src/solids/tests_graphics.rs @@ -1056,6 +1056,24 @@ fn overlapping_inflate_pieces_map_a_point_through_the_one_nearer_there() { // Near the tilted piece's left corner it is the nearer one. let (x, _) = frame.offset_at(PlanarFace::Front, Point::new(2.0, 0.5)).unwrap(); assert!((x - 2.0).abs() < 1e-6, "{x}"); + // A graphic's center has a handle only where its own piece is the nearer one, and the handle + // maps back to the same offset. + let mark = |x: f64, y: f64| MappedGraphic::from_value(&json!({"symbol": "Mark", "face": "front", "x": x, "y": y})).unwrap(); + assert!(frame.handle(&mark(10.0, 5.0)).is_none()); + for (x, y) in [(2.0, 0.5), (110.0, 5.0)] { + let (at, _) = frame.handle(&mark(x, y)).unwrap(); + let (bx, by) = frame.offset_at(PlanarFace::Front, at).unwrap(); + assert!((bx - x).abs() < 1e-6 && (by - y).abs() < 1e-6, "{x} {y}: {bx} {by}"); + } + // Of two overlapping pieces drawn last, the later one is drawn over the other, though the + // earlier one's plane is nearer. + let last = |shift: f64, offset: f64, index: usize| MembranePiece { index, ..piece(shift, f64::MAX, [0.0, 0.0, 1.0], offset) }; + let pieces = vec![last(0.0, 10.0, 0), last(100.0, 0.0, 1)]; + let frame = GraphicFrame::inflated(Rect::new(0.0, 0.0, 20.0, 20.0), MembraneFrame { pieces, covers: vec![] }); + let (x, _) = frame.offset_at(PlanarFace::Front, Point::new(10.0, 5.0)).unwrap(); + assert!((x - 110.0).abs() < 1e-6, "{x}"); + assert!(frame.handle(&mark(10.0, 5.0)).is_none()); + assert!(frame.handle(&mark(110.0, 5.0)).is_some()); } /// A graphic on Inflate's back has no handle where a nearer piece of the front covers its center From 4a5931641addd00d3632bb2b5c37208b41989a39 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 17 Nov 2026 05:02:42 -0800 Subject: [PATCH 16/49] 3D: test that Inflate graphics pass over an ear whose new edge runs through a dent Adds a test for a ring whose first ear's new edge runs through a dent's corner: the ear is passed over, so no triangle edge runs through a corner of the ring. --- crates/three-d/src/mesh/tests.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/crates/three-d/src/mesh/tests.rs b/crates/three-d/src/mesh/tests.rs index 9980e900d1..d17101f66e 100644 --- a/crates/three-d/src/mesh/tests.rs +++ b/crates/three-d/src/mesh/tests.rs @@ -205,6 +205,24 @@ fn flat_triangles_keep_corners_on_the_edge_an_ear_would_cut() { } } +#[test] +fn flat_triangles_pass_over_an_ear_whose_new_edge_runs_through_a_dent() { + // The first ear's new edge, from (0, 4) to (4, 0), runs through the dent's corner at (2, 2). + let p = |x: f64, y: f64| Point::new(x, y); + let outline = vec![p(0.0, 0.0), p(4.0, 0.0), p(4.0, 4.0), p(2.0, 2.0), p(0.0, 4.0)]; + let mut work = 0; + let triangles = flat_triangles(std::slice::from_ref(&outline), &mut work, usize::MAX).unwrap(); + let area = |t: &[Point; 3]| ((t[1].x - t[0].x) * (t[2].y - t[0].y) - (t[1].y - t[0].y) * (t[2].x - t[0].x)) / 2.0; + assert!((triangles.iter().map(area).sum::() - 12.0).abs() < 1e-9); + for t in &triangles { + for (a, b) in [(t[0], t[1]), (t[1], t[2]), (t[2], t[0])] { + for q in &outline { + assert!(!super::touches((q.x, q.y), (a.x, a.y), (b.x, b.y)), "{q:?} lies inside the edge {a:?} to {b:?}"); + } + } + } +} + #[test] fn flat_triangles_stop_at_their_budget() { let p = |x: f64, y: f64| Point::new(x, y); From afb838267746e4eeb961905e1a139189c5672023 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 17 Nov 2026 07:51:48 -0800 Subject: [PATCH 17/49] Add original Nature Icons symbol library --- crates/engine/src/cmd/symbollib.rs | 86 +++++++++++++++++++ crates/engine/src/tests/symbollib.rs | 35 +++++++- crates/ui-egui/src/i18n/bg.tsv | 4 + crates/ui-egui/src/i18n/bs.tsv | 4 + crates/ui-egui/src/i18n/ca.tsv | 4 + crates/ui-egui/src/i18n/cs.tsv | 4 + crates/ui-egui/src/i18n/da.tsv | 4 + crates/ui-egui/src/i18n/de.tsv | 5 ++ crates/ui-egui/src/i18n/el.tsv | 4 + crates/ui-egui/src/i18n/es.tsv | 4 + crates/ui-egui/src/i18n/fi.tsv | 4 + crates/ui-egui/src/i18n/fr.tsv | 4 + crates/ui-egui/src/i18n/gu.tsv | 5 ++ crates/ui-egui/src/i18n/hi.tsv | 4 + crates/ui-egui/src/i18n/hu.tsv | 4 + crates/ui-egui/src/i18n/id.tsv | 4 + crates/ui-egui/src/i18n/it.tsv | 5 ++ crates/ui-egui/src/i18n/ja.tsv | 5 ++ crates/ui-egui/src/i18n/ka.tsv | 4 + crates/ui-egui/src/i18n/ko.tsv | 5 ++ crates/ui-egui/src/i18n/nl.tsv | 4 + crates/ui-egui/src/i18n/pl.tsv | 4 + crates/ui-egui/src/i18n/pt-br.tsv | 4 + crates/ui-egui/src/i18n/ru.tsv | 4 + crates/ui-egui/src/i18n/sv.tsv | 4 + crates/ui-egui/src/i18n/tests.rs | 10 +++ crates/ui-egui/src/i18n/tr.tsv | 4 + crates/ui-egui/src/i18n/uk.tsv | 5 ++ crates/ui-egui/src/i18n/vi.tsv | 5 ++ crates/ui-egui/src/i18n/zh-hans.tsv | 5 ++ crates/ui-egui/src/i18n/zh-hant.tsv | 5 ++ .../src/panels/tests_symbol_libraries.rs | 10 ++- docs/gaps.md | 10 ++- docs/mcp.md | 4 +- docs/roadmap.md | 3 +- docs/target-app-parity.md | 5 +- 36 files changed, 273 insertions(+), 11 deletions(-) diff --git a/crates/engine/src/cmd/symbollib.rs b/crates/engine/src/cmd/symbollib.rs index b82be77f43..0776dc68db 100644 --- a/crates/engine/src/cmd/symbollib.rs +++ b/crates/engine/src/cmd/symbollib.rs @@ -161,6 +161,7 @@ pub const BUILTIN: &[BuiltinSymbolLibrary] = &[ BuiltinSymbolLibrary { id: "inventory-icons", name: "Inventory Icons", make: inventory_icons }, BuiltinSymbolLibrary { id: "skill-icons", name: "Skill Icons", make: skill_icons }, BuiltinSymbolLibrary { id: "weather-icons", name: "Weather Icons", make: weather_icons }, + BuiltinSymbolLibrary { id: "nature-icons", name: "Nature Icons", make: nature_icons }, ]; /// Built-in library `id`, made once. @@ -493,6 +494,91 @@ fn weather_icons() -> SymbolLibrary { SymbolLibrary { name: "Weather Icons".into(), doc } } +/// Nature Icons: five original silhouettes for diagrams and reusable artwork. +fn nature_icons() -> SymbolLibrary { + let poly = |coords: &[(f64, f64)]| { + let points: Vec = coords.iter().map(|&(x, y)| Point::new(x, y)).collect(); + SubPath::polyline(&points, true) + }; + let leaf = PathData::new(vec![ + poly(&[(0.0, -20.0), (12.0, -13.0), (17.0, -2.0), (12.0, 10.0), (0.0, 19.0), (-12.0, 10.0), (-17.0, -2.0), (-12.0, -13.0)]), + poly(&[(-1.0, -13.0), (1.0, -13.0), (1.0, 20.0), (-1.0, 20.0)]), + ]); + let mut flower_parts = shapes::ellipse(Rect::new(-6.0, -6.0, 6.0, 6.0)).subpaths; + for i in 0..6 { + let angle = i as f64 * std::f64::consts::PI / 3.0; + let (sin, cos) = angle.sin_cos(); + let x = 12.0 * cos; + let y = 12.0 * sin; + flower_parts.extend(shapes::ellipse(Rect::new(x - 5.5, y - 5.5, x + 5.5, y + 5.5)).subpaths); + } + let flower = PathData::new(flower_parts); + let tree = PathData::new(vec![ + poly(&[(-3.0, 6.0), (3.0, 6.0), (3.0, 20.0), (-3.0, 20.0)]), + poly(&[ + (0.0, -21.0), + (12.0, -8.0), + (8.0, -8.0), + (17.0, 4.0), + (11.0, 4.0), + (18.0, 12.0), + (-18.0, 12.0), + (-11.0, 4.0), + (-17.0, 4.0), + (-8.0, -8.0), + (-12.0, -8.0), + ]), + ]); + let mountain = PathData::new(vec![ + poly(&[(-21.0, 17.0), (-6.0, -17.0), (2.0, 0.0), (8.0, -11.0), (21.0, 17.0)]), + poly(&[(-12.0, -4.0), (-6.0, -17.0), (0.0, -4.0), (-5.0, -7.0), (-8.0, -3.0)]), + ]); + let wave = PathData::new( + (0..3) + .map(|row| { + let y = row as f64 * 9.0 - 10.0; + poly(&[ + (-20.0, y), + (-14.0, y - 4.0), + (-8.0, y - 4.0), + (-2.0, y), + (4.0, y + 4.0), + (10.0, y + 4.0), + (16.0, y), + (20.0, y), + (20.0, y + 3.0), + (16.0, y + 3.0), + (10.0, y + 7.0), + (4.0, y + 7.0), + (-2.0, y + 3.0), + (-8.0, y - 1.0), + (-14.0, y - 1.0), + (-20.0, y + 3.0), + ]) + }) + .collect(), + ); + let icons = [ + ("Leaf", leaf, "#4f9d59"), + ("Flower", flower, "#d977a7"), + ("Tree", tree, "#287c53"), + ("Mountain", mountain, "#768899"), + ("Wave", wave, "#388fb8"), + ]; + let mut doc = Document::new(100.0, 100.0); + for (name, path, hex) in icons { + let fill = Color::from_hex(hex).unwrap_or(Color::BLACK); + let edge = fill.lerp(&Color::BLACK, 0.35); + let id = doc.alloc_id(); + let art = Node::path(id, path, Appearance::basic(Paint::solid(fill), Paint::solid(edge), 1.25)); + let Ok((art, size, _)) = normalize(art) else { continue }; + doc.symbols.push(Symbol { dynamic: false, name: name.into(), art: Arc::new(art) }); + set_natural_size(&mut doc, name, Some(size)); + } + doc.title = "Nature Icons".into(); + SymbolLibrary { name: "Nature Icons".into(), doc } +} + /// An instance of symbol `name` (what the resource gathering follows). fn instance(name: &str) -> Node { Node::new(NodeId(0), NodeKind::SymbolInstance { symbol: name.into(), xf: Affine::IDENTITY }) diff --git a/crates/engine/src/tests/symbollib.rs b/crates/engine/src/tests/symbollib.rs index c5d32e822a..c8b21570cf 100644 --- a/crates/engine/src/tests/symbollib.rs +++ b/crates/engine/src/tests/symbollib.rs @@ -84,7 +84,7 @@ fn the_builtin_library_is_original_art_generated_in_code() { let mut s = Session::new(); let list = run(&mut s, "symbol.libraries", json!({})); let libs = list["libraries"].as_array().unwrap(); - assert_eq!(libs.len(), 6, "{libs:?}"); + assert_eq!(libs.len(), 7, "{libs:?}"); assert_eq!((libs[0]["id"].as_str(), libs[0]["category"].as_str()), (Some("basic-shapes"), Some("builtIn"))); assert_eq!( (libs[1]["id"].as_str(), libs[1]["name"].as_str(), libs[1]["category"].as_str()), @@ -106,6 +106,10 @@ fn the_builtin_library_is_original_art_generated_in_code() { (libs[5]["id"].as_str(), libs[5]["name"].as_str(), libs[5]["category"].as_str()), (Some("weather-icons"), Some("Weather Icons"), Some("builtIn")) ); + assert_eq!( + (libs[6]["id"].as_str(), libs[6]["name"].as_str(), libs[6]["category"].as_str()), + (Some("nature-icons"), Some("Nature Icons"), Some("builtIn")) + ); let lib = run(&mut s, "symbol.library", json!({"library": "basic shapes"})); let names: Vec<&str> = lib["symbols"].as_array().unwrap().iter().map(|x| x["name"].as_str().unwrap()).collect(); assert_eq!(names, ["Circle", "Square", "Rounded Square", "Triangle", "Diamond", "Hexagon", "Star", "Burst", "Arrow"]); @@ -245,6 +249,35 @@ fn weather_icons_library_lists_and_places() { } } +#[test] +fn nature_icons_library_places_and_survives_save() { + let mut s = session(); + let listed = run(&mut s, "symbol.libraries", json!({})); + let entry = listed["libraries"].as_array().unwrap().iter().find(|l| l["id"] == "nature-icons").unwrap(); + assert_eq!((entry["name"].as_str(), entry["count"].as_u64()), (Some("Nature Icons"), Some(5))); + let library = run(&mut s, "symbol.library", json!({"library": "nature-icons"})); + let names: Vec<&str> = library["symbols"].as_array().unwrap().iter().map(|x| x["name"].as_str().unwrap()).collect(); + assert_eq!(names, ["Leaf", "Flower", "Tree", "Mountain", "Wave"]); + for (i, name) in names.iter().enumerate() { + let symbol = &library["symbols"][i]; + let size = symbol["size"].as_array().unwrap(); + assert!(size.iter().all(|n| n.as_f64().is_some_and(|n| n.is_finite() && n > 0.0)), "{name}"); + let added = run( + &mut s, + "symbol.addFromLibrary", + json!({"library": "nature-icons", "name": name, "place": true, "x": 100.0 + 80.0 * i as f64, "y": 100.0}), + ); + assert_eq!(added["added"], json!([name])); + let id = NodeId(added["placed"].as_u64().unwrap()); + assert!(matches!(doc(&s).node(id).map(|n| &n.kind), Some(NodeKind::SymbolInstance { symbol, .. }) if symbol == *name)); + assert_eq!(doc(&s).symbol_nine_slice(name), None); + } + let saved = run(&mut s, "symbol.saveLibrary", json!({"names": ["Leaf", "Flower", "Tree", "Mountain", "Wave"]})); + let bytes = vectorcraft_format::base64_decode(saved["dataBase64"].as_str().unwrap()).unwrap(); + let reopened = vectorcraft_format::load(&bytes).unwrap(); + assert_eq!(reopened.symbols.iter().map(|s| s.name.as_str()).collect::>(), names); +} + #[test] fn a_saved_library_reopens_and_its_symbols_join_another_document_in_one_step() { let dir = folder("user"); diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index bb039bb08e..346a53a073 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -7237,3 +7237,7 @@ breakText Glyphs Глифи @msg A fold line is on a non-printing layer. Линия на сгъване е на слой, който не се печата. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Панели: {panels}, панти: {hinges}, грешки: {errors}, предупреждения: {warnings} @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer трябва да е "singleLine", "everyLine", "standardSingleLine" или "standardEveryLine" + Nature Icons Природни икони + Flower Цвете + Tree Дърво + Mountain Планина diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index 99f23d313c..b7226c809e 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -7291,3 +7291,7 @@ shape Open Otvoren @msg A fold line is on a non-printing layer. Linija savijanja je na sloju koji se ne štampa. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Paneli: {panels}, šarke: {hinges}, greške: {errors}, upozorenja: {warnings} @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer mora biti "singleLine", "everyLine", "standardSingleLine" ili "standardEveryLine" + Nature Icons Ikone prirode + Flower Cvijet + Tree Drvo + Mountain Planina diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index c54311799d..f30dbfc452 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -8126,3 +8126,7 @@ breakText Glyphs Glifs @msg A fold line is on a non-printing layer. Una línia de plegat és en una capa que no s’imprimeix. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panells: {panels}, frontisses: {hinges}, errors: {errors}, avisos: {warnings} @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer ha de ser "singleLine", "everyLine", "standardSingleLine" o "standardEveryLine" + Nature Icons Icones de natura + Flower Flor + Tree Arbre + Mountain Muntanya diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index a5d7bb948a..0734aa2d5c 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -9917,3 +9917,7 @@ breakText Glyphs Glyfy @msg A panel is not joined to the rest by a crease. Panel není se zbytkem spojen žádnou linií bigu. @msg A fold line is on a non-printing layer. Linie skladu je na netisknutelné vrstvě. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panely: {panels}, panty: {hinges}, chyby: {errors}, upozornění: {warnings} + Nature Icons Ikony přírody + Flower Květina + Tree Strom + Mountain Hora diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index 08100f593f..77ee6308f0 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -10025,3 +10025,7 @@ breakText Glyphs Glyffer @msg A fold line is on a non-printing layer. En foldelinje ligger på et lag, der ikke udskrives. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Paneler: {panels}, hængsler: {hinges}, fejl: {errors}, advarsler: {warnings} @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer skal være "singleLine", "everyLine", "standardSingleLine" eller "standardEveryLine" + Nature Icons Naturikoner + Flower Blomst + Tree Træ + Mountain Bjerg diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 10147b2d45..b53970b2eb 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -9516,3 +9516,8 @@ breakText Glyphs Glyphen @msg A panel is not joined to the rest by a crease. Ein Feld ist durch keine Rilllinie mit den übrigen verbunden. @msg A fold line is on a non-printing layer. Eine Faltlinie liegt auf einer nicht druckbaren Ebene. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Felder: {panels}, Scharniere: {hinges}, Fehler: {errors}, Warnungen: {warnings} + Nature Icons Natursymbole + Leaf Blatt + Flower Blume + Tree Baum + Mountain Berg diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 1ebf6e5684..5b496f17c6 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -8100,3 +8100,7 @@ breakText Glyphs Γλύφοι @msg A fold line is on a non-printing layer. Μια γραμμή δίπλωσης βρίσκεται σε επίπεδο που δεν εκτυπώνεται. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Πάνελ: {panels}, μεντεσέδες: {hinges}, σφάλματα: {errors}, προειδοποιήσεις: {warnings} @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" το composer πρέπει να είναι "singleLine", "everyLine", "standardSingleLine" ή "standardEveryLine" + Nature Icons Εικονίδια φύσης + Flower Λουλούδι + Tree Δέντρο + Mountain Βουνό diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index a456910a16..9deb4e7779 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -8087,3 +8087,7 @@ breakText Glyphs Glifos @msg A fold line is on a non-printing layer. Una línea de plegado está en una capa que no se imprime. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Paneles: {panels}, bisagras: {hinges}, errores: {errors}, advertencias: {warnings} @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer debe ser "singleLine", "everyLine", "standardSingleLine" o "standardEveryLine" + Nature Icons Iconos de naturaleza + Flower Flor + Tree Árbol + Mountain Montaña diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index bff46fc0d7..77db7f56d7 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -8183,3 +8183,7 @@ breakText Glyphs Merkit @msg A fold line is on a non-printing layer. Taittoviiva on tasolla, jota ei tulosteta. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Paneelit: {panels}, saranat: {hinges}, virheet: {errors}, varoitukset: {warnings} @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer on oltava "singleLine", "everyLine", "standardSingleLine" tai "standardEveryLine" + Nature Icons Luontokuvakkeet + Flower Kukka + Tree Puu + Mountain Vuori diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 3be3497f97..19a9fb4823 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -9902,3 +9902,7 @@ breakText Glyphs Glyphes @msg A fold line is on a non-printing layer. Une ligne de pliage se trouve sur un calque non imprimable. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} {panels} panneau(x), {hinges} charnière(s), {errors} erreur(s), {warnings} avertissement(s) @msg {_1} × {_2} pixels is too large for GIF (at most 65535 pixels a side): lower the resolution {_1} × {_2} pixels, c’est trop grand pour le GIF (65535 pixels par côté au plus) : réduisez la résolution + Nature Icons Icônes de nature + Flower Fleur + Tree Arbre + Mountain Montagne diff --git a/crates/ui-egui/src/i18n/gu.tsv b/crates/ui-egui/src/i18n/gu.tsv index c427fc527c..5f9295efa3 100644 --- a/crates/ui-egui/src/i18n/gu.tsv +++ b/crates/ui-egui/src/i18n/gu.tsv @@ -4987,3 +4987,8 @@ swatch [Registration] [રજિસ્ટ્રેશન] Standard Single-line Composer સ્ટાન્ડર્ડ સિંગલ-લાઇન કમ્પોઝર Standard Every-line Composer સ્ટાન્ડર્ડ એવરી-લાઇન કમ્પોઝર @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer આમાંથી એક હોવું જોઈએ: "singleLine", "everyLine", "standardSingleLine" અથવા "standardEveryLine" + Nature Icons પ્રકૃતિ ચિહ્નો + Leaf પાન + Flower ફૂલ + Tree વૃક્ષ + Mountain પર્વત diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index cbfb4f51d1..25cdabc0c7 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -9524,3 +9524,7 @@ theme Appearance अपीयरेंस @msg A panel is not joined to the rest by a crease. कोई पैनल किसी क्रीज़ लाइन से बाकी से जुड़ा नहीं है। @msg A fold line is on a non-printing layer. एक फ़ोल्ड लाइन नॉन-प्रिंटिंग लेयर पर है। @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} पैनल: {panels}, हिंज: {hinges}, एरर: {errors}, वॉर्निंग: {warnings} + Nature Icons प्रकृति चिह्न + Flower फूल + Tree पेड़ + Mountain पर्वत diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 0f81a72036..d01051243c 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -9905,3 +9905,7 @@ breakText Glyphs Glifák @msg A panel is not joined to the rest by a crease. Egy panelt egyetlen bigvonal sem köt a többihez. @msg A fold line is on a non-printing layer. Egy hajtásvonal nem nyomtatható rétegen van. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panelek: {panels}, zsanérok: {hinges}, hibák: {errors}, figyelmeztetések: {warnings} + Nature Icons Természetikonok + Flower Virág + Tree Fa + Mountain Hegy diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index 28ea2b5ab3..907f98d7b1 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -7252,3 +7252,7 @@ breakText Glyphs Glif @msg A fold line is on a non-printing layer. Sebuah garis lipat berada di lapisan yang tidak dicetak. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panel: {panels}, engsel: {hinges}, galat: {errors}, peringatan: {warnings} @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer harus "singleLine", "everyLine", "standardSingleLine", atau "standardEveryLine" + Nature Icons Ikon Alam + Flower Bunga + Tree Pohon + Mountain Gunung diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 8f2ed3216c..26676e9640 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -9550,3 +9550,8 @@ breakText Glyphs Glifi @msg A panel is not joined to the rest by a crease. Un pannello non è unito al resto da alcuna linea di cordonatura. @msg A fold line is on a non-printing layer. Una linea di piega si trova su un livello non stampabile. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Pannelli: {panels}, cerniere: {hinges}, errori: {errors}, avvisi: {warnings} + Nature Icons Icone della natura + Leaf Foglia + Flower Fiore + Tree Albero + Mountain Montagna diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index c429f204a1..cae0f2c467 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -9617,3 +9617,8 @@ breakText Glyphs 字形 @msg A panel is not joined to the rest by a crease. パネルがどの筋入れ線でも他とつながっていません。 @msg A fold line is on a non-printing layer. 折り線が印刷しないレイヤーにあります。 @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} パネル: {panels}、ヒンジ: {hinges}、エラー: {errors}、警告: {warnings} + Nature Icons 自然アイコン + Leaf 葉 + Flower 花 + Tree 木 + Mountain 山 diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 414f45171c..0f1a2ac875 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -10285,3 +10285,7 @@ font-script Japanese იაპონური @msg A fold line is on a non-printing layer. მოკეცვის ხაზი არაბეჭდვად შრეზეა. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} პანელები: {panels}, ანჯამები: {hinges}, შეცდომები: {errors}, გაფრთხილებები: {warnings} @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer უნდა იყოს "singleLine", "everyLine", "standardSingleLine" ან "standardEveryLine" + Nature Icons ბუნების ხატულები + Flower ყვავილი + Tree ხე + Mountain მთა diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index dbda53243f..cc846f700f 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -9514,3 +9514,8 @@ breakText Glyphs 글리프 @msg A panel is not joined to the rest by a crease. 패널이 어떤 오시선으로도 나머지와 연결되어 있지 않습니다. @msg A fold line is on a non-printing layer. 접는 선이 인쇄되지 않는 레이어에 있습니다. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} 패널: {panels}, 힌지: {hinges}, 오류: {errors}, 경고: {warnings} + Nature Icons 자연 아이콘 + Leaf 잎 + Flower 꽃 + Tree 나무 + Mountain 산 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 69aef91cfc..54dfd68b2e 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -9953,3 +9953,7 @@ breakText Glyphs Glyphs @msg A panel is not joined to the rest by a crease. Een paneel is door geen rillijn met de rest verbonden. @msg A fold line is on a non-printing layer. Een vouwlijn staat op een laag die niet wordt afgedrukt. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panelen: {panels}, scharnieren: {hinges}, fouten: {errors}, waarschuwingen: {warnings} + Nature Icons Natuurpictogrammen + Flower Bloem + Tree Boom + Mountain Berg diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 0147515ffe..23c1df5022 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -9770,3 +9770,7 @@ breakText Glyphs Glify @msg A panel is not joined to the rest by a crease. Panel nie jest połączony z resztą żadną linią bigowania. @msg A fold line is on a non-printing layer. Linia zgięcia znajduje się na warstwie niedrukowanej. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panele: {panels}, zawiasy: {hinges}, błędy: {errors}, ostrzeżenia: {warnings} + Nature Icons Ikony natury + Flower Kwiat + Tree Drzewo + Mountain Góra diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 8201db7ab6..8a7f5f602d 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -9988,3 +9988,7 @@ swatch Yellow Green Verde-amarelado @msg A panel is not joined to the rest by a crease. Um painel não está unido ao restante por nenhuma linha de vinco. @msg A fold line is on a non-printing layer. Uma linha de dobra está em uma camada não imprimível. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Painéis: {panels}, dobradiças: {hinges}, erros: {errors}, avisos: {warnings} + Nature Icons Ícones da natureza + Flower Flor + Tree Árvore + Mountain Montanha diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index d1593508d3..2defaac0ef 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -10011,3 +10011,7 @@ shape Open Открытый @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Панели: {panels}, шарниры: {hinges}, ошибки: {errors}, предупреждения: {warnings} @msg {w} × {h} pixels is too large for PSD (at most {MAX_SIDE} pixels a side): lower the resolution {w} × {h} пикселей — слишком большой размер для PSD (не более {MAX_SIDE} пикселей по стороне): уменьшите разрешение @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer должен быть "singleLine", "everyLine", "standardSingleLine" или "standardEveryLine" + Nature Icons Значки природы + Flower Цветок + Tree Дерево + Mountain Гора diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 5c0420fcd3..9f6f1246b1 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -9601,3 +9601,7 @@ digits Hindi Hindi @msg A fold line is on a non-printing layer. En falslinje ligger på ett lager som inte skrivs ut. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Paneler: {panels}, gångjärn: {hinges}, fel: {errors}, varningar: {warnings} @msg {w} × {h} pixels is too large for PSD (at most {MAX_SIDE} pixels a side): lower the resolution {w} × {h} pixlar är för stort för PSD (högst {MAX_SIDE} pixlar per sida): sänk upplösningen + Nature Icons Naturikoner + Flower Blomma + Tree Träd + Mountain Berg diff --git a/crates/ui-egui/src/i18n/tests.rs b/crates/ui-egui/src/i18n/tests.rs index 97fccd9167..fb98a2c994 100644 --- a/crates/ui-egui/src/i18n/tests.rs +++ b/crates/ui-egui/src/i18n/tests.rs @@ -475,6 +475,16 @@ fn objects_on_path_detach_strings_are_in_complete_catalogs() { } } +/// The Nature Icons library and its symbols display in each complete UI language. +#[test] +fn nature_symbol_library_names_are_in_complete_catalogs() { + for lang in LANGUAGES.iter().filter(|lang| lang.complete_menus) { + for name in ["Nature Icons", "Leaf", "Flower", "Tree", "Mountain", "Wave"] { + assert!(lang.catalog().plain(name).is_some(), "{} is missing {name}", lang.code); + } + } +} + /// The Window › Brush Libraries menu, built from the built-in library table, names each library. #[test] fn built_in_brush_library_names_are_in_complete_catalogs() { diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 910a7fc5b1..574af252ac 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -9875,3 +9875,7 @@ breakText Glyphs Glifler @msg A panel is not joined to the rest by a crease. Bir panel geri kalanlara hiçbir pilyaj çizgisiyle bağlı değil. @msg A fold line is on a non-printing layer. Bir katlama çizgisi yazdırılmayan bir katmanda. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Paneller: {panels}, menteşeler: {hinges}, hatalar: {errors}, uyarılar: {warnings} + Nature Icons Doğa simgeleri + Flower Çiçek + Tree Ağaç + Mountain Dağ diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index dbd6d2609e..8b6ed749d9 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -9526,3 +9526,8 @@ breakText Glyphs Гліфи @msg A panel is not joined to the rest by a crease. Панель не з’єднана з рештою жодною лінією біговки. @msg A fold line is on a non-printing layer. Лінія згину лежить на шарі, що не друкується. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Панелі: {panels}, шарніри: {hinges}, помилки: {errors}, попередження: {warnings} + Nature Icons Значки природи + Leaf Листок + Flower Квітка + Tree Дерево + Mountain Гора diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 519c5d8f0d..3f18642c95 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -7759,3 +7759,8 @@ breakText Glyphs Glyph @msg {width} × {height} pixels is too large for Targa (at most 65535 pixels a side): lower the resolution {width} × {height} điểm ảnh quá lớn cho Targa (tối đa 65535 điểm ảnh mỗi cạnh): hãy giảm độ phân giải @msg {w} × {h} pixels is too large for PSD (at most {MAX_SIDE} pixels a side): lower the resolution {w} × {h} điểm ảnh quá lớn cho PSD (tối đa {MAX_SIDE} điểm ảnh mỗi cạnh): hãy giảm độ phân giải @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer phải là "singleLine", "everyLine", "standardSingleLine" hoặc "standardEveryLine" + Nature Icons Biểu tượng thiên nhiên + Leaf Lá + Flower Hoa + Tree Cây + Mountain Núi diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index c6696a9ec6..4d29b43629 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -9758,3 +9758,8 @@ breakText Glyphs 字形 @msg A fold line is on a non-printing layer. 一条折线位于不打印的图层上。 @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} 面板:{panels},铰链:{hinges},错误:{errors},警告:{warnings} @msg {w} × {h} pixels is too large for PSD (at most {MAX_SIDE} pixels a side): lower the resolution {w} × {h} 像素对 PSD 而言过大 (每边最多 {MAX_SIDE} 像素):请降低分辨率 + Nature Icons 自然图标 + Leaf 叶子 + Flower 花朵 + Tree 树木 + Mountain 山脉 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 1480422931..66d93edafb 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -9568,3 +9568,8 @@ breakText Glyphs 字符 @msg A fold line is on a non-printing layer. 一條摺線位於不列印的圖層上。 @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} 面板:{panels},鉸鏈:{hinges},錯誤:{errors},警告:{warnings} @msg {what} would print on more than {MAX_TILES} tiles: scale it down {what} 會列印在超過 {MAX_TILES} 個拼貼上:請縮小 + Nature Icons 自然圖示 + Leaf 葉子 + Flower 花朵 + Tree 樹木 + Mountain 山脈 diff --git a/crates/ui-egui/src/panels/tests_symbol_libraries.rs b/crates/ui-egui/src/panels/tests_symbol_libraries.rs index 955b14327a..b0dd5ac000 100644 --- a/crates/ui-egui/src/panels/tests_symbol_libraries.rs +++ b/crates/ui-egui/src/panels/tests_symbol_libraries.rs @@ -146,7 +146,15 @@ fn the_window_menu_and_the_symbols_panel_open_symbol_libraries() { entries.iter().filter(|e| under(e) && e.command.as_deref() == Some("window.symbolLibrary")).map(|e| e.params["library"].clone()).collect(); assert_eq!( opened, - [json!("basic-shapes"), json!("ui-frames"), json!("map-markers"), json!("inventory-icons"), json!("skill-icons"), json!("weather-icons")] + [ + json!("basic-shapes"), + json!("ui-frames"), + json!("map-markers"), + json!("inventory-icons"), + json!("skill-icons"), + json!("weather-icons"), + json!("nature-icons") + ] ); let has = |cmd: &str| entries.iter().find(|e| under(e) && e.command.as_deref() == Some(cmd)).map(|e| e.enabled); assert_eq!(has("window.symbolLibrary.other"), Some(true)); diff --git a/docs/gaps.md b/docs/gaps.md index a6f6defbb0..d9ffb6b769 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -1,6 +1,6 @@ # Gaps -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-16 · **Change:** minor (Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: G4 type: modal Check Spelling dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: Type: the Middle Eastern & South Asian composers are done as a per-paragraph choice with the Standard composers (#4935); G5: built-in Neon & Glow graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); estimate unchanged (3–13 h); previously: Tech Circuit brush library, G5; previously: G5: built-in Weather Icons symbol library (Sun, Moon, Cloud, Rain, Thunder, Snow); estimate 5–15 → 4–14 h; previously: 3D: the seams of white-light Extrude & Bevel, Inflate and Rotate, and the face seams of the 3D (Classic) effects, have round joins instead of miters; previously: PDF import: preserve Type 3 font text runs as named groups , or as live text in TextAs::Text mode if ToUnicode exists on non-colour fonts (TextAs::Outlines produces grouped outlines), #6740; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: oversized editing artboard import; Glyphs panel: Alternates for Current Selection applies an OpenType feature value (`salt=2`) to the selected letter alone, so an Arabic word stays joined, and Entire Font lists the unencoded glyphs, #5514; #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: G5: built-in Energy Beams brush library; estimate 5–15 → 4–14 h; previously minor: G5: built-in Skill Icons symbol library; estimate 6–16 → 5–15 h; previously minor: ruler double-click adds a guide at the pointer, #5239; G5: built-in Status Effects graphic style library; estimate 7–17 → 6–16 h; MCP docs catch-up for UI Frames and Map Markers; previously minor: G5: built-in Inventory Icons symbol library; estimate 8–18 → 7–17 h; previously minor: G9: `.ai` save names a variable font instance's design-space setting, #6388; previously minor: G5: built-in Game Trails brush library; estimate 9–19 → 8–18 h; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: docs tidy-up, no content change: stray notes at the top moved into the revision table; scores and estimates unchanged; previously minor: G5: built-in Game HUD graphic style library; estimate 10–20 → 9–19 h; previously minor: G5: built-in Map Markers symbol library; estimate 11–21 → 10–20 h; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview; estimate 1–2 h → 0; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: built-in UI Frames symbol library with default 9-slice; estimate 11–21 h; previously minor: G5: dynamic symbol part on-canvas takes opacity, blend, gradient and pattern; docs Overlap/auto-corners sync; estimate 12–22 h; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap, Pattern brush auto corners and Global Edit Shift-click leave-out moved from Missing to Done (code already shipped); previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; G9: EPS gradients drawn as abutting strips import as one gradient, without seams; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; opening a slow file shows a progress window, part of #5930; Hindi catalog and contributor loanword preferences; agent wording pass complete; wider native proofreading welcome; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); scores and estimates unchanged; a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window; scores and estimates unchanged; large images in CMYK documents are shrunk before they are separated into ink planes (#4155); scores and estimates unchanged; `.ai` paths with a Calligraphic brush open brushed, with the 6D Art Pen's channels, and Windows reads the pen's tilt and barrel rotation, #372; scores and estimates unchanged; Compound Shapes add-on, beyond Illustrator; scores and estimates unchanged; Contour add-on, beyond Illustrator; scores and estimates unchanged; a slow first frame is waited for instead of restarting without the graphics adapter, and the menu bar no longer waits for the installed fonts' scan; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-17 · **Change:** minor (G5: Nature Icons adds five original vector symbols; seven built-in symbol libraries; G5 estimate and parity scores unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: G4 type: modal Check Spelling dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: Type: the Middle Eastern & South Asian composers are done as a per-paragraph choice with the Standard composers (#4935); G5: built-in Neon & Glow graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); estimate unchanged (3–13 h); previously: Tech Circuit brush library, G5; previously: G5: built-in Weather Icons symbol library (Sun, Moon, Cloud, Rain, Thunder, Snow); estimate 5–15 → 4–14 h; previously: 3D: the seams of white-light Extrude & Bevel, Inflate and Rotate, and the face seams of the 3D (Classic) effects, have round joins instead of miters; previously: PDF import: preserve Type 3 font text runs as named groups , or as live text in TextAs::Text mode if ToUnicode exists on non-colour fonts (TextAs::Outlines produces grouped outlines), #6740; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: oversized editing artboard import; Glyphs panel: Alternates for Current Selection applies an OpenType feature value (`salt=2`) to the selected letter alone, so an Arabic word stays joined, and Entire Font lists the unencoded glyphs, #5514; #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: G5: built-in Energy Beams brush library; estimate 5–15 → 4–14 h; previously minor: G5: built-in Skill Icons symbol library; estimate 6–16 → 5–15 h; previously minor: ruler double-click adds a guide at the pointer, #5239; G5: built-in Status Effects graphic style library; estimate 7–17 → 6–16 h; MCP docs catch-up for UI Frames and Map Markers; previously minor: G5: built-in Inventory Icons symbol library; estimate 8–18 → 7–17 h; previously minor: G9: `.ai` save names a variable font instance's design-space setting, #6388; previously minor: G5: built-in Game Trails brush library; estimate 9–19 → 8–18 h; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: docs tidy-up, no content change: stray notes at the top moved into the revision table; scores and estimates unchanged; previously minor: G5: built-in Game HUD graphic style library; estimate 10–20 → 9–19 h; previously minor: G5: built-in Map Markers symbol library; estimate 11–21 → 10–20 h; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview; estimate 1–2 h → 0; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: built-in UI Frames symbol library with default 9-slice; estimate 11–21 h; previously minor: G5: dynamic symbol part on-canvas takes opacity, blend, gradient and pattern; docs Overlap/auto-corners sync; estimate 12–22 h; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap, Pattern brush auto corners and Global Edit Shift-click leave-out moved from Missing to Done (code already shipped); previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; G9: EPS gradients drawn as abutting strips import as one gradient, without seams; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; opening a slow file shows a progress window, part of #5930; Hindi catalog and contributor loanword preferences; agent wording pass complete; wider native proofreading welcome; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); scores and estimates unchanged; a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window; scores and estimates unchanged; large images in CMYK documents are shrunk before they are separated into ink planes (#4155); scores and estimates unchanged; `.ai` paths with a Calligraphic brush open brushed, with the 6D Art Pen's channels, and Windows reads the pen's tilt and barrel rotation, #372; scores and estimates unchanged; Compound Shapes add-on, beyond Illustrator; scores and estimates unchanged; Contour add-on, beyond Illustrator; scores and estimates unchanged; a slow first frame is waited for instead of restarting without the graphics adapter, and the menu bar no longer waits for the installed fonts' scan; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) ## Feature submission evidence @@ -34,6 +34,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| +| 2026-11-17 | minor | G5: Nature Icons adds five original procedural vector symbols (Leaf, Flower, Tree, Mountain and Wave); seven built-in symbol libraries. G5 remaining estimate 3–13 h (estimated); parity scores and headline totals unchanged. | | 2026-11-16 | minor | G1: Recolor Artwork - native Lab entry in Color Picker, swatch libraries access in Color Picker, and row right-click context menu ("Pick from Swatches", "Limit to Library") (#4028); scores and estimates unchanged. | | 2026-11-15 | minor | G4 type: modal Check Spelling dialog (Edit › Spelling › Check Spelling…, `ui.checkSpelling`, #4936) with Not in Dictionary sentence context, suggestions, Ignore, Ignore All, Change, Change All, Add to Dictionary, Done/Cancel, keyboard navigation, and one-step Undo/Redo; spell check complete; scores and estimates unchanged. | | 2026-11-15 | minor | G5: Neon & Glow joins Shadows and Glows, Outlines and Rules, Hand-Drawn, Textures, Painted and Sketched, Gradient Finishes, Shape Effects, Blends and Transparency, Game HUD and Status Effects as an eleventh built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor; original procedural styles generated in code); estimate unchanged (3–13 h). | @@ -658,10 +659,11 @@ macOS cursor delivery (#2292) is narrowed to a native host adapter using the exi symbol static drops them; stored in the native format. Color eyedropper for scatter, art and pattern brushes (Hue Shift colorization; samples canvas art); symbol libraries ([public source](https://helpx.adobe.com/illustrator/desktop/manage-objects/traces-mockups-symbols/create-or-import-symbol-libraries.html)): Window › Symbol Libraries and the Symbols panel's Symbol - Libraries Menu open each library in a library panel of its own (six original libraries generated in code, + Libraries Menu open each library in a library panel of its own (seven original libraries generated in code, Basic Shapes, UI Frames with default 9-slice guides on Panel, Button and Bar, Map Markers with Pin, Flag, Crosshair and Checkpoint, Inventory Icons with Sword, Shield, Potion, Key and Gem, Skill Icons with - Attack, Defend, Heal, Buff and Ult, and Weather Icons with Sun, Moon, Cloud, Rain, Thunder and Snow; User Defined; Other + Attack, Defend, Heal, Buff and Ult, Weather Icons with Sun, Moon, Cloud, Rain, Thunder and Snow, + and Nature Icons with Leaf, Flower, Tree, Mountain and Wave; User Defined; Other Library… reads the symbols of any document VectorCraft opens); a click adds a symbol to the document's Symbols with its Symbol Options and the resources it uses, as one undo step, and dragging one onto the canvas also places it; Save Symbols / Save Symbol Library writes the @@ -694,7 +696,7 @@ macOS cursor delivery (#2292) is narrowed to a native host adapter using the exi painted with the texture effects; User Defined; Other Library…; `graphicStyle.libraries`, `graphicStyle.addFromLibrary`). - **Missing:** more built-in brush libraries beyond the ten shipped (and further graphic-style libraries beyond the eleven shipped, and further symbol libraries beyond Basic - Shapes, UI Frames, Map Markers, Inventory Icons, Skill Icons and Weather Icons; original, generated in code, never Adobe's); dynamic symbols' `.ai` read and write. + Shapes, UI Frames, Map Markers, Inventory Icons, Skill Icons, Weather Icons and Nature Icons; original, generated in code, never Adobe's); dynamic symbols' `.ai` read and write. - **Estimate:** 3–13 h (estimated). ## G3 3D and Materials diff --git a/docs/mcp.md b/docs/mcp.md index 092faabc4c..e31ee19210 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -5010,8 +5010,8 @@ left out. ## Symbol libraries -Symbol libraries are read-only sets of symbols: six generated in code (Basic Shapes, UI Frames, Map Markers, -Inventory Icons, Skill Icons, Weather Icons), the `.vectorcraft` files in +Symbol libraries are read-only sets of symbols: seven generated in code (Basic Shapes, UI Frames, Map Markers, +Inventory Icons, Skill Icons, Weather Icons, and Nature Icons with Leaf, Flower, Tree, Mountain and Wave), the `.vectorcraft` files in the user library folder of the desktop app (User Defined) and the symbols of any document loaded with `symbol.loadLibrary`. `symbol.libraries` lists them (`id`, `name`, `category`: `builtIn`, `user` or `loaded`, `count`) and `symbol.library {library}` returns one's symbols (`name`, `size`, `registration`, `exportType`; `library` is an diff --git a/docs/roadmap.md b/docs/roadmap.md index 258b86d04a..9a3c4f612c 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -1,6 +1,6 @@ # Roadmap: milestones and what's next -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-17 · **Change:** minor (PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview are in; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; M4/M7: `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; M4/M7: `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; Hindi catalog and contributor loanword preferences; full wording review in progress; Effect dialogs: a colour swatch beside a hex colour opens the Color Picker, #5365; shape tools move the selection from its centre point and turn it from the zone outside a box corner, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-17 · **Change:** minor (M10/G5: Nature Icons adds five original vector symbols; estimate and parity scores unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview are in; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; M4/M7: `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; M4/M7: `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; Hindi catalog and contributor loanword preferences; full wording review in progress; Effect dialogs: a colour swatch beside a hex colour opens the Color Picker, #5365; shape tools move the selection from its centre point and turn it from the zone outside a box corner, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) > > Oversized artboard import update (2026-11-12): Explicit editing-data import retains a single artboard beyond a capped 14,400 pt PDF page (#6865). > @@ -212,6 +212,7 @@ not take the artwork yet. Overflow-menu drag remains separate. Scores and hours | Date | Change | Summary | |---|---|---| +| 2026-11-17 | minor | M10/G5: Nature Icons adds Leaf, Flower, Tree, Mountain and Wave as five original procedural vector symbols; seven built-in symbol libraries. G5 estimate and parity scores unchanged. | | 2026-11-17 | minor | PDF import (#8300): a glyph filled only (text rendering mode 0) right after one filled and stroked (mode 2) joined the stroked run and came in stroked too: `2 Tr (B) Tj 0 Tr (C) Tj` came in as `BC` stroked throughout. A glyph filled only now joins only a run drawn alike, so it starts a run of its own, filled only, in the same type object, and takes a stroke only when the file draws one over it (the #8015 matching); a word filled whole then stroked whole, and fill and stroke rendering glyph by glyph, still come in as one run filled and stroked. Tests: `a_glyph_filled_only_after_one_filled_and_stroked_is_not_stroked`, `glyphs_filled_and_stroked_one_by_one_stay_one_run`; scores and estimates unchanged. | | 2026-11-17 | minor | PDF import (#8015 follow-up): type filled and stroked at less than full opacity is no longer joined into one type object, since the file composites the fill and the stroke apiece, darker where they overlap, while one object's opacity applies to both together; it stays a filled object and a stroked one, as a fill and stroke at different opacities already did. An upright glyph (vertical type) filled and stroked is no longer kept as an outline for a line that comes in as its outlines, as glyphs filled only weren't, so such a line can't lose them. The #8015 entries now say what is left: translucent type filled and stroked, and a `TJ` whose kerning starts a new line part way through, still come in as two objects. Tests: `translucent_fill_and_stroke_text_stays_two_objects`, `a_vertical_line_with_one_glyph_filled_and_stroked_keeps_every_glyph_filled`; scores and estimates unchanged. | | 2026-11-16 | minor | PDF import: fill and stroke rendering (text rendering modes 2 and 6) draws all the glyphs of a text-showing operator (`Tj`, `TJ`, `'`, `"`) filled, then the same glyphs stroked, so a word shown at once came in as two type objects: a stroke-only copy over a fill-only one. Each stroke is now matched, in order, to the glyph filled with the same placement (where, how large, how wide, slanted and turned) in the same font with the same text on the line, and only that glyph takes the stroke, so the word comes in as one type object, filled and stroked; glyphs stroked with another join part way through still split into runs of their own, and stroked type over no filled glyph (modes 1 and 5) stays stroke only (#8015; `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs`, `a_vertical_column_filled_then_stroked_is_one_filled_and_stroked_type` in `crates/pdf/src/tests/text_placement.rs`). Scores and estimates unchanged. | diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index eb8aae5389..6fed68d272 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -575,7 +575,7 @@ since 2026-10-01. | **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` (and legacy version 7 `.ai` out, keeping layers, groups and type as text), 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 | -| **Bundled content:** brush, symbol, style and swatch libraries | ~46% | Ours are original and generated in code, and far fewer than Illustrator ships; symbol libraries have six (Basic Shapes, UI Frames with default 9-slice, Map Markers, Inventory Icons, Skill Icons, Weather Icons), graphic style libraries eleven (including Game HUD, Status Effects and Neon & Glow) and brush libraries ten (Art Ribbons, Ink and Wash, Calligraphic Nibs, Bristle Brushes, Pattern Borders, Scatter Shapes, Game Trails, Energy Beams, Dry Media, Tech Circuit) beside User Defined and Other Library… | +| **Bundled content:** brush, symbol, style and swatch libraries | ~46% | Ours are original and generated in code, and far fewer than Illustrator ships; symbol libraries have seven (Basic Shapes, UI Frames with default 9-slice, Map Markers, Inventory Icons, Skill Icons, Weather Icons, Nature Icons), graphic style libraries eleven (including Game HUD, Status Effects and Neon & Glow) and brush libraries ten (Art Ribbons, Ink and Wash, Calligraphic Nibs, Bristle Brushes, Pattern Borders, Scatter Shapes, Game Trails, Energy Beams, Dry Media, Tech Circuit) beside User Defined and Other Library… | | **Performance** | unverified | Multithreaded, off-thread rendering and caches are in place. The last budget run (2026-10-01, loaded machine) measured 290 ms for a 50k-path fit against a 16 ms budget. Re-run `vectorcraft-cli perf` on an idle machine | | **Robustness** | good, new | ~2,840 tests, property tests, no panics in shipped code (lints, the `guard` safety net, import fuzzing), Data Recovery. Missing: a corpus of real-world files, Windows/Linux/browser QA | | **Platforms and 1.0 polish** | ~60% | The macOS app and the web build work, and Finder opens every readable format with the macOS app (#295, #354); on macOS the menus are in the system menu bar, laid out as a Mac app's, with the in-window menus as a fallback (`--in-window-menus`; verified on Windows and by cross-compilation, not yet by hand on a Mac); hybrid-graphics laptops render on the power-saving GPU by default on Windows and macOS (#306), and Windows starts on Direct3D 12, falling back to OpenGL, and loads no Vulkan driver unless `WGPU_BACKEND` asks for it (#545: Vulkan flickered black on an Intel GPU, DX12 and OpenGL didn't; #806: a faulty Vulkan driver crashed the app before its window appeared; verified by unit tests and the reporter's runs with `WGPU_BACKEND`), and Linux on the GPU the desktop runs on, since a Wayland compositor may refuse frames from the other one; a window that fails on its GPU while starting up starts again on the next one instead of crashing (#502; the dual-GPU Wayland case is verified by unit tests and cross-compilation, not on such hardware); web drops land in the document they were dropped on (#359); desktop drops carry no pointer position (winit 0.30), so a dropped document opens as a tab of its own and a picture or text is placed in the middle of the view, while the web places anything dropped on the canvas and opens what is dropped off it, as Illustrator does (#472); a web page that loses its WebGPU device or WebGL context restarts its graphics with the same documents (#369); on Linux/Wayland the clipboard reads the compositor's own (data-control) and copied image files paste, but files can't be dropped on the window under native Wayland until eframe moves to winit 0.31 (#398; the Wayland side is verified by compilation only), so Preferences › Performance › Linux Display Server › X11 (XWayland) opens the window through XWayland, where drops work (#1151; verified by unit tests and cross-compilation, not on a Wayland desktop); on Linux the Paste menu checks the system clipboard on a background thread, so a clipboard owner that never answers no longer freezes the window, while Windows and macOS keep their quick in-line check (#510; the X11 hang verified by the contributor, here by headless tests); on KDE Plasma 6.3+ under Wayland, pens and pen displays reach the app only under XWayland (`WAYLAND_DISPLAY=`) or with KWin's `KWIN_WAYLAND_EMULATE_TABLET=1`, since winit 0.30 has no Wayland tablet input (#491, not verified on hardware); Windows/Linux packaging and accessibility are pending | @@ -1079,7 +1079,8 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - macOS: Finder opens every format File › Open reads with VectorCraft (double-click, Open With, a drop on the Dock icon, `open -a`), at launch or while it runs; the release and `cargo xtask bundle` apps share one `Info.plist` that declares those document types, owning only VectorCraft's own formats. The DMG opens on a designed Finder window, VectorCraft.app beside the `Applications` link over a background with the app icon (#493). - Swatch and graphic style libraries, Libraries panel files, presets and plug-ins open wherever they are dropped on the window, as File › Open opens them. - File › Open has a filter for each kind of file it opens other than a document, Graphic Style Libraries (`.vcstyles`, after Swatch libraries) and Perspective grid presets (`.vcperspective`, after Print presets) among them, and Other Library… lists its library filter once. Graph designs are stored in the document, with no file type or filter of their own. Tests: `open_exts_cover_every_readable_format`, `library_open_filters_list_library_formats_first`. - - **Symbol libraries** ([public source](https://helpx.adobe.com/illustrator/desktop/manage-objects/traces-mockups-symbols/create-or-import-symbol-libraries.html)): Window › Symbol Libraries and the Symbols panel's Symbol Libraries Menu open each library in a library panel of its own, as swatch and graphic style libraries do. The built-in libraries, Basic Shapes, UI Frames (Panel, Button and Bar with default 9-slice guides), Map Markers (Pin, Flag, Crosshair and Checkpoint, no default 9-slice), Inventory Icons (Sword, Shield, Potion, Key and Gem, no default 9-slice), Skill Icons (Attack, Defend, Heal, Buff and Ult, no default 9-slice) and Weather Icons (Sun, Moon, Cloud, Rain, Thunder and Snow, no default 9-slice), are original art generated in code (`crates/engine/src/cmd/symbollib.rs`). A click on a symbol adds it to the document's Symbols as one undo step, with its Symbol Options (size, registration, export type, 9-slice guides) and every resource it uses (the symbols it nests, patterns, swatches, brushes, graphic styles, images), and makes it the current symbol; a symbol the document already has is not added again and another symbol of the same name keeps its name, the library's comes in numbered. Thumbnails, in the library panels and the Symbols panel, draw a symbol with the symbols it nests and the patterns and images it uses. Dragging a library symbol onto the canvas also places an instance there, in the same step ([placing from a library](https://helpx.adobe.com/illustrator/desktop/manage-objects/traces-mockups-symbols/create-and-place-symbols.html)). Save Symbols (the library menu) and Save Symbol Library… (the Symbols panel menu) write the document's symbols as a `.vectorcraft` document holding only them, into the user library folder (listed under User Defined) or a file; Other Library… reads the symbols of any document VectorCraft opens; a file it can't read is an error and opens no panel. Tests: `crates/engine/src/tests/symbollib.rs`, `crates/ui-egui/src/panels/tests_symbol_libraries.rs`, `panels::symbols::tests::thumbnails_show_the_symbols_a_symbol_nests`, `canvas::tests::a_library_symbol_dropped_on_the_canvas_is_added_and_placed_there_in_one_step`. + - **Symbol libraries** ([public source](https://helpx.adobe.com/illustrator/desktop/manage-objects/traces-mockups-symbols/create-or-import-symbol-libraries.html)): Window › Symbol Libraries and the Symbols panel's Symbol Libraries Menu open each library in a library panel of its own, as swatch and graphic style libraries do. The built-in libraries, Basic Shapes, UI Frames (Panel, Button and Bar with default 9-slice guides), Map Markers (Pin, Flag, Crosshair and Checkpoint, no default 9-slice), Inventory Icons (Sword, Shield, Potion, Key and Gem, no default 9-slice), Skill Icons (Attack, Defend, Heal, Buff and Ult, no default 9-slice), Weather Icons (Sun, Moon, Cloud, Rain, Thunder and Snow, no default 9-slice), and Nature Icons (Leaf, Flower, Tree, Mountain and Wave, no default 9-slice), are original art generated in code (`crates/engine/src/cmd/symbollib.rs`). A click on a symbol adds it to the document's Symbols as one undo step, with its Symbol Options (size, registration, export type, 9-slice guides) and every resource it uses (the symbols it nests, patterns, swatches, brushes, graphic styles, images), and makes it the current symbol; a symbol the document already has is not added again and another symbol of the same name keeps its name, the library's comes in numbered. Thumbnails, in the library panels and the Symbols panel, draw a symbol with the symbols it nests and the patterns and images it uses. Dragging a library symbol onto the canvas also places an instance there, in the same step ([placing from a library](https://helpx.adobe.com/illustrator/desktop/manage-objects/traces-mockups-symbols/create-and-place-symbols.html)). Save Symbols (the library menu) and Save Symbol Library… (the Symbols panel menu) write the document's symbols as a `.vectorcraft` document holding only them, into the user library folder (listed under User Defined) or a file; Other Library… reads the symbols of any document VectorCraft opens; a file it can't read is an error and opens no panel. Tests: `crates/engine/src/tests/symbollib.rs`, `crates/ui-egui/src/panels/tests_symbol_libraries.rs`, `panels::symbols::tests::thumbnails_show_the_symbols_a_symbol_nests`, `canvas::tests::a_library_symbol_dropped_on_the_canvas_is_added_and_placed_there_in_one_step`. + - **Nature Icons library:** Leaf, Flower, Tree, Mountain and Wave are five original procedural vector symbols. Each has a finite natural size, can be added and placed through the symbol library controls, and survives saving to a library file; no 9-slice guides are assigned by default. - **9-slice scaling** ([public source](https://helpx.adobe.com/illustrator/desktop/manage-objects/traces-mockups-symbols/maintain-proportions-while-scaling-symbols.html)): a scaled instance of a symbol with Enable Guides for 9-Slice Scaling on stays an instance and keeps the parts of its art outside the guides at their size. New guides sit a quarter of the symbol's width and height in from each edge ([reference](https://help.adobe.com/archive/en/illustrator/cs6/illustrator_reference.pdf), Use 9-slice scaling section); saved guides keep their values. The rest is VectorCraft's own rule: the corners keep both sizes, the top and bottom edges stretch in width, the left and right edges in height and the center in both; an instance smaller than its two outer cells on an axis shrinks them in proportion and leaves the center empty; the cells are sized along the symbol's axes before the instance's rotation, shear or reflection. A path with solid paint that crosses a guide is cut there and stays one path, its stroke at its weight with Scale Strokes & Effects on or off; type, images, live objects and gradient or pattern paint that cross a guide are drawn in each cell they reach, clipped to it, except those that draw symbol art (a nested instance, type with an inline graphic, a placed document, a brushed stroke, or a pattern whose tile draws one of these), which are placed by the cell their center is in; an object in one cell is placed by that cell and stays as it is. The canvas, bounds, the Eyedropper, Break Link to Symbol and the PDF, EPS, DXF, EMF/WMF and SVG exports place the art the same way; SVG writes such an instance as its placed art instead of a ``, and DXF and WMF, which do not clip, cut every path that crosses a guide and place other such objects by the cell their center is in. Tests: `symbol_nine_slice::tests` in `crates/doc`, `crates/engine/src/tests/symbol_nine_slice.rs`, `a_scaled_nine_slice_instance_keeps_its_corners` (PDF), `a_scaled_nine_slice_instance_is_written_as_the_canvas_draws_it` (SVG), `a_scaled_nine_slice_instance_is_sampled_as_it_is_drawn` (Eyedropper). - **Symbol editing mode** ([Edit symbols](https://helpx.adobe.com/illustrator/desktop/manage-objects/traces-mockups-symbols/edit-symbols.html), [Symbols panel options](https://helpx.adobe.com/illustrator/desktop/manage-objects/traces-mockups-symbols/symbols-panel-options.html)): a double-click on a symbol instance, the Control bar's Edit Symbol button, a double-click on a symbol in the Symbols panel and the panel menu's Edit Symbol (`symbol.edit`) open the symbol's art on a temporary isolated layer, where the instance shows it (from the panel: centered on the active artboard, or in the view in a document without artboards), with the rest of the document dimmed. Each edit there changes every instance at once; the instances keep their own transforms and stay linked (Break Link to Symbol still expands one), and a dynamic symbol's instances keep their appearance changes to the objects the art still has. Escape, the isolation bar's back button, the Control bar's Exit Symbol Editing Mode and a double-click outside the art leave the mode (`symbol.exitEditing`); leaving without an edit adds no undo step. Saving leaves the editing layer out. Tests: `crates/engine/src/tests/symboledit.rs`, `select::tests::a_double_click_on_a_symbol_instance_edits_its_symbol`, `panels::symbols::tests::edit_symbol_from_the_panel_centers_the_art_on_the_active_artboard_or_the_view`. - **Dynamic symbol appearance follows what an object draws** (VectorCraft's own rule): `symbol.instance.setAppearance` refuses a fill or stroke for an object of the art that does not draw it (a guide, blend, envelope, Repeat, Intertwine group, gradient mesh or placed document; a nested symbol instance's stroke, and its fill unless a solid color or none, which stains its art; an image's fill or stroke without a Convert to Shape or Outline Object effect) with an error that names the key and the object, and the call changes nothing. Opacity, blend and `null`, which takes a stored change back, are taken for every object. Tests: `crates/engine/src/tests/dynamic_symbols.rs`. From 7884f59955f7258cbbe5337fbbfa71cd2c229589 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 17 Nov 2026 08:01:46 -0800 Subject: [PATCH 18/49] Keep Nature Icons progress in evidence only --- docs/gaps.md | 3 +-- docs/roadmap.md | 3 +-- docs/target-app-parity.md | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/gaps.md b/docs/gaps.md index d9ffb6b769..d161ceb605 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -1,6 +1,6 @@ # Gaps -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-17 · **Change:** minor (G5: Nature Icons adds five original vector symbols; seven built-in symbol libraries; G5 estimate and parity scores unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: G4 type: modal Check Spelling dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: Type: the Middle Eastern & South Asian composers are done as a per-paragraph choice with the Standard composers (#4935); G5: built-in Neon & Glow graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); estimate unchanged (3–13 h); previously: Tech Circuit brush library, G5; previously: G5: built-in Weather Icons symbol library (Sun, Moon, Cloud, Rain, Thunder, Snow); estimate 5–15 → 4–14 h; previously: 3D: the seams of white-light Extrude & Bevel, Inflate and Rotate, and the face seams of the 3D (Classic) effects, have round joins instead of miters; previously: PDF import: preserve Type 3 font text runs as named groups , or as live text in TextAs::Text mode if ToUnicode exists on non-colour fonts (TextAs::Outlines produces grouped outlines), #6740; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: oversized editing artboard import; Glyphs panel: Alternates for Current Selection applies an OpenType feature value (`salt=2`) to the selected letter alone, so an Arabic word stays joined, and Entire Font lists the unencoded glyphs, #5514; #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: G5: built-in Energy Beams brush library; estimate 5–15 → 4–14 h; previously minor: G5: built-in Skill Icons symbol library; estimate 6–16 → 5–15 h; previously minor: ruler double-click adds a guide at the pointer, #5239; G5: built-in Status Effects graphic style library; estimate 7–17 → 6–16 h; MCP docs catch-up for UI Frames and Map Markers; previously minor: G5: built-in Inventory Icons symbol library; estimate 8–18 → 7–17 h; previously minor: G9: `.ai` save names a variable font instance's design-space setting, #6388; previously minor: G5: built-in Game Trails brush library; estimate 9–19 → 8–18 h; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: docs tidy-up, no content change: stray notes at the top moved into the revision table; scores and estimates unchanged; previously minor: G5: built-in Game HUD graphic style library; estimate 10–20 → 9–19 h; previously minor: G5: built-in Map Markers symbol library; estimate 11–21 → 10–20 h; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview; estimate 1–2 h → 0; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: built-in UI Frames symbol library with default 9-slice; estimate 11–21 h; previously minor: G5: dynamic symbol part on-canvas takes opacity, blend, gradient and pattern; docs Overlap/auto-corners sync; estimate 12–22 h; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap, Pattern brush auto corners and Global Edit Shift-click leave-out moved from Missing to Done (code already shipped); previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; G9: EPS gradients drawn as abutting strips import as one gradient, without seams; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; opening a slow file shows a progress window, part of #5930; Hindi catalog and contributor loanword preferences; agent wording pass complete; wider native proofreading welcome; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); scores and estimates unchanged; a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window; scores and estimates unchanged; large images in CMYK documents are shrunk before they are separated into ink planes (#4155); scores and estimates unchanged; `.ai` paths with a Calligraphic brush open brushed, with the 6D Art Pen's channels, and Windows reads the pen's tilt and barrel rotation, #372; scores and estimates unchanged; Compound Shapes add-on, beyond Illustrator; scores and estimates unchanged; Contour add-on, beyond Illustrator; scores and estimates unchanged; a slow first frame is waited for instead of restarting without the graphics adapter, and the menu bar no longer waits for the installed fonts' scan; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-16 · **Change:** minor (Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: G4 type: modal Check Spelling dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: Type: the Middle Eastern & South Asian composers are done as a per-paragraph choice with the Standard composers (#4935); G5: built-in Neon & Glow graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); estimate unchanged (3–13 h); previously: Tech Circuit brush library, G5; previously: G5: built-in Weather Icons symbol library (Sun, Moon, Cloud, Rain, Thunder, Snow); estimate 5–15 → 4–14 h; previously: 3D: the seams of white-light Extrude & Bevel, Inflate and Rotate, and the face seams of the 3D (Classic) effects, have round joins instead of miters; previously: PDF import: preserve Type 3 font text runs as named groups , or as live text in TextAs::Text mode if ToUnicode exists on non-colour fonts (TextAs::Outlines produces grouped outlines), #6740; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: oversized editing artboard import; Glyphs panel: Alternates for Current Selection applies an OpenType feature value (`salt=2`) to the selected letter alone, so an Arabic word stays joined, and Entire Font lists the unencoded glyphs, #5514; #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: G5: built-in Energy Beams brush library; estimate 5–15 → 4–14 h; previously minor: G5: built-in Skill Icons symbol library; estimate 6–16 → 5–15 h; previously minor: ruler double-click adds a guide at the pointer, #5239; G5: built-in Status Effects graphic style library; estimate 7–17 → 6–16 h; MCP docs catch-up for UI Frames and Map Markers; previously minor: G5: built-in Inventory Icons symbol library; estimate 8–18 → 7–17 h; previously minor: G9: `.ai` save names a variable font instance's design-space setting, #6388; previously minor: G5: built-in Game Trails brush library; estimate 9–19 → 8–18 h; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: docs tidy-up, no content change: stray notes at the top moved into the revision table; scores and estimates unchanged; previously minor: G5: built-in Game HUD graphic style library; estimate 10–20 → 9–19 h; previously minor: G5: built-in Map Markers symbol library; estimate 11–21 → 10–20 h; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview; estimate 1–2 h → 0; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: built-in UI Frames symbol library with default 9-slice; estimate 11–21 h; previously minor: G5: dynamic symbol part on-canvas takes opacity, blend, gradient and pattern; docs Overlap/auto-corners sync; estimate 12–22 h; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap, Pattern brush auto corners and Global Edit Shift-click leave-out moved from Missing to Done (code already shipped); previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; G9: EPS gradients drawn as abutting strips import as one gradient, without seams; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; opening a slow file shows a progress window, part of #5930; Hindi catalog and contributor loanword preferences; agent wording pass complete; wider native proofreading welcome; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); scores and estimates unchanged; a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window; scores and estimates unchanged; large images in CMYK documents are shrunk before they are separated into ink planes (#4155); scores and estimates unchanged; `.ai` paths with a Calligraphic brush open brushed, with the 6D Art Pen's channels, and Windows reads the pen's tilt and barrel rotation, #372; scores and estimates unchanged; Compound Shapes add-on, beyond Illustrator; scores and estimates unchanged; Contour add-on, beyond Illustrator; scores and estimates unchanged; a slow first frame is waited for instead of restarting without the graphics adapter, and the menu bar no longer waits for the installed fonts' scan; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) ## Feature submission evidence @@ -34,7 +34,6 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| -| 2026-11-17 | minor | G5: Nature Icons adds five original procedural vector symbols (Leaf, Flower, Tree, Mountain and Wave); seven built-in symbol libraries. G5 remaining estimate 3–13 h (estimated); parity scores and headline totals unchanged. | | 2026-11-16 | minor | G1: Recolor Artwork - native Lab entry in Color Picker, swatch libraries access in Color Picker, and row right-click context menu ("Pick from Swatches", "Limit to Library") (#4028); scores and estimates unchanged. | | 2026-11-15 | minor | G4 type: modal Check Spelling dialog (Edit › Spelling › Check Spelling…, `ui.checkSpelling`, #4936) with Not in Dictionary sentence context, suggestions, Ignore, Ignore All, Change, Change All, Add to Dictionary, Done/Cancel, keyboard navigation, and one-step Undo/Redo; spell check complete; scores and estimates unchanged. | | 2026-11-15 | minor | G5: Neon & Glow joins Shadows and Glows, Outlines and Rules, Hand-Drawn, Textures, Painted and Sketched, Gradient Finishes, Shape Effects, Blends and Transparency, Game HUD and Status Effects as an eleventh built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor; original procedural styles generated in code); estimate unchanged (3–13 h). | diff --git a/docs/roadmap.md b/docs/roadmap.md index 9a3c4f612c..258b86d04a 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -1,6 +1,6 @@ # Roadmap: milestones and what's next -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-17 · **Change:** minor (M10/G5: Nature Icons adds five original vector symbols; estimate and parity scores unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview are in; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; M4/M7: `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; M4/M7: `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; Hindi catalog and contributor loanword preferences; full wording review in progress; Effect dialogs: a colour swatch beside a hex colour opens the Color Picker, #5365; shape tools move the selection from its centre point and turn it from the zone outside a box corner, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-17 · **Change:** minor (PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview are in; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; M4/M7: `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; M4/M7: `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; Hindi catalog and contributor loanword preferences; full wording review in progress; Effect dialogs: a colour swatch beside a hex colour opens the Color Picker, #5365; shape tools move the selection from its centre point and turn it from the zone outside a box corner, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) > > Oversized artboard import update (2026-11-12): Explicit editing-data import retains a single artboard beyond a capped 14,400 pt PDF page (#6865). > @@ -212,7 +212,6 @@ not take the artwork yet. Overflow-menu drag remains separate. Scores and hours | Date | Change | Summary | |---|---|---| -| 2026-11-17 | minor | M10/G5: Nature Icons adds Leaf, Flower, Tree, Mountain and Wave as five original procedural vector symbols; seven built-in symbol libraries. G5 estimate and parity scores unchanged. | | 2026-11-17 | minor | PDF import (#8300): a glyph filled only (text rendering mode 0) right after one filled and stroked (mode 2) joined the stroked run and came in stroked too: `2 Tr (B) Tj 0 Tr (C) Tj` came in as `BC` stroked throughout. A glyph filled only now joins only a run drawn alike, so it starts a run of its own, filled only, in the same type object, and takes a stroke only when the file draws one over it (the #8015 matching); a word filled whole then stroked whole, and fill and stroke rendering glyph by glyph, still come in as one run filled and stroked. Tests: `a_glyph_filled_only_after_one_filled_and_stroked_is_not_stroked`, `glyphs_filled_and_stroked_one_by_one_stay_one_run`; scores and estimates unchanged. | | 2026-11-17 | minor | PDF import (#8015 follow-up): type filled and stroked at less than full opacity is no longer joined into one type object, since the file composites the fill and the stroke apiece, darker where they overlap, while one object's opacity applies to both together; it stays a filled object and a stroked one, as a fill and stroke at different opacities already did. An upright glyph (vertical type) filled and stroked is no longer kept as an outline for a line that comes in as its outlines, as glyphs filled only weren't, so such a line can't lose them. The #8015 entries now say what is left: translucent type filled and stroked, and a `TJ` whose kerning starts a new line part way through, still come in as two objects. Tests: `translucent_fill_and_stroke_text_stays_two_objects`, `a_vertical_line_with_one_glyph_filled_and_stroked_keeps_every_glyph_filled`; scores and estimates unchanged. | | 2026-11-16 | minor | PDF import: fill and stroke rendering (text rendering modes 2 and 6) draws all the glyphs of a text-showing operator (`Tj`, `TJ`, `'`, `"`) filled, then the same glyphs stroked, so a word shown at once came in as two type objects: a stroke-only copy over a fill-only one. Each stroke is now matched, in order, to the glyph filled with the same placement (where, how large, how wide, slanted and turned) in the same font with the same text on the line, and only that glyph takes the stroke, so the word comes in as one type object, filled and stroked; glyphs stroked with another join part way through still split into runs of their own, and stroked type over no filled glyph (modes 1 and 5) stays stroke only (#8015; `a_word_filled_then_stroked_imports_as_one_filled_and_stroked_type` in `crates/pdf/src/tests/textstroke.rs`, `a_vertical_column_filled_then_stroked_is_one_filled_and_stroked_type` in `crates/pdf/src/tests/text_placement.rs`). Scores and estimates unchanged. | diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 6fed68d272..ac08f9eae9 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -575,7 +575,7 @@ since 2026-10-01. | **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` (and legacy version 7 `.ai` out, keeping layers, groups and type as text), 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 | -| **Bundled content:** brush, symbol, style and swatch libraries | ~46% | Ours are original and generated in code, and far fewer than Illustrator ships; symbol libraries have seven (Basic Shapes, UI Frames with default 9-slice, Map Markers, Inventory Icons, Skill Icons, Weather Icons, Nature Icons), graphic style libraries eleven (including Game HUD, Status Effects and Neon & Glow) and brush libraries ten (Art Ribbons, Ink and Wash, Calligraphic Nibs, Bristle Brushes, Pattern Borders, Scatter Shapes, Game Trails, Energy Beams, Dry Media, Tech Circuit) beside User Defined and Other Library… | +| **Bundled content:** brush, symbol, style and swatch libraries | ~46% | Ours are original and generated in code, and far fewer than Illustrator ships; symbol libraries have six (Basic Shapes, UI Frames with default 9-slice, Map Markers, Inventory Icons, Skill Icons, Weather Icons), graphic style libraries eleven (including Game HUD, Status Effects and Neon & Glow) and brush libraries ten (Art Ribbons, Ink and Wash, Calligraphic Nibs, Bristle Brushes, Pattern Borders, Scatter Shapes, Game Trails, Energy Beams, Dry Media, Tech Circuit) beside User Defined and Other Library… | | **Performance** | unverified | Multithreaded, off-thread rendering and caches are in place. The last budget run (2026-10-01, loaded machine) measured 290 ms for a 50k-path fit against a 16 ms budget. Re-run `vectorcraft-cli perf` on an idle machine | | **Robustness** | good, new | ~2,840 tests, property tests, no panics in shipped code (lints, the `guard` safety net, import fuzzing), Data Recovery. Missing: a corpus of real-world files, Windows/Linux/browser QA | | **Platforms and 1.0 polish** | ~60% | The macOS app and the web build work, and Finder opens every readable format with the macOS app (#295, #354); on macOS the menus are in the system menu bar, laid out as a Mac app's, with the in-window menus as a fallback (`--in-window-menus`; verified on Windows and by cross-compilation, not yet by hand on a Mac); hybrid-graphics laptops render on the power-saving GPU by default on Windows and macOS (#306), and Windows starts on Direct3D 12, falling back to OpenGL, and loads no Vulkan driver unless `WGPU_BACKEND` asks for it (#545: Vulkan flickered black on an Intel GPU, DX12 and OpenGL didn't; #806: a faulty Vulkan driver crashed the app before its window appeared; verified by unit tests and the reporter's runs with `WGPU_BACKEND`), and Linux on the GPU the desktop runs on, since a Wayland compositor may refuse frames from the other one; a window that fails on its GPU while starting up starts again on the next one instead of crashing (#502; the dual-GPU Wayland case is verified by unit tests and cross-compilation, not on such hardware); web drops land in the document they were dropped on (#359); desktop drops carry no pointer position (winit 0.30), so a dropped document opens as a tab of its own and a picture or text is placed in the middle of the view, while the web places anything dropped on the canvas and opens what is dropped off it, as Illustrator does (#472); a web page that loses its WebGPU device or WebGL context restarts its graphics with the same documents (#369); on Linux/Wayland the clipboard reads the compositor's own (data-control) and copied image files paste, but files can't be dropped on the window under native Wayland until eframe moves to winit 0.31 (#398; the Wayland side is verified by compilation only), so Preferences › Performance › Linux Display Server › X11 (XWayland) opens the window through XWayland, where drops work (#1151; verified by unit tests and cross-compilation, not on a Wayland desktop); on Linux the Paste menu checks the system clipboard on a background thread, so a clipboard owner that never answers no longer freezes the window, while Windows and macOS keep their quick in-line check (#510; the X11 hang verified by the contributor, here by headless tests); on KDE Plasma 6.3+ under Wayland, pens and pen displays reach the app only under XWayland (`WAYLAND_DISPLAY=`) or with KWin's `KWIN_WAYLAND_EMULATE_TABLET=1`, since winit 0.30 has no Wayland tablet input (#491, not verified on hardware); Windows/Linux packaging and accessibility are pending | From 895f17fdaca0a156dcee0b5239b65de2cff55e49 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 17 Nov 2026 10:35:25 -0800 Subject: [PATCH 19/49] Brushes: Add original Ornamental library --- crates/engine/src/cmd/brushlib.rs | 47 +++++++++++++++++++ crates/engine/src/tests/brushlib.rs | 39 +++++++++++++-- crates/ui-egui/src/i18n/bg.tsv | 5 ++ crates/ui-egui/src/i18n/bs.tsv | 5 ++ crates/ui-egui/src/i18n/ca.tsv | 5 ++ crates/ui-egui/src/i18n/cs.tsv | 5 ++ crates/ui-egui/src/i18n/da.tsv | 5 ++ crates/ui-egui/src/i18n/de.tsv | 5 ++ crates/ui-egui/src/i18n/el.tsv | 5 ++ crates/ui-egui/src/i18n/es.tsv | 5 ++ crates/ui-egui/src/i18n/fi.tsv | 5 ++ crates/ui-egui/src/i18n/fr.tsv | 5 ++ crates/ui-egui/src/i18n/gu.tsv | 5 ++ crates/ui-egui/src/i18n/hi.tsv | 5 ++ crates/ui-egui/src/i18n/hu.tsv | 5 ++ crates/ui-egui/src/i18n/id.tsv | 5 ++ crates/ui-egui/src/i18n/it.tsv | 5 ++ crates/ui-egui/src/i18n/ja.tsv | 5 ++ crates/ui-egui/src/i18n/ka.tsv | 5 ++ crates/ui-egui/src/i18n/ko.tsv | 5 ++ crates/ui-egui/src/i18n/nl.tsv | 5 ++ crates/ui-egui/src/i18n/pl.tsv | 5 ++ crates/ui-egui/src/i18n/pt-br.tsv | 5 ++ crates/ui-egui/src/i18n/ru.tsv | 5 ++ crates/ui-egui/src/i18n/sv.tsv | 5 ++ crates/ui-egui/src/i18n/tests.rs | 3 +- crates/ui-egui/src/i18n/tr.tsv | 5 ++ crates/ui-egui/src/i18n/uk.tsv | 5 ++ crates/ui-egui/src/i18n/vi.tsv | 5 ++ crates/ui-egui/src/i18n/zh-hans.tsv | 5 ++ crates/ui-egui/src/i18n/zh-hant.tsv | 5 ++ .../src/panels/tests_brush_libraries.rs | 12 +++++ docs/mcp.md | 4 +- docs/target-app-parity.md | 1 + 34 files changed, 240 insertions(+), 6 deletions(-) diff --git a/crates/engine/src/cmd/brushlib.rs b/crates/engine/src/cmd/brushlib.rs index 34becd7c02..dea614eb6b 100644 --- a/crates/engine/src/cmd/brushlib.rs +++ b/crates/engine/src/cmd/brushlib.rs @@ -174,6 +174,7 @@ pub const BUILTIN: &[BuiltinBrushLibrary] = &[ BuiltinBrushLibrary { id: "calligraphic-nibs", name: "Calligraphic Nibs", make: calligraphic_nibs }, BuiltinBrushLibrary { id: "bristle-brushes", name: "Bristle Brushes", make: bristle_brushes }, BuiltinBrushLibrary { id: "pattern-borders", name: "Pattern Borders", make: pattern_borders }, + BuiltinBrushLibrary { id: "ornamental", name: "Ornamental", make: ornamental }, BuiltinBrushLibrary { id: "scatter-shapes", name: "Scatter Shapes", make: scatter_shapes }, BuiltinBrushLibrary { id: "game-trails", name: "Game Trails", make: game_trails }, BuiltinBrushLibrary { id: "energy-beams", name: "Energy Beams", make: energy_beams }, @@ -475,6 +476,52 @@ fn pattern_borders() -> BrushLibrary { built("Pattern Borders", Document::new(100.0, 100.0), brushes) } +/// Ornamental: one-pass flourishes and arrow accents that stretch with the path rather than +/// repeating a pattern tile. Every shape is original filled vector art. +fn ornamental() -> BrushLibrary { + let scrollwork = group(vec![ + black(band(100.0, 1.2, 64, |x| 2.6 * (x / 100.0 * std::f64::consts::TAU).sin())), + ring(Point::new(7.0, 0.0), 4.0, 2.0), + ring(Point::new(93.0, 0.0), 4.0, 2.0), + black(polygon(&[(28.0, 1.0), (34.0, -5.0), (40.0, -3.0), (33.0, 2.0)])), + black(polygon(&[(60.0, 3.0), (66.0, 5.0), (72.0, -1.0), (67.0, -2.0)])), + ]); + let arrow = group(vec![ + black(shapes::rectangle(Rect::new(4.0, -0.7, 84.0, 0.7))), + black(polygon(&[(80.0, -6.5), (100.0, 0.0), (80.0, 6.5), (85.0, 0.0)])), + ring(Point::new(7.0, 0.0), 4.0, 1.7), + black(polygon(&[(25.0, -0.4), (31.0, -4.4), (37.0, -2.0), (31.0, 0.8)])), + black(polygon(&[(43.0, 0.4), (49.0, 4.4), (55.0, 2.0), (49.0, -0.8)])), + ]); + let mut petals = vec![black(band(100.0, 1.0, 48, |x| 1.8 * (x / 100.0 * std::f64::consts::PI).sin()))]; + for x in [19.0, 43.0, 67.0, 87.0] { + let y = 1.8 * (x / 100.0 * std::f64::consts::PI).sin(); + petals.push(black(shapes::ellipse(Rect::new(x - 4.5, y - 7.5, x + 4.5, y - 0.3)))); + petals.push(black(shapes::ellipse(Rect::new(x - 3.5, y + 0.3, x + 3.5, y + 5.5)))); + } + let petal_sweep = group(petals); + let twin_curl = group(vec![ + black(band(100.0, 0.9, 64, |x| -3.8 + 1.6 * (x / 100.0 * 2.0 * std::f64::consts::TAU).sin())), + black(band(100.0, 0.9, 64, |x| 3.8 - 1.6 * (x / 100.0 * 2.0 * std::f64::consts::TAU).sin())), + ring(Point::new(8.0, -3.8), 3.0, 1.5), + ring(Point::new(92.0, 3.8), 3.0, 1.5), + ]); + let ornament = |name: &str, art: Node| Brush { + name: name.into(), + kind: BrushKind::Art(ArtBrush { art, width: 300.0, colorization: Colorization::Tints, ..Default::default() }), + }; + built( + "Ornamental", + Document::new(100.0, 100.0), + vec![ + ornament("Scrollwork", scrollwork), + ornament("Filigree Arrow", arrow), + ornament("Petal Sweep", petal_sweep), + ornament("Twin Curl", twin_curl), + ], + ) +} + fn scatter(name: &str, art: Node, s: Scatter) -> Brush { Brush { name: name.into(), kind: BrushKind::Scatter(Scatter { art, ..s }) } } diff --git a/crates/engine/src/tests/brushlib.rs b/crates/engine/src/tests/brushlib.rs index 4f0b739951..a29aaf2f6b 100644 --- a/crates/engine/src/tests/brushlib.rs +++ b/crates/engine/src/tests/brushlib.rs @@ -112,6 +112,7 @@ fn the_builtin_libraries_are_original_brushes_generated_in_code() { "calligraphic-nibs", "bristle-brushes", "pattern-borders", + "ornamental", "scatter-shapes", "game-trails", "energy-beams", @@ -131,19 +132,19 @@ fn the_builtin_libraries_are_original_brushes_generated_in_code() { trails["brushes"].as_array().unwrap().iter().map(|b| b["name"].as_str().unwrap()).collect::>(), ["Speed Line", "Dash Trail", "Burst Ray", "Zigzag"] ); - assert_eq!(libs[6]["count"].as_u64(), Some(4)); + assert_eq!(libs[7]["count"].as_u64(), Some(4)); let beams = run(&mut s, "brush.library", json!({"library": "energy-beams"})); assert_eq!( beams["brushes"].as_array().unwrap().iter().map(|b| b["name"].as_str().unwrap()).collect::>(), ["Laser Bolt", "Plasma Arc", "Charge Wave", "Spark Trail"] ); - assert_eq!(libs[7]["count"].as_u64(), Some(4)); + assert_eq!(libs[8]["count"].as_u64(), Some(4)); let dry = run(&mut s, "brush.library", json!({"library": "Dry Media"})); assert_eq!( dry["brushes"].as_array().unwrap().iter().map(|b| (b["name"].as_str().unwrap(), b["type"].as_str().unwrap())).collect::>(), [("Chalk Grain", "art"), ("Graphite Pencil", "art"), ("Wax Crayon", "art"), ("Charcoal Dust", "art")] ); - assert_eq!((libs[8]["name"].as_str(), libs[8]["count"].as_u64()), (Some("Dry Media"), Some(4))); + assert_eq!((libs[9]["name"].as_str(), libs[9]["count"].as_u64()), (Some("Dry Media"), Some(4))); run(&mut s, "file.new", json!({"width": 200, "height": 200})); let id = run(&mut s, "shape.rectangle", json!({"x": 10, "y": 20, "width": 40, "height": 8}))["id"].as_u64().unwrap(); let added = run(&mut s, "brush.addFromLibrary", json!({"library": "energy-beams", "name": "Laser Bolt", "apply": true, "ids": [id]})); @@ -156,6 +157,7 @@ fn the_builtin_libraries_are_original_brushes_generated_in_code() { ("calligraphic-nibs", "calligraphic"), ("bristle-brushes", "bristle"), ("pattern-borders", "pattern"), + ("ornamental", "art"), ("scatter-shapes", "scatter"), ("game-trails", "art"), ("energy-beams", "art"), @@ -299,6 +301,37 @@ fn the_tech_circuit_library_constructs_adds_and_applies_each_brush() { assert_eq!(vectorcraft_brush::library(&reopened), lib.brushes); } +#[test] +fn ornamental_brushes_draw_flourishes_and_survive_a_saved_library() { + let mut s = session(); + let (_, lib) = cmd::brushlib::library(&s, "Ornamental").unwrap(); + let names = ["Scrollwork", "Filigree Arrow", "Petal Sweep", "Twin Curl"]; + assert_eq!(lib.brushes.iter().map(|b| b.name.as_str()).collect::>(), names); + let path = run(&mut s, "shape.line", json!({"x1": 10, "y1": 40, "x2": 190, "y2": 40}))["id"].as_u64().unwrap(); + let mut curve = line_to(20.0); + curve.curve_to((60.0, -25.0), (140.0, 25.0), (180.0, 0.0)); + for b in &lib.brushes { + let BrushKind::Art(art) = &b.kind else { panic!("{} is not an art brush", b.name) }; + assert_eq!(art.colorization, vectorcraft_brush::Colorization::Tints); + assert_eq!(art.width, 300.0); + for line in [line_to(2.0), line_to(180.0), curve.clone()] { + let pieces = vectorcraft_brush::stroke_pieces(&lib.doc, b, &line, &black_stroke()); + let points = anchors(&pieces.iter().collect::>()); + assert!(!points.is_empty() && points.iter().all(|p| p.x.is_finite() && p.y.is_finite()), "{}", b.name); + } + let before = undo_len(&s); + let added = run(&mut s, "brush.addFromLibrary", json!({"library": "ornamental", "name": b.name, "apply": true, "ids": [path]})); + assert_eq!(strs(&added["added"]), [b.name.as_str()]); + assert_eq!(added["applied"], json!([path])); + assert_eq!(undo_len(&s), before + 1); + assert_eq!(doc(&s).node(NodeId(path)).unwrap().appearance.stroke().unwrap().brush.as_deref(), Some(b.name.as_str())); + } + let saved = run(&mut s, "brush.saveLibrary", json!({"names": names})); + let bytes = vectorcraft_format::base64_decode(saved["dataBase64"].as_str().unwrap()).unwrap(); + let reopened = vectorcraft_format::load(&bytes).unwrap(); + assert_eq!(vectorcraft_brush::library(&reopened), lib.brushes); +} + /// Ink and Wash: a tapered ink art brush, a brush pen whose size follows the pen pressure and two /// translucent washes, with names of their own and a few paths of art each. #[test] diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index bb039bb08e..445a667bdd 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -7237,3 +7237,8 @@ breakText Glyphs Глифи @msg A fold line is on a non-printing layer. Линия на сгъване е на слой, който не се печата. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Панели: {panels}, панти: {hinges}, грешки: {errors}, предупреждения: {warnings} @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer трябва да е "singleLine", "everyLine", "standardSingleLine" или "standardEveryLine" + Ornamental Орнаментални + Scrollwork Завитък + Filigree Arrow Филигранна стрела + Petal Sweep Венчелистен замах + Twin Curl Двоен завитък diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index 99f23d313c..28fac7e7ef 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -7291,3 +7291,8 @@ shape Open Otvoren @msg A fold line is on a non-printing layer. Linija savijanja je na sloju koji se ne štampa. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Paneli: {panels}, šarke: {hinges}, greške: {errors}, upozorenja: {warnings} @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer mora biti "singleLine", "everyLine", "standardSingleLine" ili "standardEveryLine" + Ornamental Ornamentalno + Scrollwork Ukrasni zavoj + Filigree Arrow Filigranska strelica + Petal Sweep Potez latica + Twin Curl Dvostruki zavoj diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index c54311799d..b1238d92d0 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -8126,3 +8126,8 @@ breakText Glyphs Glifs @msg A fold line is on a non-printing layer. Una línia de plegat és en una capa que no s’imprimeix. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panells: {panels}, frontisses: {hinges}, errors: {errors}, avisos: {warnings} @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer ha de ser "singleLine", "everyLine", "standardSingleLine" o "standardEveryLine" + Ornamental Ornamental + Scrollwork Voluta + Filigree Arrow Fletxa de filigrana + Petal Sweep Traç de pètals + Twin Curl Voluta doble diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index a5d7bb948a..21bf4767ab 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -9917,3 +9917,8 @@ breakText Glyphs Glyfy @msg A panel is not joined to the rest by a crease. Panel není se zbytkem spojen žádnou linií bigu. @msg A fold line is on a non-printing layer. Linie skladu je na netisknutelné vrstvě. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panely: {panels}, panty: {hinges}, chyby: {errors}, upozornění: {warnings} + Ornamental Ornamentální + Scrollwork Rozvilina + Filigree Arrow Filigránový šíp + Petal Sweep Tah okvětních lístků + Twin Curl Dvojitá rozvilina diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index 08100f593f..d10d6f40eb 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -10025,3 +10025,8 @@ breakText Glyphs Glyffer @msg A fold line is on a non-printing layer. En foldelinje ligger på et lag, der ikke udskrives. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Paneler: {panels}, hængsler: {hinges}, fejl: {errors}, advarsler: {warnings} @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer skal være "singleLine", "everyLine", "standardSingleLine" eller "standardEveryLine" + Ornamental Ornamentik + Scrollwork Slyngværk + Filigree Arrow Filigranpil + Petal Sweep Kronbladssvirp + Twin Curl Dobbelt slyng diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 10147b2d45..aa68d5f1b9 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -9516,3 +9516,8 @@ breakText Glyphs Glyphen @msg A panel is not joined to the rest by a crease. Ein Feld ist durch keine Rilllinie mit den übrigen verbunden. @msg A fold line is on a non-printing layer. Eine Faltlinie liegt auf einer nicht druckbaren Ebene. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Felder: {panels}, Scharniere: {hinges}, Fehler: {errors}, Warnungen: {warnings} + Ornamental Ornamental + Scrollwork Schnörkel + Filigree Arrow Filigranpfeil + Petal Sweep Blütenblattschwung + Twin Curl Doppelschnörkel diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 1ebf6e5684..aa7449fac5 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -8100,3 +8100,8 @@ breakText Glyphs Γλύφοι @msg A fold line is on a non-printing layer. Μια γραμμή δίπλωσης βρίσκεται σε επίπεδο που δεν εκτυπώνεται. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Πάνελ: {panels}, μεντεσέδες: {hinges}, σφάλματα: {errors}, προειδοποιήσεις: {warnings} @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" το composer πρέπει να είναι "singleLine", "everyLine", "standardSingleLine" ή "standardEveryLine" + Ornamental Διακοσμητικά μοτίβα + Scrollwork Σπείρα + Filigree Arrow Φιλιγκράν βέλος + Petal Sweep Καμπύλη πετάλων + Twin Curl Διπλή σπείρα diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index a456910a16..4169bd32f7 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -8087,3 +8087,8 @@ breakText Glyphs Glifos @msg A fold line is on a non-printing layer. Una línea de plegado está en una capa que no se imprime. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Paneles: {panels}, bisagras: {hinges}, errores: {errors}, advertencias: {warnings} @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer debe ser "singleLine", "everyLine", "standardSingleLine" o "standardEveryLine" + Ornamental Ornamental + Scrollwork Voluta + Filigree Arrow Flecha de filigrana + Petal Sweep Trazo de pétalos + Twin Curl Voluta doble diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index bff46fc0d7..800965e310 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -8183,3 +8183,8 @@ breakText Glyphs Merkit @msg A fold line is on a non-printing layer. Taittoviiva on tasolla, jota ei tulosteta. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Paneelit: {panels}, saranat: {hinges}, virheet: {errors}, varoitukset: {warnings} @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer on oltava "singleLine", "everyLine", "standardSingleLine" tai "standardEveryLine" + Ornamental Koristekuviot + Scrollwork Kiemura + Filigree Arrow Filigraanin nuoli + Petal Sweep Terälehtipyyhkäisy + Twin Curl Kaksoiskiemura diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 3be3497f97..6fbb483a76 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -9902,3 +9902,8 @@ breakText Glyphs Glyphes @msg A fold line is on a non-printing layer. Une ligne de pliage se trouve sur un calque non imprimable. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} {panels} panneau(x), {hinges} charnière(s), {errors} erreur(s), {warnings} avertissement(s) @msg {_1} × {_2} pixels is too large for GIF (at most 65535 pixels a side): lower the resolution {_1} × {_2} pixels, c’est trop grand pour le GIF (65535 pixels par côté au plus) : réduisez la résolution + Ornamental Ornemental + Scrollwork Volute + Filigree Arrow Flèche filigrane + Petal Sweep Courbe de pétales + Twin Curl Double volute diff --git a/crates/ui-egui/src/i18n/gu.tsv b/crates/ui-egui/src/i18n/gu.tsv index c427fc527c..7ea119a3ea 100644 --- a/crates/ui-egui/src/i18n/gu.tsv +++ b/crates/ui-egui/src/i18n/gu.tsv @@ -4987,3 +4987,8 @@ swatch [Registration] [રજિસ્ટ્રેશન] Standard Single-line Composer સ્ટાન્ડર્ડ સિંગલ-લાઇન કમ્પોઝર Standard Every-line Composer સ્ટાન્ડર્ડ એવરી-લાઇન કમ્પોઝર @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer આમાંથી એક હોવું જોઈએ: "singleLine", "everyLine", "standardSingleLine" અથવા "standardEveryLine" + Ornamental અલંકારિક + Scrollwork વળાંકવાળી સજાવટ + Filigree Arrow નાજુક કોતરણીવાળું તીર + Petal Sweep પાંખડીઓનો વળાંક + Twin Curl બેવડો વળાંક diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index cbfb4f51d1..371084c7f6 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -9524,3 +9524,8 @@ theme Appearance अपीयरेंस @msg A panel is not joined to the rest by a crease. कोई पैनल किसी क्रीज़ लाइन से बाकी से जुड़ा नहीं है। @msg A fold line is on a non-printing layer. एक फ़ोल्ड लाइन नॉन-प्रिंटिंग लेयर पर है। @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} पैनल: {panels}, हिंज: {hinges}, एरर: {errors}, वॉर्निंग: {warnings} + Ornamental अलंकरण + Scrollwork अलंकारी घुमाव + Filigree Arrow जालीदार तीर + Petal Sweep पंखुड़ियों का घुमाव + Twin Curl दोहरा घुमाव diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 0f81a72036..13af1123ab 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -9905,3 +9905,8 @@ breakText Glyphs Glifák @msg A panel is not joined to the rest by a crease. Egy panelt egyetlen bigvonal sem köt a többihez. @msg A fold line is on a non-printing layer. Egy hajtásvonal nem nyomtatható rétegen van. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panelek: {panels}, zsanérok: {hinges}, hibák: {errors}, figyelmeztetések: {warnings} + Ornamental Díszítőmotívumok + Scrollwork Kacskaringó + Filigree Arrow Filigrán nyíl + Petal Sweep Sziromív + Twin Curl Kettős kacskaringó diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index 28ea2b5ab3..eb146493e5 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -7252,3 +7252,8 @@ breakText Glyphs Glif @msg A fold line is on a non-printing layer. Sebuah garis lipat berada di lapisan yang tidak dicetak. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panel: {panels}, engsel: {hinges}, galat: {errors}, peringatan: {warnings} @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer harus "singleLine", "everyLine", "standardSingleLine", atau "standardEveryLine" + Ornamental Ornamental + Scrollwork Sulur Hias + Filigree Arrow Panah Filigran + Petal Sweep Sapuan Kelopak + Twin Curl Sulur Ganda diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 8f2ed3216c..85c89f0a5f 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -9550,3 +9550,8 @@ breakText Glyphs Glifi @msg A panel is not joined to the rest by a crease. Un pannello non è unito al resto da alcuna linea di cordonatura. @msg A fold line is on a non-printing layer. Una linea di piega si trova su un livello non stampabile. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Pannelli: {panels}, cerniere: {hinges}, errori: {errors}, avvisi: {warnings} + Ornamental Ornamentale + Scrollwork Voluta + Filigree Arrow Freccia filigranata + Petal Sweep Tratto a petali + Twin Curl Doppia voluta diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index c429f204a1..91690383a5 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -9617,3 +9617,8 @@ breakText Glyphs 字形 @msg A panel is not joined to the rest by a crease. パネルがどの筋入れ線でも他とつながっていません。 @msg A fold line is on a non-printing layer. 折り線が印刷しないレイヤーにあります。 @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} パネル: {panels}、ヒンジ: {hinges}、エラー: {errors}、警告: {warnings} + Ornamental 装飾模様 + Scrollwork スクロール装飾 + Filigree Arrow フィリグリーの矢 + Petal Sweep 花びらの流線 + Twin Curl 二重カール diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 414f45171c..a1aeb1b000 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -10285,3 +10285,8 @@ font-script Japanese იაპონური @msg A fold line is on a non-printing layer. მოკეცვის ხაზი არაბეჭდვად შრეზეა. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} პანელები: {panels}, ანჯამები: {hinges}, შეცდომები: {errors}, გაფრთხილებები: {warnings} @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer უნდა იყოს "singleLine", "everyLine", "standardSingleLine" ან "standardEveryLine" + Ornamental ორნამენტული + Scrollwork ხვეული + Filigree Arrow ფილიგრანული ისარი + Petal Sweep ფურცლების რკალი + Twin Curl ორმაგი ხვეული diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index dbda53243f..4a73e2b033 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -9514,3 +9514,8 @@ breakText Glyphs 글리프 @msg A panel is not joined to the rest by a crease. 패널이 어떤 오시선으로도 나머지와 연결되어 있지 않습니다. @msg A fold line is on a non-printing layer. 접는 선이 인쇄되지 않는 레이어에 있습니다. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} 패널: {panels}, 힌지: {hinges}, 오류: {errors}, 경고: {warnings} + Ornamental 장식 문양 + Scrollwork 소용돌이 장식 + Filigree Arrow 세공 화살표 + Petal Sweep 꽃잎 곡선 + Twin Curl 이중 소용돌이 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 69aef91cfc..cdcfea3bd8 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -9953,3 +9953,8 @@ breakText Glyphs Glyphs @msg A panel is not joined to the rest by a crease. Een paneel is door geen rillijn met de rest verbonden. @msg A fold line is on a non-printing layer. Een vouwlijn staat op een laag die niet wordt afgedrukt. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panelen: {panels}, scharnieren: {hinges}, fouten: {errors}, waarschuwingen: {warnings} + Ornamental Ornamentaal + Scrollwork Krulwerk + Filigree Arrow Filigraanpijl + Petal Sweep Bloemblaadjeszwaai + Twin Curl Dubbele krul diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 0147515ffe..e398daaa06 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -9770,3 +9770,8 @@ breakText Glyphs Glify @msg A panel is not joined to the rest by a crease. Panel nie jest połączony z resztą żadną linią bigowania. @msg A fold line is on a non-printing layer. Linia zgięcia znajduje się na warstwie niedrukowanej. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panele: {panels}, zawiasy: {hinges}, błędy: {errors}, ostrzeżenia: {warnings} + Ornamental Ornamentalne + Scrollwork Zawijas + Filigree Arrow Filigranowa strzałka + Petal Sweep Smuga płatków + Twin Curl Podwójny zawijas diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 8201db7ab6..77590f21b1 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -9988,3 +9988,8 @@ swatch Yellow Green Verde-amarelado @msg A panel is not joined to the rest by a crease. Um painel não está unido ao restante por nenhuma linha de vinco. @msg A fold line is on a non-printing layer. Uma linha de dobra está em uma camada não imprimível. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Painéis: {panels}, dobradiças: {hinges}, erros: {errors}, avisos: {warnings} + Ornamental Ornamental + Scrollwork Voluta + Filigree Arrow Seta filigranada + Petal Sweep Traço de pétalas + Twin Curl Voluta dupla diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index d1593508d3..e4a3002633 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -10011,3 +10011,8 @@ shape Open Открытый @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Панели: {panels}, шарниры: {hinges}, ошибки: {errors}, предупреждения: {warnings} @msg {w} × {h} pixels is too large for PSD (at most {MAX_SIDE} pixels a side): lower the resolution {w} × {h} пикселей — слишком большой размер для PSD (не более {MAX_SIDE} пикселей по стороне): уменьшите разрешение @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer должен быть "singleLine", "everyLine", "standardSingleLine" или "standardEveryLine" + Ornamental Орнаментальные + Scrollwork Завиток + Filigree Arrow Филигранная стрела + Petal Sweep Лепестковый росчерк + Twin Curl Двойной завиток diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 5c0420fcd3..36b7ee35e5 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -9601,3 +9601,8 @@ digits Hindi Hindi @msg A fold line is on a non-printing layer. En falslinje ligger på ett lager som inte skrivs ut. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Paneler: {panels}, gångjärn: {hinges}, fel: {errors}, varningar: {warnings} @msg {w} × {h} pixels is too large for PSD (at most {MAX_SIDE} pixels a side): lower the resolution {w} × {h} pixlar är för stort för PSD (högst {MAX_SIDE} pixlar per sida): sänk upplösningen + Ornamental Ornament + Scrollwork Snirkel + Filigree Arrow Filigranpil + Petal Sweep Kronbladssvep + Twin Curl Dubbel snirkel diff --git a/crates/ui-egui/src/i18n/tests.rs b/crates/ui-egui/src/i18n/tests.rs index 97fccd9167..bf6fa61a89 100644 --- a/crates/ui-egui/src/i18n/tests.rs +++ b/crates/ui-egui/src/i18n/tests.rs @@ -501,8 +501,9 @@ fn built_in_library_brush_names_are_in_complete_catalogs() { .flat_map(|(_, lib)| lib.brushes.iter().map(|b| b.name.clone()).collect::>()) .collect(); names.sort(); + let duplicates: Vec<&str> = names.windows(2).filter(|pair| pair[0] == pair[1]).map(|pair| pair[0].as_str()).collect(); + assert_eq!(duplicates, ["Zigzag"], "only the established Pattern Borders / Game Trails name is shared"); names.dedup(); - assert_eq!(names.len(), 46, "{names:?}"); let mut bad = vec![]; for lang in LANGUAGES.iter().filter(|lang| lang.complete_menus) { let missing: Vec<&String> = names.iter().filter(|n| lang.catalog().plain(n).is_none()).collect(); diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 910a7fc5b1..4f42278cb1 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -9875,3 +9875,8 @@ breakText Glyphs Glifler @msg A panel is not joined to the rest by a crease. Bir panel geri kalanlara hiçbir pilyaj çizgisiyle bağlı değil. @msg A fold line is on a non-printing layer. Bir katlama çizgisi yazdırılmayan bir katmanda. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Paneller: {panels}, menteşeler: {hinges}, hatalar: {errors}, uyarılar: {warnings} + Ornamental Süslemeli + Scrollwork Kıvrım süsü + Filigree Arrow Telkari ok + Petal Sweep Yaprakçık kıvrımı + Twin Curl Çift kıvrım diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index dbd6d2609e..0dfa6803ae 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -9526,3 +9526,8 @@ breakText Glyphs Гліфи @msg A panel is not joined to the rest by a crease. Панель не з’єднана з рештою жодною лінією біговки. @msg A fold line is on a non-printing layer. Лінія згину лежить на шарі, що не друкується. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Панелі: {panels}, шарніри: {hinges}, помилки: {errors}, попередження: {warnings} + Ornamental Орнаментальні + Scrollwork Завиток + Filigree Arrow Філігранна стріла + Petal Sweep Пелюстковий розчерк + Twin Curl Подвійний завиток diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 519c5d8f0d..8286f1454e 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -7759,3 +7759,8 @@ breakText Glyphs Glyph @msg {width} × {height} pixels is too large for Targa (at most 65535 pixels a side): lower the resolution {width} × {height} điểm ảnh quá lớn cho Targa (tối đa 65535 điểm ảnh mỗi cạnh): hãy giảm độ phân giải @msg {w} × {h} pixels is too large for PSD (at most {MAX_SIDE} pixels a side): lower the resolution {w} × {h} điểm ảnh quá lớn cho PSD (tối đa {MAX_SIDE} điểm ảnh mỗi cạnh): hãy giảm độ phân giải @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer phải là "singleLine", "everyLine", "standardSingleLine" hoặc "standardEveryLine" + Ornamental Hoa văn + Scrollwork Nét cuộn + Filigree Arrow Mũi tên hoa văn + Petal Sweep Nét cánh hoa + Twin Curl Nét cuộn đôi diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index c6696a9ec6..902c7d1645 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -9758,3 +9758,8 @@ breakText Glyphs 字形 @msg A fold line is on a non-printing layer. 一条折线位于不打印的图层上。 @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} 面板:{panels},铰链:{hinges},错误:{errors},警告:{warnings} @msg {w} × {h} pixels is too large for PSD (at most {MAX_SIDE} pixels a side): lower the resolution {w} × {h} 像素对 PSD 而言过大 (每边最多 {MAX_SIDE} 像素):请降低分辨率 + Ornamental 装饰纹样 + Scrollwork 卷饰 + Filigree Arrow 花丝箭头 + Petal Sweep 花瓣曲线 + Twin Curl 双重卷饰 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 1480422931..2a1885adb4 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -9568,3 +9568,8 @@ breakText Glyphs 字符 @msg A fold line is on a non-printing layer. 一條摺線位於不列印的圖層上。 @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} 面板:{panels},鉸鏈:{hinges},錯誤:{errors},警告:{warnings} @msg {what} would print on more than {MAX_TILES} tiles: scale it down {what} 會列印在超過 {MAX_TILES} 個拼貼上:請縮小 + Ornamental 裝飾紋樣 + Scrollwork 卷飾 + Filigree Arrow 花絲箭頭 + Petal Sweep 花瓣曲線 + Twin Curl 雙重卷飾 diff --git a/crates/ui-egui/src/panels/tests_brush_libraries.rs b/crates/ui-egui/src/panels/tests_brush_libraries.rs index 87fe34953f..8007781eaf 100644 --- a/crates/ui-egui/src/panels/tests_brush_libraries.rs +++ b/crates/ui-egui/src/panels/tests_brush_libraries.rs @@ -197,6 +197,7 @@ fn the_window_menu_and_the_brushes_panel_open_brush_libraries() { json!("calligraphic-nibs"), json!("bristle-brushes"), json!("pattern-borders"), + json!("ornamental"), json!("scatter-shapes"), json!("game-trails"), json!("energy-beams"), @@ -232,6 +233,17 @@ fn the_window_menu_and_the_brushes_panel_open_brush_libraries() { click(&mut app, &ctx, "Circuit Trace", Modifiers::NONE, 2.0); assert!(has(&app, "Circuit Trace") && !has(&app, "Bus Lines")); assert_eq!(undo_len(&app), undo + 1); + let r = app.run("window.brushLibrary", json!({"library": "Ornamental"})).unwrap(); + assert_eq!((r["open"].as_str(), r["count"].as_u64()), (Some("ornamental"), Some(4))); + let path = app.run("shape.line", json!({"x1": 10, "y1": 100, "x2": 180, "y2": 100})).unwrap()["id"].as_u64().unwrap(); + let undo = undo_len(&app); + click(&mut app, &ctx, "Scrollwork", Modifiers::NONE, 3.0); + assert!(has(&app, "Scrollwork") && !has(&app, "Twin Curl")); + assert_eq!(undo_len(&app), undo + 1); + assert_eq!( + app.session.doc().unwrap().doc.node(vectorcraft_doc::NodeId(path)).unwrap().appearance.stroke().unwrap().brush.as_deref(), + Some("Scrollwork") + ); // Without brushes there is nothing to save. let all: Vec = vectorcraft_brush::library(&app.session.doc().unwrap().doc).into_iter().map(|b| b.name).collect(); app.run("brush.delete", json!({ "names": all })).unwrap(); diff --git a/docs/mcp.md b/docs/mcp.md index 092faabc4c..53dda537ac 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -5035,8 +5035,8 @@ error. ## Brush libraries -Brush libraries are read-only sets of brushes: ten generated in code (Art Ribbons, Ink and Wash, Calligraphic Nibs, Bristle -Brushes with one bristle brush for each tip shape, Pattern Borders, Scatter Shapes, Game Trails, Energy Beams, and Dry Media with the Chalk Grain, Graphite Pencil, Wax Crayon and +Brush libraries are read-only sets of brushes: eleven generated in code (Art Ribbons, Ink and Wash, Calligraphic Nibs, Bristle +Brushes with one bristle brush for each tip shape, Pattern Borders, Ornamental with Scrollwork, Filigree Arrow, Petal Sweep and Twin Curl, Scatter Shapes, Game Trails, Energy Beams, and Dry Media with the Chalk Grain, Graphite Pencil, Wax Crayon and Charcoal Dust art brushes, id `dry-media`, and Tech Circuit with Circuit Trace (art), Bus Lines and Terminal Nodes (pattern), id `tech-circuit`), the `.vectorcraft` files in the user library folder of the desktop app (User Defined) and the brushes of any document loaded with `brush.loadLibrary` (a document without brushes of its own has the default ones). `brush.libraries` lists them (`id`, `name`, `category`: `builtIn`, `user` or `loaded`, `count`) and diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index e9fc9a6820..6ff05bd909 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1102,6 +1102,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - **Brush libraries** ([public source](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/apply-and-edit-strokes/create-new-brush-libraries.html), [import](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/apply-and-edit-strokes/import-brushes-from-brush-libraries-or-other-files.html), [Brushes panel](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/apply-and-edit-strokes/brushes-panel-overview.html)): Window › Brush Libraries, the Brushes panel's Brush Libraries Menu and its menu's Open Brush Library open each library in a library panel of its own, as swatch, graphic style and symbol libraries do. The built-in libraries (Art Ribbons, Ink and Wash, Calligraphic Nibs, Bristle Brushes, Pattern Borders, Scatter Shapes, Game Trails, Energy Beams, Dry Media, Tech Circuit) are original brushes generated in code (`crates/engine/src/cmd/brushlib.rs`); Striped Ribbon's art is filled with the library's own pattern and Sparkles scatters the library's own symbol; Ink and Wash adds ink and wash brushes (the [help page](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/apply-and-edit-strokes/about-brushes.html) lists an Ink brush library of strokes with varied thickness and texture; the names, shapes and opacities are VectorCraft's own): Tapered Ink, an art brush broad near its start that thins to a fine tip; Brush Pen, a calligraphic brush whose size follows the pen pressure; and Soft Wash and Pooling Wash, art brushes of translucent gray layers that take the stroke color as tints; Game Trails adds motion art brushes (Speed Line, Dash Trail, Burst Ray, Zigzag); Energy Beams adds laser and plasma art brushes (Laser Bolt, Plasma Arc, Charge Wave, Spark Trail); Dry Media adds grainy art brushes (Chalk Grain, Graphite Pencil, Wax Crayon, Charcoal Dust). A click on a brush adds it to the document's Brushes as one undo step with every resource its art uses (patterns, symbols, swatches, graphic styles, images), makes it the current brush and, with paths selected, applies it to them in the same step; a brush the document already has is not added again and a different brush of the same name comes in numbered ("Wave 2"). Shift/Cmd-clicks select brushes for Add to Brushes; a brush dragged onto a path is added and applied to it, and one dragged onto the Brushes panel is added. Save Brushes… / the Brushes panel's Save Brush Library… write the document's brushes (or the selected ones) as a `.vectorcraft` library into the `Brushes` folder next to the preferences, listed under User Defined, or to a file; Other Library… reads the brushes of any document VectorCraft opens. Thumbnails, in the library panels, the Brushes panel and Brush Options, render brush art with the patterns and symbols it uses. Copying brushed art now carries the patterns and symbols its brush's art uses too. Tests: `crates/engine/src/tests/brushlib.rs`, `crates/ui-egui/src/panels/tests_brush_libraries.rs`, `panels::brushes::tests::library_brush_previews_show_the_patterns_their_art_uses`, `canvas::tests::a_library_brush_dropped_on_a_path_is_added_and_applied_in_one_step`. - **Bristle Brushes library** ([What's new](https://helpx.adobe.com/illustrator/desktop/new-features/whats-new.html), [About brushes](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/apply-and-edit-strokes/about-brushes.html)): Window › Brush Libraries › Bristle Brushes holds ten bristle brushes, one for each tip shape (Fine Liner, Pointed Flat, Stubby Round, Dry Scrub, Soft Dome, Filbert, Angled Round, Angled Flat, Fan Blender, Grass Fan). The brushes, their names and their values are VectorCraft's own, and every value lies inside the range the bristle brush keeps (`brush.libraries`, `brush.addFromLibrary`; `the_bristle_brushes_library_covers_every_tip_shape_within_the_bristle_ranges`). - **Tech Circuit library:** Circuit Trace is a chamfered art brush with 45-degree elbows and terminal pads; Bus Lines repeats three parallel conductor lanes; Terminal Nodes repeats solder pads, circular test points and connecting leads. Original vector geometry generated in code, with Tints colorization and continuous pattern tile edges. Evidence: `the_tech_circuit_library_constructs_adds_and_applies_each_brush` in `crates/engine/src/tests/brushlib.rs` covers listing, finite geometry on straight, curved, short and closed paths, add/apply, undo/redo, deduplication and saved-library round trips. G5 remaining estimate 3–13 h (estimated); area scores unchanged. + - **Ornamental library** ([About brushes](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/apply-and-edit-strokes/about-brushes.html)): Window › Brush Libraries › Ornamental offers Scrollwork, Filigree Arrow, Petal Sweep and Twin Curl. These four original art brushes stretch curled lines, arrow-like accents and petal details along a path instead of repeating tiles; they take the stroke color as tints. The public source describes the Ornamental category, while the preset designs and names are VectorCraft's own. Evidence: `ornamental_brushes_draw_flourishes_and_survive_a_saved_library` in `crates/engine/src/tests/brushlib.rs` covers finite output on short, long and curved paths, add/apply and saved-library reopening; `the_window_menu_and_the_brushes_panel_open_brush_libraries` covers opening and clicking from the UI. - **Dry Media library** ([help page](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/apply-and-edit-strokes/about-brushes.html)): Window › Brush Libraries › Dry Media holds four art brushes with textured strokes like dry drawing materials, each 100 pt long: Chalk Grain (about 8 pt high), Graphite Pencil (about 2.3 pt), Wax Crayon (about 5.5 pt) and Charcoal Dust (about 7 pt). The brushes, their names, sizes and art are VectorCraft's own: each is filled vector paths from a fixed seed, at most 80 paths and 500 anchors, stretched along the path with Tints colorization, and the chalk and crayon art has even-odd gaps where the paper shows (`brush.libraries`, `brush.addFromLibrary`; `the_dry_media_library_holds_grainy_art_brushes_with_bounded_art`). - **Brush names in library panels**: a built-in brush library's panel shows its brushes' names in the UI language, in its list rows and tooltips, and its Find field matches the name shown or the English name. This is VectorCraft's own rule. A User Defined or Other Library… library's brushes, and the document's Brushes panel, show names as they are stored. A click, a drag, Add to Brushes and `brush.addFromLibrary` still use the English name, so the brush comes into the document under that name (`built_in_library_brushes_are_listed_in_the_ui_language`, `built_in_library_brush_names_are_in_complete_catalogs`). - A canvas context menu: right-click selects the object under the pointer and lists what applies to the selection (Undo/Redo, clipboard, group, isolation, join, Remove Anchor Points when anchors are selected, masks, compound paths, guides, Transform, Arrange, Select, Export Selection, and on type Bullets and Numbering and Spelling › Auto Spell Check, checked while it is on), or the view commands on empty canvas. From c2c4e650176f934588d4c0a752833cafdead8727 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 17 Nov 2026 12:07:57 -0800 Subject: [PATCH 20/49] ci: retry timed-out Ornamental gate From 94fee63cc15d8dd90b0fb9c0307cd4a39db645e2 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 17 Nov 2026 18:32:27 -0800 Subject: [PATCH 21/49] Fill Area: the large-document test presses while a hover search runs The pointer leaves the area to start a search on another thread before the press, so the test covers a click that waits for that search, and it checks that the press settles it. --- crates/engine/src/tests/fill_area.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/tests/fill_area.rs b/crates/engine/src/tests/fill_area.rs index 98c5dc34db..aebf2323a4 100644 --- a/crates/engine/src/tests/fill_area.rs +++ b/crates/engine/src/tests/fill_area.rs @@ -497,10 +497,13 @@ fn fill_area_tool_hovers_a_large_document_on_another_thread() { s.pointer(&PointerEvent::new(PointerKind::Move, 300.0, 300.0), v).unwrap(); s.tool_poll(v, true).unwrap(); assert_eq!(s.overlays(v).len(), 1); - // A click while a search runs waits for it. - s.pointer(&PointerEvent::new(PointerKind::Move, 310.0, 300.0), v).unwrap(); + // A click while a search runs waits for it: the pointer leaves the area, which starts a + // search, and the press inside the area comes before any poll. + s.pointer(&PointerEvent::new(PointerKind::Move, 500.0, 500.0), v).unwrap(); + assert!(s.tool_waiting()); let undo = undo_len(&s); s.pointer(&PointerEvent::new(PointerKind::Down, 310.0, 300.0), v).unwrap(); + assert!(!s.tool_waiting(), "the press waited for the search"); s.pointer(&PointerEvent::new(PointerKind::Up, 310.0, 300.0), v).unwrap(); assert_eq!(undo_len(&s), undo + 1); } From af868f2de6f7c7d27cb9e868c9d2ec76e5d746ce Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 17 Nov 2026 18:53:58 -0800 Subject: [PATCH 22/49] Fill Area: a left-out path cuts an area only when one of its segments reaches it A path with too many segments for a window's map is left out of it. The finder treated such a path as cutting the area whenever its bounding box met the area, so a path made of subpaths far apart on either side of an area made the finder map every path, which fails past the segment limit, and the area could not be filled. The finder now checks the path's segments. --- crates/engine/src/tests/fill_area.rs | 26 ++++++++++++++++++++++++++ crates/tools/src/builder/fill_area.rs | 12 +++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/tests/fill_area.rs b/crates/engine/src/tests/fill_area.rs index aebf2323a4..c0501ea786 100644 --- a/crates/engine/src/tests/fill_area.rs +++ b/crates/engine/src/tests/fill_area.rs @@ -316,6 +316,32 @@ fn fill_area_does_not_fill_across_a_huge_path_it_left_out() { } } +/// A path with too many segments whose subpaths lie far apart on either side of the square has a box +/// that holds the square, but no segment of it comes near: it is left out and the square is filled. +#[test] +fn fill_area_fills_an_area_that_a_left_out_paths_box_holds_but_its_segments_miss() { + let mut s = session(); + line(&mut s, (-20.0, 0.0), (420.0, 0.0)); + line(&mut s, (-20.0, 400.0), (420.0, 400.0)); + line(&mut s, (0.0, -20.0), (0.0, 420.0)); + line(&mut s, (400.0, -20.0), (400.0, 420.0)); + let n = vectorcraft_pathops::SHAPE_BUILDER_MAX_SEGMENTS; + let pts: Vec = (0..=n).map(|k| Point::new(-2000.0 + 400.0 * k as f64 / n as f64, -1000.0 + (k % 2) as f64)).collect(); + let far = [Point::new(2000.0, 1500.0), Point::new(2100.0, 1500.0)]; + let path = PathData::new(vec![vectorcraft_geom::SubPath::polyline(&pts, false), vectorcraft_geom::SubPath::polyline(&far, false)]); + let look = vectorcraft_doc::Appearance::basic(Paint::None, Paint::solid(Color::BLACK), 1.0); + s.edit("t", |d, _| { + let id = d.alloc_id(); + let top = d.children(d.default_layer()).map_or(0, |c| c.len()); + d.insert(d.default_layer(), top, Node::path(id, path, look))?; + Ok(id) + }) + .unwrap(); + deselect(&mut s); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [200, 200]})).unwrap(); + assert!((area(&s, id_of(&r)) - 160_000.0).abs() < 1.0, "{}", area(&s, id_of(&r))); +} + /// With Gap Detection on, a square on a higher layer within the gap of the area's corners does not /// bound the area, so the new path stays above the square that does. #[test] diff --git a/crates/tools/src/builder/fill_area.rs b/crates/tools/src/builder/fill_area.rs index d4b841b9ca..cac964bf19 100644 --- a/crates/tools/src/builder/fill_area.rs +++ b/crates/tools/src/builder/fill_area.rs @@ -2,6 +2,8 @@ //! closed path of that area with the current fill and stroke (`shapeBuilder.copyRegion`). The //! paths around the area stay as they are, and nothing needs to be selected. +use vectorcraft_geom::path::segment_bounds; + use super::lookup::path_contains; use super::*; @@ -63,6 +65,13 @@ fn meet(a: &Rect, b: &Rect) -> bool { a.x0 <= b.x1 && b.x0 <= a.x1 && a.y0 <= b.y1 && b.y0 <= a.y1 } +/// Does a segment of `path` (closing segments included) meet `zone`? A path whose box meets the zone +/// may still lie wholly outside it, as a path of subpaths far apart does. +fn reaches(path: &PathData, zone: &Rect) -> bool { + let bez = path.to_bezpath(); + vectorcraft_geom::kurbo::segments(bez.elements().iter().copied()).any(|seg| meet(&segment_bounds(seg), zone)) +} + /// Does `outer` hold all of `inner`? fn within(inner: &Rect, outer: &Rect) -> bool { inner.x0 >= outer.x0 && inner.x1 <= outer.x1 && inner.y0 >= outer.y0 && inner.y1 <= outer.y1 @@ -159,7 +168,8 @@ impl AreaFinder { // path holds both. Some(rb) if within(&rb, &window) => { let reached = rb.inflate(reach, reach); - let cut = any_left_out && self.inputs.iter().zip(&left_out).any(|((_, b, _), out)| *out && meet(b, &reached)); + let cut = any_left_out + && self.inputs.iter().zip(&left_out).any(|((s, b, _), out)| *out && meet(b, &reached) && reaches(&s.path, &reached)); if !cut { return self.area_in(&map, &picked, p); } From a071c38769cc173575a9734d7718e327a0a3d8ba Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 17 Nov 2026 19:12:17 -0800 Subject: [PATCH 23/49] Shape Builder: a fill or stroke object that is not a paint is an error A fill or stroke such as {"swatch": 123} gave no paint, so shapeBuilder.copyRegion and shapeBuilder.merge used the current paint. Both commands now report it as a bad fill or stroke. --- crates/engine/src/cmd/buildcmds.rs | 3 ++- crates/engine/src/tests/fill_area.rs | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/cmd/buildcmds.rs b/crates/engine/src/cmd/buildcmds.rs index e5d45fdc92..51f44ce479 100644 --- a/crates/engine/src/cmd/buildcmds.rs +++ b/crates/engine/src/cmd/buildcmds.rs @@ -279,7 +279,8 @@ fn paint_param(s: &Session, p: &Value, key: &str, cmd: &str) -> Result Ok(None), Some(v @ Value::Object(o)) if o.contains_key("color") || o.contains_key("swatch") || o.contains_key("gradient") || o.contains_key("none") => { - paint_from(s, v) + // A paint key whose value is not a paint, such as `{"swatch": 123}`, gives no paint. + paint_from(s, v)?.map(Some).ok_or_else(|| bad(cmd, format!("bad {key} {v}"))) } Some(v) => color_value(v).map(|c| Some(Paint::solid(super::paint::new_color(s, p, c)))).ok_or_else(|| bad(cmd, format!("bad {key} {v}"))), } diff --git a/crates/engine/src/tests/fill_area.rs b/crates/engine/src/tests/fill_area.rs index c0501ea786..4de5171bff 100644 --- a/crates/engine/src/tests/fill_area.rs +++ b/crates/engine/src/tests/fill_area.rs @@ -453,6 +453,12 @@ fn fill_area_outside_every_area_changes_nothing() { for p in [json!({}), json!({"point": [50]}), json!({"point": [50, 70], "fill": "nope"}), json!({"point": [50, 70], "stroke": 3})] { assert!(s.execute("shapeBuilder.copyRegion", &p).is_err(), "{p}"); } + for paint in [json!({"swatch": 123}), json!({"color": 5}), json!({"color": "nope"})] { + for key in ["fill", "stroke"] { + let p = json!({"point": [50, 70], key: paint}); + assert!(s.execute("shapeBuilder.copyRegion", &p).is_err(), "{p}"); + } + } assert!(s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70], "ids": [999_999]})).is_err()); assert_eq!((undo_len(&s), stack(&s)), (undo, kids)); } From c860bf27eff59a70ea15737947c744dc8561d0cc Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 17 Nov 2026 19:30:15 -0800 Subject: [PATCH 24/49] Fill Area: a left-out curve cuts an area only where it reaches it A segment's box can meet an area while the segment does not, as with a diagonal line or a curve that arcs around the area. The finder now halves such a segment until a piece has an end in the area, its box misses it, or it is smaller than 0.01 pt. --- crates/engine/src/tests/fill_area.rs | 51 +++++++++++++++------------ crates/tools/src/builder/fill_area.rs | 26 ++++++++++++-- 2 files changed, 53 insertions(+), 24 deletions(-) diff --git a/crates/engine/src/tests/fill_area.rs b/crates/engine/src/tests/fill_area.rs index 4de5171bff..0b00ddf954 100644 --- a/crates/engine/src/tests/fill_area.rs +++ b/crates/engine/src/tests/fill_area.rs @@ -316,30 +316,37 @@ fn fill_area_does_not_fill_across_a_huge_path_it_left_out() { } } -/// A path with too many segments whose subpaths lie far apart on either side of the square has a box -/// that holds the square, but no segment of it comes near: it is left out and the square is filled. +/// A path with too many segments whose box holds the square, but no segment of it comes near: its +/// subpaths lie far apart on either side of the square, or one curve arcs around the square and its +/// box holds the square. It is left out and the square is filled. #[test] fn fill_area_fills_an_area_that_a_left_out_paths_box_holds_but_its_segments_miss() { - let mut s = session(); - line(&mut s, (-20.0, 0.0), (420.0, 0.0)); - line(&mut s, (-20.0, 400.0), (420.0, 400.0)); - line(&mut s, (0.0, -20.0), (0.0, 420.0)); - line(&mut s, (400.0, -20.0), (400.0, 420.0)); - let n = vectorcraft_pathops::SHAPE_BUILDER_MAX_SEGMENTS; - let pts: Vec = (0..=n).map(|k| Point::new(-2000.0 + 400.0 * k as f64 / n as f64, -1000.0 + (k % 2) as f64)).collect(); - let far = [Point::new(2000.0, 1500.0), Point::new(2100.0, 1500.0)]; - let path = PathData::new(vec![vectorcraft_geom::SubPath::polyline(&pts, false), vectorcraft_geom::SubPath::polyline(&far, false)]); - let look = vectorcraft_doc::Appearance::basic(Paint::None, Paint::solid(Color::BLACK), 1.0); - s.edit("t", |d, _| { - let id = d.alloc_id(); - let top = d.children(d.default_layer()).map_or(0, |c| c.len()); - d.insert(d.default_layer(), top, Node::path(id, path, look))?; - Ok(id) - }) - .unwrap(); - deselect(&mut s); - let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [200, 200]})).unwrap(); - assert!((area(&s, id_of(&r)) - 160_000.0).abs() < 1.0, "{}", area(&s, id_of(&r))); + // A cubic from (-1000, 1500) up over the square to (1400, 1500); at its top it is at y -750. + let mut arc = vectorcraft_geom::SubPath::polyline(&[Point::new(-1000.0, 1500.0), Point::new(1400.0, 1500.0)], false); + arc.anchors[0].h_out = Point::new(-1000.0, -1500.0); + arc.anchors[1].h_in = Point::new(1400.0, -1500.0); + let far = vectorcraft_geom::SubPath::polyline(&[Point::new(2000.0, 1500.0), Point::new(2100.0, 1500.0)], false); + for second in [far, arc] { + let mut s = session(); + line(&mut s, (-20.0, 0.0), (420.0, 0.0)); + line(&mut s, (-20.0, 400.0), (420.0, 400.0)); + line(&mut s, (0.0, -20.0), (0.0, 420.0)); + line(&mut s, (400.0, -20.0), (400.0, 420.0)); + let n = vectorcraft_pathops::SHAPE_BUILDER_MAX_SEGMENTS; + let pts: Vec = (0..=n).map(|k| Point::new(-2000.0 + 400.0 * k as f64 / n as f64, -1000.0 + (k % 2) as f64)).collect(); + let path = PathData::new(vec![vectorcraft_geom::SubPath::polyline(&pts, false), second.clone()]); + let look = vectorcraft_doc::Appearance::basic(Paint::None, Paint::solid(Color::BLACK), 1.0); + s.edit("t", |d, _| { + let id = d.alloc_id(); + let top = d.children(d.default_layer()).map_or(0, |c| c.len()); + d.insert(d.default_layer(), top, Node::path(id, path, look))?; + Ok(id) + }) + .unwrap(); + deselect(&mut s); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [200, 200]})).unwrap(); + assert!((area(&s, id_of(&r)) - 160_000.0).abs() < 1.0, "{second:?}: {}", area(&s, id_of(&r))); + } } /// With Gap Detection on, a square on a higher layer within the gap of the area's corners does not diff --git a/crates/tools/src/builder/fill_area.rs b/crates/tools/src/builder/fill_area.rs index cac964bf19..a3950fd997 100644 --- a/crates/tools/src/builder/fill_area.rs +++ b/crates/tools/src/builder/fill_area.rs @@ -3,6 +3,7 @@ //! paths around the area stay as they are, and nothing needs to be selected. use vectorcraft_geom::path::segment_bounds; +use vectorcraft_geom::{ParamCurve, PathSeg}; use super::lookup::path_contains; use super::*; @@ -66,10 +67,31 @@ fn meet(a: &Rect, b: &Rect) -> bool { } /// Does a segment of `path` (closing segments included) meet `zone`? A path whose box meets the zone -/// may still lie wholly outside it, as a path of subpaths far apart does. +/// may still lie wholly outside it, as a path of subpaths far apart, a diagonal line or a curve +/// that arcs around the zone does. fn reaches(path: &PathData, zone: &Rect) -> bool { let bez = path.to_bezpath(); - vectorcraft_geom::kurbo::segments(bez.elements().iter().copied()).any(|seg| meet(&segment_bounds(seg), zone)) + vectorcraft_geom::kurbo::segments(bez.elements().iter().copied()).any(|seg| segment_reaches(seg, zone, 0)) +} + +/// How many times [`segment_reaches`] halves a segment: a piece of 1/2^24 of a segment counts as +/// meeting the zone when its box does. +const REACH_SPLITS: u32 = 24; + +/// The side (pt) below which a piece of a segment whose box meets the zone counts as meeting it. +const REACH_TOLERANCE: f64 = 0.01; + +/// Does `seg` meet `zone`? Its halves are checked in turn while their boxes meet the zone and +/// neither end is in it; a piece smaller than [`REACH_TOLERANCE`] whose box meets the zone counts. +fn segment_reaches(seg: PathSeg, zone: &Rect, depth: u32) -> bool { + let b = segment_bounds(seg); + if !meet(&b, zone) { + return false; + } + if holds(zone, seg.start()) || holds(zone, seg.end()) || depth >= REACH_SPLITS || b.width().max(b.height()) < REACH_TOLERANCE { + return true; + } + segment_reaches(seg.subsegment(0.0..0.5), zone, depth + 1) || segment_reaches(seg.subsegment(0.5..1.0), zone, depth + 1) } /// Does `outer` hold all of `inner`? From ef6d607ac4dffd4189a2aa74da589328d7aad36c Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 01:07:34 -0800 Subject: [PATCH 25/49] Docs: count Ornamental among the eleven built-in brush libraries The progress rows, the G5 gap entry, the M10 milestone row and the brush library list now name Ornamental and count eleven built-in brush libraries. The ROADMAP progress log gets an Ornamental line. --- ROADMAP.md | 1 + docs/gaps.md | 2 +- docs/roadmap.md | 2 +- docs/target-app-parity.md | 8 ++++---- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index b3877be5c8..2da3c938cd 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -126,6 +126,7 @@ Ranked; detail in [docs/roadmap.md](docs/roadmap.md) and [docs/gaps.md](docs/gap - 2026-11-14: Built-in symbol library Weather Icons: adds a sixth procedural symbol library (Window › Symbol Libraries, the Symbols panel's Symbol Libraries Menu) containing six original vector symbols (Sun, Moon, Cloud, Rain, Thunder, Snow) generated in code without default 9-slice guides (part of Gap 5). Headline numbers unchanged. - 2026-11-14: Built-in Tech Circuit brush library: Circuit Trace (chamfered art with 45-degree elbows and terminal pads), Bus Lines (parallel conductor pattern) and Terminal Nodes (repeating solder pads, test points and leads), all original geometry generated in code. Ten built-in brush libraries; G5 remaining estimate 3–13 h (estimated), headline numbers unchanged. +- 2026-11-18: Built-in Ornamental brush library: Scrollwork, Filigree Arrow, Petal Sweep and Twin Curl, original art brushes generated in code that stretch curled lines, arrow-like accents and petal details along a path and take the stroke color as tints. Eleven built-in brush libraries (part of Gap 5); headline numbers unchanged. - 2026-11-05: Window › Toolbars › Keep Tools Beside the Canvas, off by default, docks the Tools panel between left-side panels and the canvas instead of at the window's left edge, and the canvas's left edge then also docks a floating Tools panel (`window.toolsBesideCanvas`, #5395). Workspaces keep the setting; workspaces saved without it keep Tools at the window's edge. An optional VectorCraft layout choice; headline numbers unchanged. - 2026-11-17: The canvas's left edge docks a floating Tools panel whichever way Keep Tools Beside the Canvas is set: a drop there, right of panels docked on the left, turns the setting on, and a drop on the window's left edge turns it off (#7837). Headline numbers unchanged. diff --git a/docs/gaps.md b/docs/gaps.md index 5dee50afa1..c7bee05a35 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -698,7 +698,7 @@ macOS cursor delivery (#2292) is narrowed to a native host adapter using the exi Fine Grain, Canvas Weave, Burlap Sack, Cracked Glaze, Mosaic Floor, Quilted Squares, Leaded Glass and Damp Paper, painted with the texture effects; User Defined; Other Library…; `graphicStyle.libraries`, `graphicStyle.addFromLibrary`). -- **Missing:** more built-in brush libraries beyond the ten shipped (and further graphic-style libraries beyond the eleven shipped, and further symbol libraries beyond Basic +- **Missing:** more built-in brush libraries beyond the eleven shipped (and further graphic-style libraries beyond the eleven shipped, and further symbol libraries beyond Basic Shapes, UI Frames, Map Markers, Inventory Icons, Skill Icons and Weather Icons; original, generated in code, never Adobe's); dynamic symbols' `.ai` read and write. - **Estimate:** 3–13 h (estimated). diff --git a/docs/roadmap.md b/docs/roadmap.md index 3c09bde829..2a7a0f8fcf 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -169,7 +169,7 @@ Gujarati interface follow-up (2026-11-14): the catalog and zero/one plural rule | M7 | Type (point/area/path, editing, styles, OpenType, threading, glyphs) | Spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, the custom dictionary and Ignore All commands, Auto Spell Check with its right-click suggestions, Ignore All and Add to Dictionary, Spelling › Auto Spell Check in the context menu of type, the Edit Custom Dictionary dialog, and the modal Check Spelling dialog (Edit › Spelling › Check Spelling…, `Cmd+I`, `ui.checkSpelling`, #4936); Right-aligned area type sets the text after a line's last tab against the right edge, the text before it at its stops (#6147); A line a soft return ends is justified as a wrapped line is (#6137); Indian-language pattern hyphenation preserves syllables in both composers (#4947); 🟡 Hanging punctuation keeps its published amounts under Glyph Scaling, and Standard burasagari counts a hung line start as room; Fullwidth `!` / `?` keep an upright fallback in vertical type; Hyphenation… and Justification… per paragraph (#2310, #2755), Auto Leading also driving the Character panel's Leading, the Alt+↑/↓ leading nudge and Fill with Placeholder Text; Document-point character controls after object/group scaling (#1034; optional font-size preservation remains separate), Character/Paragraph Styles (explicit Auto-leading resets and local leading overrides), per-paragraph paragraph attributes, mixed paragraph alignment indication (headless regressions, full integration CI and visual review pass), Area Type Options (with Width/Height, Auto Size and Shrink Text to Fit; overflow reported to agents and vertical Align), type areas resized by their handles and reshaped with Direct Selection, threaded text, Fit Headline, Glyphs (feature-valued alternates and unencoded glyphs applied in one Undo step while keeping Arabic joining, #5514), OpenType panel (including font-defined Stylistic Sets), Find Font (Document, Recent and System replacement sources, #5217), installed system fonts in every font menu (fonts registered with Windows outside its font folders, the XDG and Flatpak host font folders on Linux, and fonts installed while the app runs, listed when it comes back to the front; searchable; the Character and Properties menus show each family's sample of the selected text, preview it live under the pointer or ↑/↓, show recently applied families first (#3515), filter by script and kind, list a family's styles, and star favourites; the Glyphs panel and Find Font's Replace With use the same menu without the live preview) and found by name on open/import (full-name aliases and Missing Fonts searches verified, #1258; Windows font-service QA pending), variable fonts' named instances as styles, CJK names in the UI, input methods (marked text in place, candidate window at the caret; Japanese IME), Text Wrap (offset, invert, both sides of an object; follows edits), Type on a Path effects and Options with draggable start/centre/end brackets (slide, flip), tab stops + Tabs panel (Above Text floats it over the selected text, its ruler at the canvas zoom so stops line up with the columns, #729), inline symbols in text (beyond parity), Hebrew/Arabic bidirectional text, Paragraph Direction, Every-line/Single-line Composer per object (ragged text too) done; paint-only Arabic harakat keep joining with GDEF-mark ownership and Insert Kashidas tatweels on the base letter's paint (`tests::harakat`); tab leaders, vertical type pending | 45–60 | | M8 | Transform & distort (Puppet Warp, Liquify tools, Envelopes, Blends, Perspective Grid) | ✅ done (M8.1–M8.20 on 2026-10-06, fidelity pass): Liquify Tool Options with one shared brush, pen pressure, hold-to-apply, a safe scope and incremental strokes; tool options that last; Puppet Warp rotation, multi-select, Control bar and a rest-shape session that follows Undo; Width tool on compound paths; Envelope dialogs with preview, Reset with Warp/Mesh, full Envelope Options, type/images/symbols/appearance/gradients/patterns distorted on canvas and in every export, warps that keep their frame, Edit Contents, mesh handles and Control bar; Blend Options, anchor-targeted Blend tool, editable spine, keys picked on the canvas, faithful interpolation and knockout; Anchor Point spine conversion/handle editing and selection priority (#2544), with #2425 Shift reshape preserved; Perspective Grid with Define Grid, presets, lock/snap/rulers, widgets, the 1–4 plane switch, movable planes, Perspective Selection scale/copy/perpendicular/Transform Again, and type and symbols truly projected with Edit Text. Left: Anti-Alias and Preserve Shape output, warp-envelope point editing, brush interpolation in blends, Free Transform/Scale/Reflect along a rotated box | 2–4 | | M9 | Live effects (+ 3D & Materials) | 🟡 2D effects done incl. Effect → Pathfinder, Color Adjustments and Document Raster Effects Settings; PDF export warns when the pixel cap lowers raster-effect resolution; Artistic › Colored Pencil, Cutout, Dry Brush, Film Grain, Fresco, Neon Glow, Paint Daubs, Palette Knife, Poster Edges, Rough Pastels, Smudge Stick, Sponge, Underpainting and Watercolor and Sketch › Halftone Pattern, Bas Relief, Charcoal, Conté Crayon, Photocopy, Stamp, Torn Edges and Water Paper done (57/57 Photoshop filters); Revolve with automatic smooth vector shading, default-on circular caps and continuous rims, Extrude & Bevel, Inflate and Rotate with one to ten colored directional lights and four original lighting presets; SVG Filters, remaining raster effects and 3D materials and shadows pending | 81–130 | -| M10 | Brushes, symbols, patterns, Repeat | 🟡 pattern swatches (5 tile types, Pattern Options, editing mode, SVG ``/PDF export) and live Repeat (radial/grid/mirror) done; interactive selected mirror axis implemented (focused and native checks passed; full CI blocked by an unrelated text test); symbol libraries done (Window › Symbol Libraries, six generated libraries (Basic Shapes, UI Frames, Map Markers, Inventory Icons, Skill Icons, Weather Icons), User Defined, Other Library…, Save Symbols); brush libraries done (Window › Brush Libraries, ten generated libraries including Tech Circuit, Ink and Wash, Bristle Brushes and Dry Media, User Defined, Other Library…, Save Brushes); symbol editing shows draggable 9-slice guides (#5280), with guides outside the artwork still unsupported; brushes/symbols in progress | 23–37 | +| M10 | Brushes, symbols, patterns, Repeat | 🟡 pattern swatches (5 tile types, Pattern Options, editing mode, SVG ``/PDF export) and live Repeat (radial/grid/mirror) done; interactive selected mirror axis implemented (focused and native checks passed; full CI blocked by an unrelated text test); symbol libraries done (Window › Symbol Libraries, six generated libraries (Basic Shapes, UI Frames, Map Markers, Inventory Icons, Skill Icons, Weather Icons), User Defined, Other Library…, Save Symbols); brush libraries done (Window › Brush Libraries, eleven generated libraries including Ornamental, Tech Circuit, Ink and Wash, Bristle Brushes and Dry Media, User Defined, Other Library…, Save Brushes); symbol editing shows draggable 9-slice guides (#5280), with guides outside the artwork still unsupported; brushes/symbols in progress | 23–37 | | M11 | Artboards & views (selected-set deletion shared by Artboards menu, trash and Properties, retaining artboard 1 when all are selected; Artboard deletion keys keep the first of an all-selected set and protect artwork; history prunes invalid indices while preserving valid multiselection (history tests and full workspace CI pass); click-to-fit objects with the Artboard tool (#1227), artboard escape routing and document setup modal handoff done; artboard panel/tool with Move Artwork for X/Y fields and Artboard Options, Trim View, middle-button pan, print tiling and the status bar's artboard navigator with synchronized Artboard tool selection done; Window › Arrange › Tile and Consolidate All Windows done; multiple windows, presentation polish) (cached canvas reprojection preserves scale during resize, rotation and DPI changes; regression-tested and contributor-confirmed 2026-10-19; estimates unchanged) (cached canvas dimensions match the renderer limit before cache-key creation, view construction and worker submission; regression-tested; estimates unchanged); status-bar pointer coordinates follow the active ruler origin and General units | 🟡; Artboard Options shares existing presets and orientation controls and can fit artwork without moving it; artwork fitting includes all drawn document art across artboards and off-board; artwork bounds are cached by active document and revision, and selection uses the shared bounds cache across artboards | 15–25 | | M12 | Advanced color & art (CMYK/ICC, separations, Gradient Mesh, Live Paint, Image Trace, Graphs) | 🟡 Gradient Mesh, Live Paint, Image Trace (junction-returning pieces retain their positioned boundaries; a simpler contour walk with identical output; an edge's sub-pixel shift is the same from either side; notches read only their own piece; collapsed loops keep few segments; large images trace with a warning; Auto Color keeps rare distinct colours; quick presets trace at once and the Image Trace button opens the adjustment controls; Properties reopens them; tiny fitted contours retain islands and holes; Create Strokes: exact crop EDT, Guo–Hall thinning and maximal-disc graph simplification; 15 presets, the 14 documented ones each with an enhanced version; Ignore Color, Shapes, Auto Grouping and Gradients options; measured in `image-trace-quality.md`; closed outlines retain their interior after straightening; the Flat Logo mode places edges to a fraction of a pixel, restores sharp corners, snaps lines and circles, and refuses gradients; live trace result bounds and selection highlights exclude the retained bitmap except in source-image views), Recolor Artwork, colour management (ICC, soft proofing, separations preview), Graphs (all 9 tools, Graph Data/Type, group-selected series colours persist through regenerate/save/open) done; Graph Design and Marker designs, Transpose and Switch x/y, `\|` label line breaks, the pie options, drop shadows, the legend across the top, overlapping widths, First Row/Column in Front, filled lines, kept label formatting and the Graph Data worksheet done; graph Column designs pending; Vector Halftone Preview keeps the selection box without drawing dot selection marks (#6369); Live Paint Bucket fills faces crossed in one drag (#6373) | 6–10 | | M13 | Automation (Actions ✅ record/playback, persisted; variables, scripting, batch) | 🟡 MCP `add_text` exposes existing vertical point, area and path type; `script.run` and File › Scripts › Other Script… run JavaScript files, and Window › Script Console shows their output; the script document model and batch work remain | 18–27 | diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index f699d9db68..d4189d2728 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -257,7 +257,7 @@ dominate; 3D, graphs and automation are specialist). They sum to 105. Feature de | Drawing tools (Pen, Curvature, Pencil, shapes, Shaper) | 7 | 85% | Shaper construction widget, Pencil/Pen nuances, Blob Brush options, Touch Type, Dimension tool; see [ui-parity.md](ui-parity.md) | 8–13 | estimated; Curvature point display regression-tested (#1236, in part); Polygon/Star exact-size count persistence regression-covered; Live Corners' Relative rounding done (#3091), score unchanged; Copy and Cut with the Pen or Curvature tool take the anchors a Cmd/Ctrl-lent Direct Selection picked (#6123), score and hours unchanged; the Pen, Smart Pen and Curvature tool show the measurement readout with the rubber band off (#7043), score, gaps and hours unchanged | | Path operations, Pathfinder, Shape Builder, Live Paint | 5 | 80% | Shape Builder on the reporter's file (#937: art past 4,096 segments is cut by lines again; unconfirmed on the file itself); gap detection shares Live Paint’s finder, with a 72 pt custom cap and the existing options; Live Paint Gap Options | 4–8 | estimated; Shape Builder Gap Detection shares Live Paint’s spatial gap finder and temporary merge bridges (#2526); Custom is capped at 72 pt in the existing options dialog (lowered from 86%: open issues); compound attributes regression-tested (#1197); single-result source names survive SVG export/import (#1293), with [SVG ID semantics](https://www.w3.org/TR/SVG2/struct.html#IDAttribute) and original-shape tests; Simplify component selection and preview regression-tested (#1272); Simplify of a Direct Selection part of a path regression-tested (`tests/simplify_part.rs`); Divide open-cutting-path geometry and appearance regression-tested (#1307); the Shape Builder's edge-source grid is bounded in memory and files a segment once per cell (`planar.rs` test `rect_index_holds_a_bounded_number_of_references`); live compound shapes (Make, Alt-click, member Shape Modes, Release, Expand, saved and exported) regression-tested (#4522); Live Paint Bucket face drags, including narrow faces and one Undo, regression-tested (#6373) | | Colour, swatches, gradients, patterns, mesh, recolor | 7 | 92% | Picker Lab entry, picker libraries and Assign-row menus complete the deferred #4028 UI paths (#8031); scores and estimates unchanged; Eyedropper copies effective character dimensions across text transforms (#6404); 30.0's gradient additions are done (dither, perceptual blending, presets); freeform gradients in SVG/PDF, mixed spot/process gradients in SVG, PDF gradients mixing a spot color with RGB or Lab stops, and dithered spot gradient fills and Perceptual spot gradients with RGB or Lab stops other than white or more than 4,096 stops on their curve, which PDF export writes as images in process colors| 4–7 | estimated; Recolor model selection is available through the engine and MCP (#2520), and the dialog's color sliders (HSB, RGB, CMYK, Lab, Tint for a spot color) edit the selected row's new color in its mode, and the Edit tab's Global Adjust sliders (Saturation, Brightness, Temperature, Luminosity, -100% to 100%) change every recolored color at once (lowered from 96%: target moved); unpainted zero-width stroke restoration fixed (#1253), score and hours unchanged; Eyedropper source reads regression-tested (#1251); screen-bounded Recolor Edit chip list (#3416), score and hours unchanged; a point on a gradient mesh's outline locates on its edge on every side (#7006: `mesh_locate_takes_a_point_on_any_side_of_the_outline`, `mesh_add_line_exactly_on_the_edge_needs_no_tolerance`), score and hours unchanged; Color panel spectrum grows with the resized panel (#8005) | -| Strokes, brushes, width profiles | 5 | 88% | Shift-double-click adjoining adjustment is implemented; brush libraries are done (ten generated libraries including Tech Circuit, Ink and Wash, Bristle Brushes, Game Trails, Energy Beams and Dry Media, User Defined, Other Library…, Save Brushes); Art brush Overlap and Pattern brush auto corners are done; remaining: pen pressure on macOS, Stylus Wheel, more built-in brush libraries, tilt, bearing and rotation for Art, Pattern and Bristle brushes and on native Wayland and the web | 8–15 | estimated; width-point creation and adjoining adjustment regression-tested; dialog layout reviewed; evidence below; finite-arithmetic follow-up regressions and full CI passed (evidence below) | +| Strokes, brushes, width profiles | 5 | 88% | Shift-double-click adjoining adjustment is implemented; brush libraries are done (eleven generated libraries including Ornamental, Tech Circuit, Ink and Wash, Bristle Brushes, Game Trails, Energy Beams and Dry Media, User Defined, Other Library…, Save Brushes); Art brush Overlap and Pattern brush auto corners are done; remaining: pen pressure on macOS, Stylus Wheel, more built-in brush libraries, tilt, bearing and rotation for Art, Pattern and Bristle brushes and on native Wayland and the web | 8–15 | estimated; width-point creation and adjoining adjustment regression-tested; dialog layout reviewed; evidence below; finite-arithmetic follow-up regressions and full CI passed (evidence below) | | Appearance, transparency, graphic styles, masks | 5 | 97% | raster effect reach in preview bounds | 1–2 | estimated; Transform typing, sliders, preview, and undo are covered in `crates/ui-egui/src/panels/tests_appearance.rs` | | 3D and Materials (and Turntable) | 4 | ~25% | live Revolve with automatic smooth vector shading and default-on continuous circular caps, Extrude & Bevel (twist, taper, caps, five bevel shapes), Inflate and Rotate with Position presets (colored Inflate uses smooth membrane lighting; white-light Inflate retains its existing shading; Extrude & Bevel and Rotate retain planar shading; one to ten colored lights, shared neutral ambient, painter visibility); materials, light presets, shadows, ray tracing, the rest of 3D Classic (Map Art), Turntable views, textures, map art and shading in 3D export | 30–55 | estimated (Extrude & Bevel, Inflate and Rotate added 2026-10-12); every 3D seam has round joins (2026-11-12, [three-d.md](three-d.md#seams)), score, gaps and hours unchanged | | Type core | 9 | 80% | Auto-leading style resets are implemented; Hyphenation… and Justification… options are done (#2310, #2755), and a paragraph's Auto Leading also sets the Character panel's Leading, the Alt+↑/↓ leading nudge and Fill with Placeholder Text; remaining: Optical Margin Alignment, Middle Eastern features beyond bidi layout (the Middle Eastern & South Asian and Standard composers are done per paragraph, #4935; `.ai`/EPS/PDF files carry no composer), optional group font-size preservation; transformed character controls fixed (#1034), see [type-parity.md](type-parity.md) | 14–19 | estimated; eleven-language pattern hyphenation in both composers, with grapheme and shaping-cluster protection (#4947, `hyphen::tests` and `layout::wrapping_tests`); Sanskrit patterns pending an allowlisted source; recent-font groups in font pickers (#3515); full-name font matches regression-tested (#1258); mixed paragraph alignment indication implemented; headless regressions, full integration CI and visual review pass; localized legacy family-name fallback with loaded/catalog regressions (#2208); Fractional Widths per type object regression-tested; color emoji fonts with bitmap glyphs (`sbix`, `CBDT`) draw and export; threading ports: every selected area type and type on a path shows its in and out ports (empty, arrow, red "+"), and the Selection tool threads from either, the in port into a frame before it, and a double-click on a threaded port breaks the thread there (`threads::tests::break_splits_the_thread_and_the_story_flows_into_the_first_part`, `select::tests::a_double_click_on_a_threaded_port_breaks_the_thread`, `canvas::tests::a_double_click_on_a_threaded_out_port_breaks_the_thread`) (#2572; `select::tests::a_click_on_the_in_port_threads_into_a_frame_before_it`, `text::tests::selected_type_shows_its_ports_in_each_state`, `threads::tests::add_before_threads_the_story_from_the_new_frame_into_the_clicked_one`, live screenshot); the Glyphs panel highlights and scrolls to the character selected with the Type tool (#4908, `panels::glyphs` tests); the OpenType panel lists only `ss01`–`ss20` sets present in the selected font and uses its custom names when supplied; Type-range desktop Copy publishes styled art and keeps font family, size and color on canvas Paste after editing (#5636); paint-only Arabic harakat keep joining with conditional GDEF-mark ownership and Insert Kashidas base-letter paint (`tests::harakat`) | @@ -526,7 +526,7 @@ about 1–1.5 agent-hours each, so the other rows (estimated on the older scale) | Drawing tools | 7 | 86% | rough-square Shaper recognition and orientation steps corrected; editable Shaper Groups landed; Pencil: Alt key toggles to Smooth Tool (#2001); remaining: Shaper construction widget/gesture refinements, pencil and the remaining pen modifier nuances, Blob Brush Merge Only with Selection, Touch Type, Live Corners' Relative rounding | 7–12 | | Path operations, Pathfinder, Shape Builder, Live Paint | 5 | 86% | Live Paint gap options, Shape Builder gap detection, options (Tool Options dialog, clicking a stroke in merge mode) and Shift-drag marquee | 3–6 | | Colour, swatches, gradients, patterns, mesh, recolor | 7 | 96% | Picker Lab entry, picker libraries and Assign-row menus complete the deferred #4028 UI paths (#8031); scores and estimates unchanged; Library panels' lists (swatch, Color Book, brush, symbol and graphic style libraries) fill a taller panel above its footer (#2992; scores and estimates unchanged); Swatches list fills a taller panel above its footer (#1638; `the_list_fills_a_tall_panel_above_its_footer`; scores and estimates unchanged); freeform gradients in SVG/PDF and mixed spot/process gradients in SVG (exported as stops; PDF export keeps the spot inks in a DeviceN shading, except next to RGB or Lab stops; dithered fills and Perceptual gradients with RGB or Lab stops other than white or more than 4,096 stops on their curve are written as images in process colors), pattern fills in Expand | 2–4; Eyedropper source reads regression-tested (#1251) | -| Strokes, brushes, width profiles | 5 | 90% | more built-in brush libraries (ten generated in code including Tech Circuit, Ink and Wash, Bristle Brushes, Game Trails, Energy Beams and Dry Media are done; Art brush Overlap and Pattern brush auto corners are done), pen pressure on macOS (the windowing layer reports none there), Stylus Wheel, tilt, bearing and rotation for Art, Pattern and Bristle brushes and on native Wayland and the web | 8–15 | +| Strokes, brushes, width profiles | 5 | 90% | more built-in brush libraries (eleven generated in code including Ornamental, Tech Circuit, Ink and Wash, Bristle Brushes, Game Trails, Energy Beams and Dry Media are done; Art brush Overlap and Pattern brush auto corners are done), pen pressure on macOS (the windowing layer reports none there), Stylus Wheel, tilt, bearing and rotation for Art, Pattern and Bristle brushes and on native Wayland and the web | 8–15 | | Appearance, transparency, graphic styles, masks | 5 | 98% | Graphic Styles list fills a taller panel above its footer (#2992; scores and estimates unchanged); 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 (since done: #3061, #3063, #3785), SVG Filters, Transform Patterns and Scale Strokes & Effects on a fill's or stroke's own Transform effect | 6–10 | | 3D and Materials | 4 | ~25% | Initial Revolve, Extrude & Bevel, Inflate and Rotate, with simple lighting; materials, light presets, shadows, ray tracing, Rotate (Classic), Map Art and more complete visibility remain | 25–45 | @@ -578,7 +578,7 @@ since 2026-10-01. | **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` (and legacy version 7 `.ai` out, keeping layers, groups and type as text), 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 | -| **Bundled content:** brush, symbol, style and swatch libraries | ~46% | Ours are original and generated in code, and far fewer than Illustrator ships; symbol libraries have six (Basic Shapes, UI Frames with default 9-slice, Map Markers, Inventory Icons, Skill Icons, Weather Icons), graphic style libraries eleven (including Game HUD, Status Effects and Neon & Glow) and brush libraries ten (Art Ribbons, Ink and Wash, Calligraphic Nibs, Bristle Brushes, Pattern Borders, Scatter Shapes, Game Trails, Energy Beams, Dry Media, Tech Circuit) beside User Defined and Other Library… | +| **Bundled content:** brush, symbol, style and swatch libraries | ~46% | Ours are original and generated in code, and far fewer than Illustrator ships; symbol libraries have six (Basic Shapes, UI Frames with default 9-slice, Map Markers, Inventory Icons, Skill Icons, Weather Icons), graphic style libraries eleven (including Game HUD, Status Effects and Neon & Glow) and brush libraries eleven (Art Ribbons, Ink and Wash, Calligraphic Nibs, Bristle Brushes, Pattern Borders, Ornamental, Scatter Shapes, Game Trails, Energy Beams, Dry Media, Tech Circuit) beside User Defined and Other Library… | | **Performance** | unverified | Multithreaded, off-thread rendering and caches are in place. The last budget run (2026-10-01, loaded machine) measured 290 ms for a 50k-path fit against a 16 ms budget. Re-run `vectorcraft-cli perf` on an idle machine | | **Robustness** | good, new | ~2,840 tests, property tests, no panics in shipped code (lints, the `guard` safety net, import fuzzing), Data Recovery. Missing: a corpus of real-world files, Windows/Linux/browser QA | | **Platforms and 1.0 polish** | ~60% | The macOS app and the web build work, and Finder opens every readable format with the macOS app (#295, #354); on macOS the menus are in the system menu bar, laid out as a Mac app's, with the in-window menus as a fallback (`--in-window-menus`; verified on Windows and by cross-compilation, not yet by hand on a Mac); hybrid-graphics laptops render on the power-saving GPU by default on Windows and macOS (#306), and Windows starts on Direct3D 12, falling back to OpenGL, and loads no Vulkan driver unless `WGPU_BACKEND` asks for it (#545: Vulkan flickered black on an Intel GPU, DX12 and OpenGL didn't; #806: a faulty Vulkan driver crashed the app before its window appeared; verified by unit tests and the reporter's runs with `WGPU_BACKEND`), and Linux on the GPU the desktop runs on, since a Wayland compositor may refuse frames from the other one; a window that fails on its GPU while starting up starts again on the next one instead of crashing (#502; the dual-GPU Wayland case is verified by unit tests and cross-compilation, not on such hardware); web drops land in the document they were dropped on (#359); desktop drops carry no pointer position (winit 0.30), so a dropped document opens as a tab of its own and a picture or text is placed in the middle of the view, while the web places anything dropped on the canvas and opens what is dropped off it, as Illustrator does (#472); a web page that loses its WebGPU device or WebGL context restarts its graphics with the same documents (#369); on Linux/Wayland the clipboard reads the compositor's own (data-control) and copied image files paste, but files can't be dropped on the window under native Wayland until eframe moves to winit 0.31 (#398; the Wayland side is verified by compilation only), so Preferences › Performance › Linux Display Server › X11 (XWayland) opens the window through XWayland, where drops work (#1151; verified by unit tests and cross-compilation, not on a Wayland desktop); on Linux the Paste menu checks the system clipboard on a background thread, so a clipboard owner that never answers no longer freezes the window, while Windows and macOS keep their quick in-line check (#510; the X11 hang verified by the contributor, here by headless tests); on KDE Plasma 6.3+ under Wayland, pens and pen displays reach the app only under XWayland (`WAYLAND_DISPLAY=`) or with KWin's `KWIN_WAYLAND_EMULATE_TABLET=1`, since winit 0.30 has no Wayland tablet input (#491, not verified on hardware); Windows/Linux packaging and accessibility are pending | @@ -1146,7 +1146,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - **Reset Transformation** ([Transform symbols](https://helpx.adobe.com/illustrator/desktop/manage-objects/traces-mockups-symbols/transform-symbols.html), [Symbols panel options](https://helpx.adobe.com/illustrator/desktop/manage-objects/traces-mockups-symbols/symbols-panel-options.html)): the Symbols panel menu's Reset Transformation and the Control bar's Reset, shown while symbol instances are selected, give the selected instances their symbol's own scale again, without rotation or shear, as one undo step (`symbol.instance.resetTransform`); an instance in perspective is left as it is. VectorCraft's own rules: each instance keeps the center of its bounding box in place, reflection is removed too, and the menu item and the button are enabled only while a selected instance would change. Tests: `tests::brushsym::reset_transformation_restores_the_symbols_scale_and_keeps_the_center`, `reset_transformation_keeps_the_center_of_art_away_from_the_origin`, `reset_transformation_ignores_a_stored_size_that_is_not_positive`, `reset_transformation_leaves_unchanged_instances_and_refuses_bad_ids`, `panels::symbols::tests::reset_transformation_is_enabled_for_a_transformed_instance_and_resets_it`. - **The Symbols and Properties panels find selected symbol instances once per revision:** whether the selection or its groups hold a symbol instance (Break Link to Symbol), one with appearance changes of its own (Reset Symbol Instance and the Properties panel's Reset), or one Reset Transformation would change is worked out in one walk of the selected objects for each document revision, and later frames reuse it. The buttons and menu items are enabled as before. With one selected group of 300,000 paths, the two panels' reads took a median 5.1 to 5.7 ms of thread CPU time per frame; the first read after a change now takes about 3 ms and later frames about 5 ns (Linux, opt-level 3, median of 7 runs). In a small document the difference is too small to notice. Tests: `panels::symbols::tests::instance_flags_are_found_once_per_revision_and_match_a_walk_of_the_selection`, `properties_and_symbols_panels_walk_the_selection_once_per_revision`. - **Expand of dimensions:** Object › Expand, Expand Appearance, Create Outlines and Outline Stroke turn a dimension whose art they change into a plain group of that art, which stays as it is through later moves, scales and edits of what it measured; undo gives the live dimension back (`crates/engine/tests/it/dimensions.rs`; VectorCraft's own rule; estimated, score unchanged). - - **Brush libraries** ([public source](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/apply-and-edit-strokes/create-new-brush-libraries.html), [import](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/apply-and-edit-strokes/import-brushes-from-brush-libraries-or-other-files.html), [Brushes panel](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/apply-and-edit-strokes/brushes-panel-overview.html)): Window › Brush Libraries, the Brushes panel's Brush Libraries Menu and its menu's Open Brush Library open each library in a library panel of its own, as swatch, graphic style and symbol libraries do. The built-in libraries (Art Ribbons, Ink and Wash, Calligraphic Nibs, Bristle Brushes, Pattern Borders, Scatter Shapes, Game Trails, Energy Beams, Dry Media, Tech Circuit) are original brushes generated in code (`crates/engine/src/cmd/brushlib.rs`); Striped Ribbon's art is filled with the library's own pattern and Sparkles scatters the library's own symbol; Ink and Wash adds ink and wash brushes (the [help page](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/apply-and-edit-strokes/about-brushes.html) lists an Ink brush library of strokes with varied thickness and texture; the names, shapes and opacities are VectorCraft's own): Tapered Ink, an art brush broad near its start that thins to a fine tip; Brush Pen, a calligraphic brush whose size follows the pen pressure; and Soft Wash and Pooling Wash, art brushes of translucent gray layers that take the stroke color as tints; Game Trails adds motion art brushes (Speed Line, Dash Trail, Burst Ray, Zigzag); Energy Beams adds laser and plasma art brushes (Laser Bolt, Plasma Arc, Charge Wave, Spark Trail); Dry Media adds grainy art brushes (Chalk Grain, Graphite Pencil, Wax Crayon, Charcoal Dust). A click on a brush adds it to the document's Brushes as one undo step with every resource its art uses (patterns, symbols, swatches, graphic styles, images), makes it the current brush and, with paths selected, applies it to them in the same step; a brush the document already has is not added again and a different brush of the same name comes in numbered ("Wave 2"). Shift/Cmd-clicks select brushes for Add to Brushes; a brush dragged onto a path is added and applied to it, and one dragged onto the Brushes panel is added. Save Brushes… / the Brushes panel's Save Brush Library… write the document's brushes (or the selected ones) as a `.vectorcraft` library into the `Brushes` folder next to the preferences, listed under User Defined, or to a file; Other Library… reads the brushes of any document VectorCraft opens. Thumbnails, in the library panels, the Brushes panel and Brush Options, render brush art with the patterns and symbols it uses. Copying brushed art now carries the patterns and symbols its brush's art uses too. Tests: `crates/engine/src/tests/brushlib.rs`, `crates/ui-egui/src/panels/tests_brush_libraries.rs`, `panels::brushes::tests::library_brush_previews_show_the_patterns_their_art_uses`, `canvas::tests::a_library_brush_dropped_on_a_path_is_added_and_applied_in_one_step`. + - **Brush libraries** ([public source](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/apply-and-edit-strokes/create-new-brush-libraries.html), [import](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/apply-and-edit-strokes/import-brushes-from-brush-libraries-or-other-files.html), [Brushes panel](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/apply-and-edit-strokes/brushes-panel-overview.html)): Window › Brush Libraries, the Brushes panel's Brush Libraries Menu and its menu's Open Brush Library open each library in a library panel of its own, as swatch, graphic style and symbol libraries do. The built-in libraries (Art Ribbons, Ink and Wash, Calligraphic Nibs, Bristle Brushes, Pattern Borders, Ornamental, Scatter Shapes, Game Trails, Energy Beams, Dry Media, Tech Circuit) are original brushes generated in code (`crates/engine/src/cmd/brushlib.rs`); Striped Ribbon's art is filled with the library's own pattern and Sparkles scatters the library's own symbol; Ink and Wash adds ink and wash brushes (the [help page](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/apply-and-edit-strokes/about-brushes.html) lists an Ink brush library of strokes with varied thickness and texture; the names, shapes and opacities are VectorCraft's own): Tapered Ink, an art brush broad near its start that thins to a fine tip; Brush Pen, a calligraphic brush whose size follows the pen pressure; and Soft Wash and Pooling Wash, art brushes of translucent gray layers that take the stroke color as tints; Game Trails adds motion art brushes (Speed Line, Dash Trail, Burst Ray, Zigzag); Energy Beams adds laser and plasma art brushes (Laser Bolt, Plasma Arc, Charge Wave, Spark Trail); Dry Media adds grainy art brushes (Chalk Grain, Graphite Pencil, Wax Crayon, Charcoal Dust). A click on a brush adds it to the document's Brushes as one undo step with every resource its art uses (patterns, symbols, swatches, graphic styles, images), makes it the current brush and, with paths selected, applies it to them in the same step; a brush the document already has is not added again and a different brush of the same name comes in numbered ("Wave 2"). Shift/Cmd-clicks select brushes for Add to Brushes; a brush dragged onto a path is added and applied to it, and one dragged onto the Brushes panel is added. Save Brushes… / the Brushes panel's Save Brush Library… write the document's brushes (or the selected ones) as a `.vectorcraft` library into the `Brushes` folder next to the preferences, listed under User Defined, or to a file; Other Library… reads the brushes of any document VectorCraft opens. Thumbnails, in the library panels, the Brushes panel and Brush Options, render brush art with the patterns and symbols it uses. Copying brushed art now carries the patterns and symbols its brush's art uses too. Tests: `crates/engine/src/tests/brushlib.rs`, `crates/ui-egui/src/panels/tests_brush_libraries.rs`, `panels::brushes::tests::library_brush_previews_show_the_patterns_their_art_uses`, `canvas::tests::a_library_brush_dropped_on_a_path_is_added_and_applied_in_one_step`. - **Bristle Brushes library** ([What's new](https://helpx.adobe.com/illustrator/desktop/new-features/whats-new.html), [About brushes](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/apply-and-edit-strokes/about-brushes.html)): Window › Brush Libraries › Bristle Brushes holds ten bristle brushes, one for each tip shape (Fine Liner, Pointed Flat, Stubby Round, Dry Scrub, Soft Dome, Filbert, Angled Round, Angled Flat, Fan Blender, Grass Fan). The brushes, their names and their values are VectorCraft's own, and every value lies inside the range the bristle brush keeps (`brush.libraries`, `brush.addFromLibrary`; `the_bristle_brushes_library_covers_every_tip_shape_within_the_bristle_ranges`). - **Bristle strokes follow recorded pen input** ([brush documentation](https://helpx.adobe.com/pdf/cs6/illustrator_reference.pdf#page=201)): a Bristle brush in VectorCraft widens its strand spread and thickness with pressure along the stroke; pen tilt changes the spread, and bearing and barrel rotation turn it in the path's local frame. Missing pen channels use neutral values, and mouse strokes keep their existing appearance. This is VectorCraft's own rendering model; hardware-specific output has not been verified. `bristle_pen_pressure_changes_its_footprint`, `bristle_pen_pressure_is_sampled_along_the_stroke`, `trimmed_bristle_strands_read_pressure_where_they_begin` and `bristle_pen_orientation_changes_its_footprint` cover the geometry in `crates/brush/src/tests.rs`; `bristle_path_keeps_and_draws_its_pen_pose` covers saving and export in `crates/engine/src/tests/brushsym.rs`; area scores unchanged. - **Tech Circuit library:** Circuit Trace is a chamfered art brush with 45-degree elbows and terminal pads; Bus Lines repeats three parallel conductor lanes; Terminal Nodes repeats solder pads, circular test points and connecting leads. Original vector geometry generated in code, with Tints colorization and continuous pattern tile edges. Evidence: `the_tech_circuit_library_constructs_adds_and_applies_each_brush` in `crates/engine/src/tests/brushlib.rs` covers listing, finite geometry on straight, curved, short and closed paths, add/apply, undo/redo, deduplication and saved-library round trips. G5 remaining estimate 3–13 h (estimated); area scores unchanged. From 3056ebe9f9b88603179e8db20c89e476d09164b3 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 13:34:55 -0800 Subject: [PATCH 26/49] i18n: Inflate's refusal of graphics on a side is translated The refusal "Inflate maps graphics onto its front and back, not onto a side" gets an @msg row in each of the 24 complete-message catalogs, next to the Revolve row, so three_d_refusals_are_translated_in_every_complete_catalog passes. --- crates/ui-egui/src/i18n/ca.tsv | 1 + crates/ui-egui/src/i18n/cs.tsv | 1 + crates/ui-egui/src/i18n/da.tsv | 1 + crates/ui-egui/src/i18n/de.tsv | 1 + crates/ui-egui/src/i18n/el.tsv | 1 + crates/ui-egui/src/i18n/es.tsv | 1 + crates/ui-egui/src/i18n/fi.tsv | 1 + crates/ui-egui/src/i18n/fr.tsv | 1 + crates/ui-egui/src/i18n/hi.tsv | 1 + crates/ui-egui/src/i18n/hu.tsv | 1 + crates/ui-egui/src/i18n/it.tsv | 1 + crates/ui-egui/src/i18n/ja.tsv | 1 + crates/ui-egui/src/i18n/ka.tsv | 1 + crates/ui-egui/src/i18n/ko.tsv | 1 + crates/ui-egui/src/i18n/nl.tsv | 1 + crates/ui-egui/src/i18n/pl.tsv | 1 + crates/ui-egui/src/i18n/pt-br.tsv | 1 + crates/ui-egui/src/i18n/ru.tsv | 1 + crates/ui-egui/src/i18n/sv.tsv | 1 + crates/ui-egui/src/i18n/tr.tsv | 1 + crates/ui-egui/src/i18n/uk.tsv | 1 + crates/ui-egui/src/i18n/vi.tsv | 1 + crates/ui-egui/src/i18n/zh-hans.tsv | 1 + crates/ui-egui/src/i18n/zh-hant.tsv | 1 + 24 files changed, 24 insertions(+) diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 604bbb9028..bd34511544 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -6755,6 +6755,7 @@ liquify-list-end {0}, {1} {0} i {1} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` ha de ser una matriu @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Els gràfics s’apliquen als tipus d’objecte Pla, Extrusió, Revolució i Infla @msg Revolve maps graphics onto its side: map them onto the front Revoluciona aplica els gràfics al seu lateral: aplica’ls a la cara davantera +@msg Inflate maps graphics onto its front and back, not onto a side Infla aplica els gràfics a la cara davantera i a la posterior, no a un lateral @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on l’objecte {_1}: la cara posterior d’Infla només admet gràfics amb Tots dos costats i Tapa activats @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Els gràfics són massa complexos per a aquesta superfície: simplifica la il·lustració dels símbols o redueix Segments @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` admet com a màxim {MAX_GRAPHICS} gràfics diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 941b4da68a..538575924b 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -6550,6 +6550,7 @@ mark-style Japanese Japonské @msg `{GRAPHICS}` must be an array `{GRAPHICS}` musí být pole @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafika se mapuje na typy objektu Rovina, Vysunutí, Rotační těleso a Nafouknutí @msg Revolve maps graphics onto its side: map them onto the front Rotační těleso mapuje grafiku na svůj bok: umístěte ji na přední stranu +@msg Inflate maps graphics onto its front and back, not onto a side Nafouknutí mapuje grafiku na přední a zadní stranu, ne na bok @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on objekt {_1}: zadní strana Nafouknutí přijímá grafiku jen se zapnutými volbami Obě strany a Uzávěr @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafika je pro tento povrch příliš složitá: zjednodušte kresbu symbolů nebo snižte Segmenty @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` přijímá nejvýše {MAX_GRAPHICS} grafik diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index 789dcc430f..9f03515356 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -438,6 +438,7 @@ liquify-list-end {0}, {1} {0} og {1} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` skal være et array @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafik kortlægges på objekttyperne Plan, Ekstrudér, Omdrej og Pust op @msg Revolve maps graphics onto its side: map them onto the front Omdrej kortlægger grafik på siden: kortlæg den på forsiden +@msg Inflate maps graphics onto its front and back, not onto a side Pust op kortlægger grafik på forsiden og bagsiden, ikke på en side @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on objektet {_1}: bagsiden af Pust op tager kun imod grafik, når Begge sider og Kappe er slået til @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafikken er for kompleks til denne overflade: forenkl symbolernes grafik, eller reducér Segmenter @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` tager højst {MAX_GRAPHICS} grafikelementer diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index b0d5cff68c..7ff48b2d14 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -6118,6 +6118,7 @@ lighting Light Licht @msg `{GRAPHICS}` must be an array `{GRAPHICS}` muss ein Array sein @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafiken werden auf die Objekttypen Ebene, Extrudieren, Kreiseln und Aufblasen abgebildet @msg Revolve maps graphics onto its side: map them onto the front Kreiseln bildet Grafiken auf seiner Mantelfläche ab: Bilden Sie sie auf der Vorderseite ab +@msg Inflate maps graphics onto its front and back, not onto a side Aufblasen bildet Grafiken auf der Vorder- und Rückseite ab, nicht auf einer Seitenfläche @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on Objekt {_1}: Die Rückseite von „Aufblasen“ nimmt Grafiken nur mit aktivierten Optionen „Beidseitig“ und „Deckflächen“ auf @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Die Grafiken sind für diese Oberfläche zu komplex: Vereinfachen Sie das Bildmaterial der Symbole oder verringern Sie Segmente @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` nimmt höchstens {MAX_GRAPHICS} Grafiken auf diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 0166d82d30..e97c2cee65 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -5938,6 +5938,7 @@ variable-list-end {0}, {1} {0} και {1} @msg `{GRAPHICS}` must be an array το `{GRAPHICS}` πρέπει να είναι πίνακας @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Τα γραφικά αντιστοιχίζονται στους τύπους αντικειμένου Επίπεδο, Εξώθηση, Περιστροφή γύρω από άξονα και Φούσκωμα @msg Revolve maps graphics onto its side: map them onto the front Η Περιστροφή γύρω από άξονα αντιστοιχίζει τα γραφικά στην πλευρική της επιφάνεια: αντιστοιχίστε τα στην μπροστινή όψη +@msg Inflate maps graphics onto its front and back, not onto a side Το Φούσκωμα αντιστοιχίζει τα γραφικά στην μπροστινή και την πίσω όψη, όχι σε πλευρική επιφάνεια @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on το αντικείμενο {_1}: η πίσω όψη του Φουσκώματος δέχεται γραφικά μόνο με ενεργά τα Και οι δύο πλευρές και Κλείσιμο άκρου @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Τα γραφικά είναι πολύ σύνθετα για αυτή την επιφάνεια: απλοποιήστε το σχέδιο των συμβόλων ή μειώστε τα Τμήματα @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics το `{GRAPHICS}` δέχεται το πολύ {MAX_GRAPHICS} γραφικά diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index d52a76a65d..62578b6492 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -6523,6 +6523,7 @@ mark-style Japanese Japonesas @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Los gráficos se asignan a los tipos de objeto Plano, Extrusión, Revolución e Inflar Graphics map onto the Plane, Extrude, Revolve and Inflate object types. Los gráficos se asignan a los tipos de objeto Plano, Extrusión, Revolución e Inflar. @msg Revolve maps graphics onto its side: map them onto the front Revolución asigna los gráficos a su lateral: asígnelos a la cara frontal +@msg Inflate maps graphics onto its front and back, not onto a side Inflar asigna los gráficos a la cara frontal y a la posterior, no a un lateral @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on el objeto {_1}: la cara posterior de Inflar admite gráficos solo con Ambos lados y Tapa activados @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Los gráficos son demasiado complejos para esta superficie: simplifique la ilustración de los símbolos o reduzca Segmentos @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` admite como máximo {MAX_GRAPHICS} gráficos diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index c04fbd953c..395ba3d006 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -6455,6 +6455,7 @@ mark-style Japanese Japanilainen @msg `{GRAPHICS}` must be an array `{GRAPHICS}` on oltava taulukko @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafiikat sijoitetaan objektityypeille Taso, Pursota, Pyöräytä ja Täytä ilmalla @msg Revolve maps graphics onto its side: map them onto the front Pyöräytä sijoittaa grafiikat kylkeensä: sijoita ne etupuolelle +@msg Inflate maps graphics onto its front and back, not onto a side Täytä ilmalla sijoittaa grafiikat etu- ja takapuolelle, ei kylkeen @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on objekti {_1}: Täytä ilmalla -tehosteen takapuoli ottaa grafiikoita vain, kun Molemmat puolet ja Pääty ovat käytössä @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafiikat ovat liian monimutkaisia tälle pinnalle: yksinkertaista symbolien kuvitusta tai pienennä Segmentit-arvoa @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` hyväksyy enintään {MAX_GRAPHICS} grafiikkaa diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 01e15553dd..1dad86223b 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -6118,6 +6118,7 @@ lighting Light Lumière @msg `{GRAPHICS}` must be an array `{GRAPHICS}` doit être un tableau @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Les graphiques s’appliquent aux types d’objet Plan, Extrusion, Révolution et Gonfler @msg Revolve maps graphics onto its side: map them onto the front Révolution applique les graphiques sur sa face latérale : appliquez-les sur la face avant +@msg Inflate maps graphics onto its front and back, not onto a side Gonfler applique les graphiques sur la face avant et l’arrière, pas sur une face latérale @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on objet {_1} : l’arrière de Gonfler n’accepte des graphiques qu’avec Deux côtés et Fermeture activés @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Les graphiques sont trop complexes pour cette surface : simplifiez l’illustration des symboles ou réduisez Segments @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` accepte au plus {MAX_GRAPHICS} graphiques diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 36bfd90eb2..9d26d3b333 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -8647,6 +8647,7 @@ liquify-list-end {0}, {1} {0} और {1} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` एक ऐरे होना चाहिए @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types ग्राफ़िक्स समतल, एक्सट्रूड, रिवॉल्व और फुलाएँ ऑब्जेक्ट प्रकारों पर लगते हैं @msg Revolve maps graphics onto its side: map them onto the front रिवॉल्व ग्राफ़िक्स को अपनी बगल वाली सतह पर लगाता है: उन्हें सामने वाले फ़ेस पर लगाएँ +@msg Inflate maps graphics onto its front and back, not onto a side फुलाएँ ग्राफ़िक्स को सामने और पिछले फ़ेस पर लगाता है, बगल वाली सतह पर नहीं @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on ऑब्जेक्ट {_1}: फुलाएँ का पिछला फ़ेस ग्राफ़िक्स तभी लेता है जब दोनों तरफ़ और कैप चालू हों @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments ग्राफ़िक्स इस सतह के लिए बहुत जटिल हैं: सिंबल्स के आर्ट को सरल बनाएँ या सेगमेंट कम करें @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` अधिकतम {MAX_GRAPHICS} ग्राफ़िक्स लेता है diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 798ca1697d..61d314847b 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -6534,6 +6534,7 @@ variable-list-end {0}, {1} {0} és {1} @msg `{GRAPHICS}` must be an array a `{GRAPHICS}` értéke tömb kell legyen @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types A grafikák a Sík, a Kihúzás, a Forgatás tengely körül és a Felfújás objektumtípusra kerülnek @msg Revolve maps graphics onto its side: map them onto the front A Forgatás tengely körül a grafikákat a palástjára helyezi: az elülső oldalra helyezze őket +@msg Inflate maps graphics onto its front and back, not onto a side A Felfújás a grafikákat az elülső és a hátoldalra helyezi, nem az oldalára @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on {_1} objektum: a Felfújás hátoldala csak a Mindkét oldal és a Zárólap bekapcsolásával fogad grafikát @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments A grafikák túl összetettek ehhez a felülethez: egyszerűsítse a szimbólumok rajzát, vagy csökkentse a Szakaszok értékét @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics a `{GRAPHICS}` legfeljebb {MAX_GRAPHICS} grafikát fogad diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 1483c97f4a..698bc5d21c 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -6165,6 +6165,7 @@ lighting Light Luce @msg `{GRAPHICS}` must be an array `{GRAPHICS}` deve essere un array @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Le grafiche si applicano ai tipi di oggetto Piano, Estrusione, Rivoluzione e Gonfia @msg Revolve maps graphics onto its side: map them onto the front Rivoluzione applica le grafiche sul suo lato: applicatele sulla faccia anteriore +@msg Inflate maps graphics onto its front and back, not onto a side Gonfia applica le grafiche sulla faccia anteriore e sul retro, non su un lato @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on oggetto {_1}: il retro di Gonfia accetta grafiche solo con Entrambi i lati e Chiusura attivi @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Le grafiche sono troppo complesse per questa superficie: semplificate il disegno dei simboli o riducete Segmenti @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` accetta al massimo {MAX_GRAPHICS} grafiche diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index d4abe69ee5..35f58aa08f 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -6215,6 +6215,7 @@ lighting Light ライト @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types グラフィックはオブジェクトの種類が平面、押し出し、回転体、膨張のときにマッピングされます Graphics map onto the Plane, Extrude, Revolve and Inflate object types. グラフィックはオブジェクトの種類が平面、押し出し、回転体、膨張のときにマッピングされます。 @msg Revolve maps graphics onto its side: map them onto the front 回転体はグラフィックを側面にマッピングします。前面にマッピングしてください +@msg Inflate maps graphics onto its front and back, not onto a side 膨張はグラフィックを前面と背面にマッピングします。側面にはマッピングできません @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on オブジェクト {_1}: 「膨張」の背面にグラフィックをマッピングするには「両面」と「キャップ」をオンにしてください @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments グラフィックがこのサーフェスには複雑すぎます。シンボルのアートを単純化するか、分割数を減らしてください @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` に指定できるグラフィックは {MAX_GRAPHICS} 個までです diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index d03d46435f..f747fddad7 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -7902,6 +7902,7 @@ font-technology Variable ცვლადი @msg `{GRAPHICS}` must be an array `{GRAPHICS}` უნდა იყოს მასივი @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types გრაფიკა თავსდება ობიექტის ტიპებზე „სიბრტყე“, „ამოწევა“, „ბრუნვა“ და „გაბერვა“ @msg Revolve maps graphics onto its side: map them onto the front ბრუნვა გრაფიკას თავის გვერდით ზედაპირზე ათავსებს: განათავსეთ ისინი წინა მხარეზე +@msg Inflate maps graphics onto its front and back, not onto a side გაბერვა გრაფიკას წინა და უკანა მხარეზე ათავსებს და არა გვერდით ზედაპირზე @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on ობიექტი {_1}: გაბერვის უკანა მხარე გრაფიკას იღებს მხოლოდ ჩართული „ორივე მხარე“ და „თავსახური“ პარამეტრებით @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments გრაფიკა ზედმეტად რთულია ამ ზედაპირისთვის: გაამარტივეთ სიმბოლოების ნახატი ან შეამცირეთ სეგმენტები @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` იღებს მაქსიმუმ {MAX_GRAPHICS} გრაფიკას diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 363de4c969..637a06d4c3 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -6135,6 +6135,7 @@ lighting Light 광원 @msg `{GRAPHICS}` must be an array `{GRAPHICS}`은(는) 배열이어야 합니다 @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types 그래픽은 평면, 돌출, 회전체, 부풀리기 개체 유형에 매핑됩니다 @msg Revolve maps graphics onto its side: map them onto the front 회전체는 그래픽을 옆면에 매핑합니다. 앞면에 매핑하십시오 +@msg Inflate maps graphics onto its front and back, not onto a side 부풀리기는 그래픽을 앞면과 뒷면에 매핑하며 옆면에는 매핑하지 않습니다 @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on 개체 {_1}: 부풀리기의 뒷면에 그래픽을 매핑하려면 양면과 캡을 켜세요 @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments 그래픽이 이 표면에 비해 너무 복잡합니다. 심볼의 아트를 단순화하거나 세그먼트를 줄이십시오 @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}`에는 그래픽을 최대 {MAX_GRAPHICS}개까지 넣을 수 있습니다 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index b13e066e49..68377c6b2d 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -8306,6 +8306,7 @@ mark-style Japanese Japans @msg Graphics map onto planar faces: use the Extrude or Plane object type Illustraties worden op platte vlakken geplaatst: gebruik het objecttype Extruderen of Vlak @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Illustraties worden op de objecttypen Vlak, Extruderen, Draaien en Opblazen geplaatst @msg Revolve maps graphics onto its side: map them onto the front Draaien plaatst illustraties op de zijkant: plaats ze op de voorkant +@msg Inflate maps graphics onto its front and back, not onto a side Opblazen plaatst illustraties op de voorkant en de achterkant, niet op een zijkant @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on object {_1}: de achterkant van Opblazen neemt alleen afbeeldingen aan met Beide zijden en Dop ingeschakeld @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments De illustraties zijn te complex voor dit oppervlak: vereenvoudig de illustraties van de symbolen of verlaag Segmenten @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` neemt maximaal {MAX_GRAPHICS} illustraties op diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 4d5c25d727..97f6a8151e 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -6374,6 +6374,7 @@ mark-style Japanese Japońskie @msg `{GRAPHICS}` must be an array `{GRAPHICS}` musi być tablicą @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafiki są nakładane na obiekty typu Płaszczyzna, Wyciągnięcie, Obrót i Nadmuchanie @msg Revolve maps graphics onto its side: map them onto the front Obrót nakłada grafiki na swoją powierzchnię boczną: umieść je na przedniej stronie +@msg Inflate maps graphics onto its front and back, not onto a side Nadmuchanie nakłada grafiki na przednią i tylną stronę, a nie na powierzchnię boczną @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on obiekt {_1}: tył Nadmuchania przyjmuje grafiki tylko przy włączonych opcjach Obie strony i Zakończenie @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafiki są zbyt złożone dla tej powierzchni: uprość kompozycje symboli lub zmniejsz Segmenty @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` przyjmuje najwyżej {MAX_GRAPHICS} grafik diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 4aba908498..fe75a942a8 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -6500,6 +6500,7 @@ mark-style Japanese Japonesas @msg `{GRAPHICS}` must be an array `{GRAPHICS}` deve ser uma matriz @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Os gráficos são mapeados nos tipos de objeto Plano, Extrusão, Revolver e Inflar @msg Revolve maps graphics onto its side: map them onto the front Revolver mapeia os gráficos na sua lateral: mapeie-os na face frontal +@msg Inflate maps graphics onto its front and back, not onto a side Inflar mapeia os gráficos na face frontal e no verso, não em uma lateral @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on objeto {_1}: o verso de Inflar recebe gráficos apenas com Ambos os Lados e Tampa ativados @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Os gráficos são complexos demais para esta superfície: simplifique a arte dos símbolos ou reduza Segmentos @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` aceita no máximo {MAX_GRAPHICS} gráficos diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 2e236f1827..79219217e3 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -6162,6 +6162,7 @@ lighting Light Свет @msg `{GRAPHICS}` must be an array `{GRAPHICS}` должен быть массивом @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Графика наносится на объекты типов «Плоскость», «Выдавливание», «Вращение» и «Надувание» @msg Revolve maps graphics onto its side: map them onto the front «Вращение» наносит графику на свою боковую поверхность: размещайте её на передней стороне +@msg Inflate maps graphics onto its front and back, not onto a side «Надувание» наносит графику на переднюю и заднюю стороны, а не на боковую поверхность @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on объект {_1}: задняя сторона «Надувания» принимает графику только при включённых параметрах «С обеих сторон» и «Торцы» @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Графика слишком сложна для этой поверхности: упростите иллюстрации символов или уменьшите «Сегменты» @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` принимает не более {MAX_GRAPHICS} графических элементов diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 0a0ebced8f..d4d8354258 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -6036,6 +6036,7 @@ lighting Light Ljus @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafik placeras på objekttyperna Plan, Extrudera, Rotera runt axel och Blås upp Graphics map onto the Plane, Extrude, Revolve and Inflate object types. Grafik placeras på objekttyperna Plan, Extrudera, Rotera runt axel och Blås upp. @msg Revolve maps graphics onto its side: map them onto the front Rotera runt axel placerar grafik på sin mantelyta: placera den på framsidan +@msg Inflate maps graphics onto its front and back, not onto a side Blås upp placerar grafik på framsidan och baksidan, inte på en sida @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on objekt {_1}: baksidan av Blås upp tar emot grafik bara när Båda sidor och Lock är på @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafiken är för komplex för den här ytan: förenkla symbolernas teckning eller minska Segment @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` tar högst {MAX_GRAPHICS} grafiker diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index d5e33ac203..a059b476eb 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -5860,6 +5860,7 @@ lighting Light Işık @msg `{GRAPHICS}` must be an array `{GRAPHICS}` bir dizi olmalıdır @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafikler Düzlem, Ekstrüzyon, Eksen Etrafında Döndür ve Şişir nesne türlerine eşlenir @msg Revolve maps graphics onto its side: map them onto the front Eksen Etrafında Döndür grafikleri yan yüzeyine eşler: onları ön yüze eşle +@msg Inflate maps graphics onto its front and back, not onto a side Şişir grafikleri ön ve arka yüze eşler, yan yüze eşlemez @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on nesne {_1}: Şişir efektinin arka yüzü yalnızca Her iki taraf ve Kapak açıkken grafik alır @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafikler bu yüzey için çok karmaşık: sembollerin resmini basitleştir veya Segmentler değerini azalt @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` en fazla {MAX_GRAPHICS} grafik alır diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index bfc0e4bb75..229f71a8de 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -6145,6 +6145,7 @@ lighting Light Світло @msg `{GRAPHICS}` must be an array `{GRAPHICS}` має бути масивом @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Графіка наноситься на об’єкти типів «Площина», «Видавлювання», «Обертання» та «Надування» @msg Revolve maps graphics onto its side: map them onto the front «Обертання» наносить графіку на свою бічну поверхню: розміщуйте її на передній стороні +@msg Inflate maps graphics onto its front and back, not onto a side «Надування» наносить графіку на передній і задній боки, а не на бічну поверхню @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on об’єкт {_1}: задній бік «Надування» приймає графіку лише з увімкненими параметрами «З обох боків» і «Торці» @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Графіка надто складна для цієї поверхні: спростіть ілюстрації символів або зменште «Сегменти» @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` приймає не більше {MAX_GRAPHICS} графічних елементів diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 5b84157a6c..3e08dddb09 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -5958,6 +5958,7 @@ liquify-list-end {0}, {1} {0} và {1} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` phải là một mảng @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Đồ họa được đặt lên các loại đối tượng Mặt phẳng, Kéo dài, Xoay tròn và Phình @msg Revolve maps graphics onto its side: map them onto the front Xoay tròn đặt đồ họa lên mặt bên của nó: hãy đặt chúng lên mặt trước +@msg Inflate maps graphics onto its front and back, not onto a side Phình đặt đồ họa lên mặt trước và mặt sau, không đặt lên mặt bên @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on đối tượng {_1}: mặt sau của Phình chỉ nhận đồ họa khi bật Cả hai mặt và Nắp @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Đồ họa quá phức tạp cho bề mặt này: hãy đơn giản hóa hình vẽ của các ký hiệu hoặc giảm Đoạn @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` nhận tối đa {MAX_GRAPHICS} đồ họa diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index d28e8a698f..24ebfbae21 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -6416,6 +6416,7 @@ lighting Light 光源 @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types 图形映射到平面、突出、回转和膨胀对象类型上 Graphics map onto the Plane, Extrude, Revolve and Inflate object types. 图形映射到平面、突出、回转和膨胀对象类型上。 @msg Revolve maps graphics onto its side: map them onto the front 回转将图形映射到其侧面:请将图形映射到正面 +@msg Inflate maps graphics onto its front and back, not onto a side 膨胀将图形映射到正面和背面,不映射到侧面 @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on 对象 {_1}:只有打开“双面”和“封口”后,膨胀的背面才能贴图 @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments 图形对此表面过于复杂:请简化符号的图稿或减少分段数 @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` 最多接受 {MAX_GRAPHICS} 个图形 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 9627f43344..4f8cea925c 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -6264,6 +6264,7 @@ lighting Light 光源 @msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types 圖形會對應到「平面」、「突出」、「迴轉」與「膨脹」物件類型 Graphics map onto the Plane, Extrude, Revolve and Inflate object types. 圖形會對應到「平面」、「突出」、「迴轉」與「膨脹」物件類型。 @msg Revolve maps graphics onto its side: map them onto the front 迴轉會將圖形對應到其側面:請將圖形對應到正面 +@msg Inflate maps graphics onto its front and back, not onto a side 膨脹會將圖形對應到正面和背面,不會對應到側面 @msg object {_1}: Inflate's back takes graphics with Both sides and Cap on 物件 {_1}:只有開啟「雙面」和「封口」後,膨脹的背面才能對應圖形 @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments 圖形對此表面過於複雜:請簡化符號的圖稿或減少分段數 @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` 最多接受 {MAX_GRAPHICS} 個圖形 From 51da82254161e449474da1de36c070672cebe19c Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 14:42:09 -0800 Subject: [PATCH 27/49] Brushes: Filigree Arrow's shaft runs into its head with no gap The shaft ended at x = 84 while the head's inner edge starts at about x = 84.5 at the shaft's edges and x = 85 on its center line, so a straight stroke drew a gap between them. The shaft now ends at x = 86, overlapping the head without moving the tip. --- crates/engine/src/cmd/brushlib.rs | 3 ++- crates/engine/src/tests/brushlib.rs | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/cmd/brushlib.rs b/crates/engine/src/cmd/brushlib.rs index 8f72e64676..7eb1af3dba 100644 --- a/crates/engine/src/cmd/brushlib.rs +++ b/crates/engine/src/cmd/brushlib.rs @@ -529,7 +529,8 @@ fn ornamental() -> BrushLibrary { black(polygon(&[(60.0, 3.0), (66.0, 5.0), (72.0, -1.0), (67.0, -2.0)])), ]); let arrow = group(vec![ - black(shapes::rectangle(Rect::new(4.0, -0.7, 84.0, 0.7))), + // The shaft runs into the head's notch at x = 85 so the two overlap. + black(shapes::rectangle(Rect::new(4.0, -0.7, 86.0, 0.7))), black(polygon(&[(80.0, -6.5), (100.0, 0.0), (80.0, 6.5), (85.0, 0.0)])), ring(Point::new(7.0, 0.0), 4.0, 1.7), black(polygon(&[(25.0, -0.4), (31.0, -4.4), (37.0, -2.0), (31.0, 0.8)])), diff --git a/crates/engine/src/tests/brushlib.rs b/crates/engine/src/tests/brushlib.rs index aecce4717a..9b57a22bb0 100644 --- a/crates/engine/src/tests/brushlib.rs +++ b/crates/engine/src/tests/brushlib.rs @@ -334,6 +334,26 @@ fn ornamental_brushes_draw_flourishes_and_survive_a_saved_library() { assert_eq!(vectorcraft_brush::library(&reopened), lib.brushes); } +/// Filigree Arrow's shaft runs into its head with no gap, so a straight stroke draws one arrow. +#[test] +fn the_filigree_arrow_shaft_meets_its_head() { + let s = session(); + let (_, lib) = cmd::brushlib::library(&s, "Ornamental").unwrap(); + let BrushKind::Art(art) = &lib.brush("Filigree Arrow").unwrap().kind else { panic!("Filigree Arrow is not an art brush") }; + let mut parts = vec![]; + art.art.walk(&mut |c| { + if c.path_data().is_some() { + parts.push(c.contains_fn()); + } + }); + for y in [-0.6, 0.0, 0.6] { + for i in 0..=930 { + let p = vectorcraft_geom::Point::new(4.05 + 0.1 * f64::from(i), y); + assert!(parts.iter().any(|inside| inside(p)), "gap at {p:?}"); + } + } +} + #[test] fn pressure_sensitive_brushes_widen_with_pen_pressure_and_survive_a_saved_library() { let mut s = session(); From 735de46552f235a2843c021e1342d898ac79c0e4 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 17:54:18 -0800 Subject: [PATCH 28/49] Fill Area: tool.setOption accepts the Shape Builder options it shares main now checks every option tool.setOption gets against the tool before setting any, and a tool without its own check rejects every option. The Fill Area tool now checks its options with check_builder_options, as the Shape Builder does, so gapDetection, gapLength and openFilledAsClosed are accepted again and other keys or bad values are still errors. --- crates/tools/src/builder/fill_area.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/tools/src/builder/fill_area.rs b/crates/tools/src/builder/fill_area.rs index a3950fd997..f38c69b723 100644 --- a/crates/tools/src/builder/fill_area.rs +++ b/crates/tools/src/builder/fill_area.rs @@ -552,4 +552,7 @@ impl Tool for FillAreaTool { } self.hover = None; } + fn check_option(&self, key: &str, v: &Value) -> Result<(), String> { + check_builder_options(self.id(), &serde_json::Map::from_iter([(key.to_string(), v.clone())])) + } } From bbebe934720e1bd3f9028bd363e5e93a7bf2a3f2 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 19:03:03 -0800 Subject: [PATCH 29/49] Tests: count the Nature Icons symbols among the built-in library names The built-in symbol names test expects 37 distinct names now that Nature Icons adds Leaf, Flower, Tree, Mountain and Wave. --- crates/ui-egui/src/i18n/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ui-egui/src/i18n/tests.rs b/crates/ui-egui/src/i18n/tests.rs index d501933ed9..2205830253 100644 --- a/crates/ui-egui/src/i18n/tests.rs +++ b/crates/ui-egui/src/i18n/tests.rs @@ -696,7 +696,7 @@ fn built_in_library_symbol_names_are_in_complete_catalogs() { .flat_map(|(_, lib)| lib.doc.symbols.iter().map(|s| s.name.clone()).collect::>()) .collect(), ); - assert_eq!(names.len(), 32, "{names:?}"); + assert_eq!(names.len(), 37, "{names:?}"); let bad = lacking(&names, |c, n| c.plain(n).is_some()); assert!(bad.is_empty(), "{}", bad.join("\n")); } From a744960076b46ddd8ddbfaa3542803cdb0d2f016 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Thu, 19 Nov 2026 07:06:11 -0800 Subject: [PATCH 30/49] i18n: Indonesian rows for Inflate graphics messages --- crates/ui-egui/src/i18n/id.tsv | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index bf1867a7c6..befdcef979 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -341,8 +341,10 @@ @msg `{GRAPHICS}` face must be front, back or side face `{GRAPHICS}` harus front, back, atau side @msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} {key} `{GRAPHICS}` harus berupa angka dari {lo} sampai {hi} @msg `{GRAPHICS}` must be an array `{GRAPHICS}` harus berupa larik -@msg Graphics map onto the Plane, Extrude and Revolve object types Grafis dipetakan ke jenis objek Plane, Extrude, dan Revolve +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types Grafis dipetakan ke jenis objek Bidang, Ekstrusi, Revolusi, dan Gelembungkan @msg Revolve maps graphics onto its side: map them onto the front Revolusi memetakan grafis ke sisinya: petakan ke bagian depan +@msg Inflate maps graphics onto its front and back, not onto a side Gelembungkan memetakan grafis ke bagian depan dan belakangnya, bukan ke sisi +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on objek {_1}: bagian belakang Gelembungkan hanya menerima grafis saat Kedua sisi dan Ujung diaktifkan @msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments Grafis terlalu rumit untuk permukaan ini: sederhanakan karya simbol atau kurangi Segmen @msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` menerima paling banyak {MAX_GRAPHICS} grafis @msg A plane has one face: map its graphics onto the front Bidang memiliki satu sisi: petakan grafisnya ke bagian depan From a9b5d2ec7e2e7aa0aed6afe6a02cbe122664f766 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Thu, 19 Nov 2026 22:45:24 +0700 Subject: [PATCH 31/49] Brushes test: Soft Bloom's click comes after the Ornamental click it now follows --- crates/ui-egui/src/panels/tests_brush_libraries.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ui-egui/src/panels/tests_brush_libraries.rs b/crates/ui-egui/src/panels/tests_brush_libraries.rs index 19369b56a8..7e686fbc00 100644 --- a/crates/ui-egui/src/panels/tests_brush_libraries.rs +++ b/crates/ui-egui/src/panels/tests_brush_libraries.rs @@ -263,7 +263,7 @@ fn the_window_menu_and_the_brushes_panel_open_brush_libraries() { let r = app.run("window.brushLibrary", json!({"library": "Image Brush"})).unwrap(); assert_eq!((r["open"].as_str(), r["count"].as_u64()), (Some("image-brush"), Some(4))); let undo = undo_len(&app); - click(&mut app, &ctx, "Soft Bloom", Modifiers::NONE, 4.0); + click(&mut app, &ctx, "Soft Bloom", Modifiers::NONE, 5.0); assert!(has(&app, "Soft Bloom") && !has(&app, "Color Flecks")); assert_eq!(undo_len(&app), undo + 1); // Without brushes there is nothing to save. From 05fffe3020b736ba1a9c03f49bec288f7e33dbb0 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Thu, 19 Nov 2026 11:00:14 -0500 Subject: [PATCH 32/49] doc: delegate JPEG ICC replacement to craft-image-codecs --- Cargo.lock | 76 +++++++++++++++++++++--------------------- Cargo.toml | 64 +++++++++++++++++------------------ crates/doc/src/cmyk.rs | 56 ++----------------------------- 3 files changed, 73 insertions(+), 123 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 65cc426291..e18d893b03 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1001,7 +1001,7 @@ dependencies = [ [[package]] name = "craft-affinity" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "crc32fast", "flate2", @@ -1012,12 +1012,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "rayon", ] @@ -1025,12 +1025,12 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" [[package]] name = "craft-dxf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "craft-codepage", "encoding_rs", @@ -1042,7 +1042,7 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" [[package]] name = "craft-font-catalog" @@ -1061,12 +1061,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "gif", ] @@ -1074,7 +1074,7 @@ dependencies = [ [[package]] name = "craft-gzip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "flate2", ] @@ -1082,7 +1082,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "fixed_decimal", "icu_decimal", @@ -1105,7 +1105,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "craft-dds", "craft-jpeg", @@ -1132,7 +1132,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "thiserror 2.0.21", ] @@ -1140,7 +1140,7 @@ dependencies = [ [[package]] name = "craft-jxl" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "brotli-decompressor 5.0.3", "jixel", @@ -1151,7 +1151,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "egui", "serde", @@ -1161,7 +1161,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "brotli-decompressor 6.3.2", "chrono", @@ -1173,7 +1173,7 @@ dependencies = [ [[package]] name = "craft-metafile" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "encoding_rs", "image", @@ -1184,7 +1184,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "chrono", "craft-codepage", @@ -1194,7 +1194,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "hayro-interpret", "hayro-syntax", @@ -1205,7 +1205,7 @@ dependencies = [ [[package]] name = "craft-plotter" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "kurbo 0.13.1", "thiserror 2.0.21", @@ -1214,7 +1214,7 @@ dependencies = [ [[package]] name = "craft-print" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "craft-winprint-gdi", "log", @@ -1228,7 +1228,7 @@ dependencies = [ [[package]] name = "craft-proof" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "log", "miniz_oxide 0.9.1", @@ -1239,7 +1239,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "flate2", "kurbo 0.13.1", @@ -1248,7 +1248,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "encoding_rs", "flate2", @@ -1259,7 +1259,7 @@ dependencies = [ [[package]] name = "craft-stream-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "fax", "hayro-ccitt", @@ -1270,7 +1270,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "craft-image-codecs", "craft-xml", @@ -1291,7 +1291,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "serde", "thiserror 2.0.21", @@ -1300,7 +1300,7 @@ dependencies = [ [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "craft-fonts-build", "craft-i18n", @@ -1321,7 +1321,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "chrono", "dunce", @@ -1348,7 +1348,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "flate2", "serde", @@ -1370,7 +1370,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "egui", "objc2 0.6.5", @@ -1389,7 +1389,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "quick-xml 0.41.0", "serde", @@ -2496,7 +2496,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-cmap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "brotli", "hayro-postscript", @@ -2505,7 +2505,7 @@ dependencies = [ [[package]] name = "hayro-interpret" version = "0.7.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "bitflags 2.13.2", "hayro-cmap", @@ -2523,7 +2523,7 @@ dependencies = [ [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "fearless_simd", "hayro-ccitt", @@ -2541,12 +2541,12 @@ dependencies = [ [[package]] name = "hayro-postscript" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "flate2", "hayro-ccitt", @@ -3346,7 +3346,7 @@ dependencies = [ [[package]] name = "krilla" version = "0.8.2" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "base64 0.22.1", "bumpalo", @@ -3455,7 +3455,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" [[package]] name = "linesweeper" version = "0.5.0" -source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46" +source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" dependencies = [ "arrayvec", "kurbo 0.13.1", diff --git a/Cargo.toml b/Cargo.toml index fea9cdda55..6c5f122cca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,40 +11,40 @@ rust-version = "1.95" repository = "https://github.com/storytold/vectorcraft" [workspace.dependencies] -craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46", default-features = false, features = ["interpret", "write"] } -craft-print = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46", features = ["serde"] } -craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } +craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0", default-features = false, features = ["interpret", "write"] } +craft-print = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0", features = ["serde"] } +craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } # Decides who draws the window frame (desktop vs. app) so the suite shares one native titlebar per # desktop. The `egui` feature adds `craft_window::decorate`. (craft-libs#217.) -craft-window = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46", features = ["egui"] } +craft-window = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0", features = ["egui"] } # The `.vectorcraft` envelope: its members, version, embedded images and the data after the JSON. -craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } +craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } # craft-update: app-specific pretend versions apply to startup and manual checks. # Native Affinity documents (craft-libs#914). -craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } +craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } # SVG parsing, limits, SVGZ and writer (craft-libs#778). -craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46", features = ["tree"] } -craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } +craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0", features = ["tree"] } +craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } # EPS container, previews, ASCII85 and DSC comments (craft-libs#778). -craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } +craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } # DXF tags, reader and writer (craft-libs#778, #926, #927). -craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } +craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } # WMF, EMF and EMF+ reader (craft-libs#778). -craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46", default-features = false, features = ["write"] } -craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46", features = ["egui"] } +craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0", default-features = false, features = ["write"] } +craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0", features = ["egui"] } # internal vectorcraft-geom = { path = "crates/geom" } vectorcraft-color = { path = "crates/color" } @@ -185,13 +185,13 @@ lto = "thin" codegen-units = 1 [patch.crates-io] -hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -krilla = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } -linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" } +hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +krilla = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } +linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } ecolor = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } emath = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } epaint = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } diff --git a/crates/doc/src/cmyk.rs b/crates/doc/src/cmyk.rs index d1b9b4a6ed..0b58831a35 100644 --- a/crates/doc/src/cmyk.rs +++ b/crates/doc/src/cmyk.rs @@ -639,8 +639,7 @@ fn jpeg_icc(bytes: &[u8]) -> Option> { craft_image_codecs::jpeg_inks::jpeg_icc_profile(bytes) } -/// The bytes after an `ICC_PROFILE` APP2 segment's length: its name, then the segment's number and -/// the count of segments. +#[cfg(test)] const ICC_SEGMENT: &[u8; 12] = b"ICC_PROFILE\0"; /// JPEG `bytes` carrying `icc` in place of the ICC profile they carry, if any: every @@ -649,63 +648,14 @@ const ICC_SEGMENT: &[u8; 12] = b"ICC_PROFILE\0"; /// for bytes whose segments before the scan can't be read, an empty `icc`, and one longer than 255 /// segments hold. pub fn jpeg_with_icc(bytes: &[u8], icc: &[u8]) -> Option> { - // A segment's length counts itself (2 bytes) and the name, number and count (14). - const CHUNK: usize = 0xFFFF - 2 - ICC_SEGMENT.len() - 2; - let chunks: Vec<&[u8]> = icc.chunks(CHUNK).collect(); - let count = u8::try_from(chunks.len()).ok().filter(|n| *n > 0)?; - let mut segments = Vec::with_capacity(icc.len() + 18 * chunks.len()); - for (i, chunk) in chunks.iter().enumerate() { - let len = u16::try_from(chunk.len() + 2 + ICC_SEGMENT.len() + 2).ok()?; - segments.extend_from_slice(&[0xFF, 0xE2]); - segments.extend_from_slice(&len.to_be_bytes()); - segments.extend_from_slice(ICC_SEGMENT); - segments.extend_from_slice(&[u8::try_from(i + 1).ok()?, count]); - segments.extend_from_slice(chunk); - } - with_icc_segments(bytes, segments) + craft_image_codecs::jpeg_inks::jpeg_with_icc(bytes, icc) } /// JPEG `bytes` without the ICC profile they carry: every `ICC_PROFILE` APP2 segment before the /// scan taken out, and the other segments and the scan as they are. `None` for bytes whose /// segments before the scan can't be read. pub fn jpeg_without_icc(bytes: &[u8]) -> Option> { - with_icc_segments(bytes, vec![]) -} - -/// JPEG `bytes` with every `ICC_PROFILE` APP2 segment before the scan taken out and `segments` -/// written after the leading application segments; `None` when the bytes don't start a JPEG or -/// their segments before the scan can't be read. -fn with_icc_segments(bytes: &[u8], segments: Vec) -> Option> { - if !bytes.starts_with(&[0xFF, 0xD8]) { - return None; - } - let mut out = Vec::with_capacity(bytes.len() + segments.len()); - out.extend_from_slice(&[0xFF, 0xD8]); - let mut icc_segments = Some(segments); - let mut at = 2; - // The segments before the scan (SOS), each with its length; a marker without one ends them. - // Fill bytes (0xFF) before a marker are left out. - loop { - while bytes.get(at..at + 2) == Some(&[0xFF, 0xFF]) { - at += 1; - } - let (Some(&0xFF), Some(&marker)) = (bytes.get(at), bytes.get(at + 1)) else { return None }; - let app = (0xE0..=0xEF).contains(&marker); - if !app && let Some(s) = icc_segments.take() { - out.extend_from_slice(&s); - } - if matches!(marker, 0xDA | 0xD8 | 0xD9 | 0x01 | 0xD0..=0xD7) { - break; - } - let len = usize::from(u16::from_be_bytes(bytes.get(at + 2..at + 4)?.try_into().ok()?)); - let segment = bytes.get(at..(at + 2).checked_add(len)?).filter(|_| len >= 2)?; - if !(marker == 0xE2 && segment.get(4..16) == Some(ICC_SEGMENT.as_slice())) { - out.extend_from_slice(segment); - } - at += segment.len(); - } - out.extend_from_slice(bytes.get(at..)?); - Some(out) + craft_image_codecs::jpeg_inks::jpeg_without_icc(bytes) } /// `icc` when it is a profile of CMYK colors, which the samples of a CMYK image are in. From 8278acd932797f84cf0885a8f8252f412f805c8e Mon Sep 17 00:00:00 2001 From: bflatastic Date: Fri, 20 Nov 2026 00:37:23 +0700 Subject: [PATCH 33/49] Brushes test: the brush libraries panel test's clicks are numbered in order --- crates/ui-egui/src/panels/tests_brush_libraries.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/panels/tests_brush_libraries.rs b/crates/ui-egui/src/panels/tests_brush_libraries.rs index f8278a6d5c..af369a165f 100644 --- a/crates/ui-egui/src/panels/tests_brush_libraries.rs +++ b/crates/ui-egui/src/panels/tests_brush_libraries.rs @@ -265,7 +265,7 @@ fn the_window_menu_and_the_brushes_panel_open_brush_libraries() { assert_eq!((r["open"].as_str(), r["count"].as_u64()), (Some("paint"), Some(4))); let path = app.run("shape.line", json!({"x1": 10, "y1": 140, "x2": 180, "y2": 140})).unwrap()["id"].as_u64().unwrap(); let undo = undo_len(&app); - click(&mut app, &ctx, "Flat Sweep", Modifiers::NONE, 4.0); + click(&mut app, &ctx, "Flat Sweep", Modifiers::NONE, 5.0); assert!(has(&app, "Flat Sweep") && !has(&app, "Dry Drag")); assert_eq!(undo_len(&app), undo + 1); assert_eq!( @@ -275,7 +275,7 @@ fn the_window_menu_and_the_brushes_panel_open_brush_libraries() { let r = app.run("window.brushLibrary", json!({"library": "Image Brush"})).unwrap(); assert_eq!((r["open"].as_str(), r["count"].as_u64()), (Some("image-brush"), Some(4))); let undo = undo_len(&app); - click(&mut app, &ctx, "Soft Bloom", Modifiers::NONE, 5.0); + click(&mut app, &ctx, "Soft Bloom", Modifiers::NONE, 6.0); assert!(has(&app, "Soft Bloom") && !has(&app, "Color Flecks")); assert_eq!(undo_len(&app), undo + 1); // Without brushes there is nothing to save. From 71744ef8147192fcea6bba16591cab7a918d050d Mon Sep 17 00:00:00 2001 From: bflatastic Date: Fri, 20 Nov 2026 00:48:44 +0700 Subject: [PATCH 34/49] i18n: one Leaf row per catalog, main's, where main already had one --- crates/ui-egui/src/i18n/de.tsv | 1 - crates/ui-egui/src/i18n/gu.tsv | 1 - crates/ui-egui/src/i18n/it.tsv | 1 - crates/ui-egui/src/i18n/ja.tsv | 1 - crates/ui-egui/src/i18n/ko.tsv | 1 - crates/ui-egui/src/i18n/uk.tsv | 1 - crates/ui-egui/src/i18n/vi.tsv | 1 - crates/ui-egui/src/i18n/zh-hans.tsv | 1 - crates/ui-egui/src/i18n/zh-hant.tsv | 1 - 9 files changed, 9 deletions(-) diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index dfc261856e..0e3c4f8c66 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -10390,7 +10390,6 @@ breakText Glyphs Glyphen @msg A fold line is on a non-printing layer. Eine Faltlinie liegt auf einer nicht druckbaren Ebene. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Felder: {panels}, Scharniere: {hinges}, Fehler: {errors}, Warnungen: {warnings} Nature Icons Natursymbole - Leaf Blatt Flower Blume Tree Baum Mountain Berg diff --git a/crates/ui-egui/src/i18n/gu.tsv b/crates/ui-egui/src/i18n/gu.tsv index d2fccf1a92..021f3c409c 100644 --- a/crates/ui-egui/src/i18n/gu.tsv +++ b/crates/ui-egui/src/i18n/gu.tsv @@ -5637,7 +5637,6 @@ swatch [Registration] [રજિસ્ટ્રેશન] Standard Every-line Composer સ્ટાન્ડર્ડ એવરી-લાઇન કમ્પોઝર @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer આમાંથી એક હોવું જોઈએ: "singleLine", "everyLine", "standardSingleLine" અથવા "standardEveryLine" Nature Icons પ્રકૃતિ ચિહ્નો - Leaf પાન Flower ફૂલ Tree વૃક્ષ Mountain પર્વત diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 2201ccba67..ac2b88757c 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -10424,7 +10424,6 @@ breakText Glyphs Glifi @msg A fold line is on a non-printing layer. Una linea di piega si trova su un livello non stampabile. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Pannelli: {panels}, cerniere: {hinges}, errori: {errors}, avvisi: {warnings} Nature Icons Icone della natura - Leaf Foglia Flower Fiore Tree Albero Mountain Montagna diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index ef5722fdc3..824e69a0d3 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -10487,7 +10487,6 @@ breakText Glyphs 字形 @msg A fold line is on a non-printing layer. 折り線が印刷しないレイヤーにあります。 @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} パネル: {panels}、ヒンジ: {hinges}、エラー: {errors}、警告: {warnings} Nature Icons 自然アイコン - Leaf 葉 Flower 花 Tree 木 Mountain 山 diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index a56d1feeee..63c6fb7e69 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -10387,7 +10387,6 @@ breakText Glyphs 글리프 @msg A fold line is on a non-printing layer. 접는 선이 인쇄되지 않는 레이어에 있습니다. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} 패널: {panels}, 힌지: {hinges}, 오류: {errors}, 경고: {warnings} Nature Icons 자연 아이콘 - Leaf 잎 Flower 꽃 Tree 나무 Mountain 산 diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 1ae0b4ec1f..0317d48fdd 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -10400,7 +10400,6 @@ breakText Glyphs Гліфи @msg A fold line is on a non-printing layer. Лінія згину лежить на шарі, що не друкується. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Панелі: {panels}, шарніри: {hinges}, помилки: {errors}, попередження: {warnings} Nature Icons Значки природи - Leaf Листок Flower Квітка Tree Дерево Mountain Гора diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 43d404988a..b43c160a04 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -8597,7 +8597,6 @@ breakText Glyphs Glyph @msg {w} × {h} pixels is too large for PSD (at most {MAX_SIDE} pixels a side): lower the resolution {w} × {h} điểm ảnh quá lớn cho PSD (tối đa {MAX_SIDE} điểm ảnh mỗi cạnh): hãy giảm độ phân giải @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer phải là "singleLine", "everyLine", "standardSingleLine" hoặc "standardEveryLine" Nature Icons Biểu tượng thiên nhiên - Leaf Lá Flower Hoa Tree Cây Mountain Núi diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index a9f7a62b1f..c8a35229ee 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -10592,7 +10592,6 @@ breakText Glyphs 字形 @msg Two panels pass through each other. 两个面板相互穿插。 @msg {w} × {h} pixels is too large for PSD (at most {MAX_SIDE} pixels a side): lower the resolution {w} × {h} 像素对 PSD 而言过大 (每边最多 {MAX_SIDE} 像素):请降低分辨率 Nature Icons 自然图标 - Leaf 叶子 Flower 花朵 Tree 树木 Mountain 山脉 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 9ac79e5c5c..07a4fd319f 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -10407,7 +10407,6 @@ breakText Glyphs 字符 @msg Two panels pass through each other. 兩個面板相互穿插。 @msg {what} would print on more than {MAX_TILES} tiles: scale it down {what} 會列印在超過 {MAX_TILES} 個拼貼上:請縮小 Nature Icons 自然圖示 - Leaf 葉子 Flower 花朵 Tree 樹木 Mountain 山脈 From 7d055942b2b288339c415e8bdaaa2fa0963bf2f7 Mon Sep 17 00:00:00 2001 From: HassanKhan Date: Thu, 19 Nov 2026 23:00:23 +0500 Subject: [PATCH 35/49] Layers: keep the targeted ring visible around the appearance dot (#8711) A target circle whose item was targeted and had an appearance of its own painted the 3.2 px appearance dot over the 2.8 px inner ring, so it looked the same as an untargeted item with an appearance. The marks now come from target_marks: when both apply, the dot shrinks to 1.5 px inside the ring, leaving a gap, so the four states look different. --- crates/ui-egui/src/panels/layers/rows.rs | 33 ++++++++++--- crates/ui-egui/src/panels/layers/tests.rs | 60 ++++++++++++++++++++++- docs/ui-parity.md | 3 +- 3 files changed, 87 insertions(+), 9 deletions(-) diff --git a/crates/ui-egui/src/panels/layers/rows.rs b/crates/ui-egui/src/panels/layers/rows.rs index 3dc23f2c9f..27b81a1d0d 100644 --- a/crates/ui-egui/src/panels/layers/rows.rs +++ b/crates/ui-egui/src/panels/layers/rows.rs @@ -926,8 +926,28 @@ fn shows_targeted(view: &View, n: &Node, is_sel: bool) -> bool { } } -/// The target circle of `n`'s row at `c`: a ring, doubled while `n` is targeted, filled when `n` -/// has an appearance or transparency of its own. Its response is clicked to target `n`; dragging +/// The radius of the inner ring of a targeted item's target circle (the double ring); the outer +/// ring's radius is 5. +pub(super) const TARGET_RING: f32 = 2.8; +/// The width of the inner ring. +pub(super) const TARGET_STROKE: f32 = 1.0; +/// The radius of the dot filling the circle of an item that has an appearance of its own and is +/// not targeted. +pub(super) const TARGET_DOT: f32 = 3.2; +/// The radius of that dot inside a targeted item's inner ring: clear of the ring, so a targeted +/// item with an appearance of its own shows both (#8711). +pub(super) const TARGET_DOT_IN_RING: f32 = 1.5; + +/// The marks inside a target circle's outer ring: the inner ring's radius when the item is +/// `targeted`, and the appearance dot's radius when it is `styled` (has an appearance of its own). +/// Each of the four combinations looks different, as the Layers panel's target icons do. +pub(super) fn target_marks(targeted: bool, styled: bool) -> (Option, Option) { + let dot = if targeted { TARGET_DOT_IN_RING } else { TARGET_DOT }; + (targeted.then_some(TARGET_RING), styled.then_some(dot)) +} + +/// The target circle of `n`'s row at `c`: a ring, doubled while `n` is targeted, with a dot when +/// `n` has an appearance or transparency of its own ([`target_marks`]). Its response is clicked to target `n`; dragging /// it carries `n`'s appearance ([`PanelDrag::Appearance`]) onto another row's circle (Alt /// copies it) or the trash. fn target_circle(ui: &mut Ui, n: &Node, c: egui::Pos2, h: f32, targeted: bool, actions: &mut Vec<(String, Value)>, t: &Tokens) -> egui::Response { @@ -946,11 +966,12 @@ fn target_circle(ui: &mut Ui, n: &Node, c: egui::Pos2, h: f32, targeted: bool, a } let ring = if held { t.accent } else { t.icon }; ui.painter().circle_stroke(c, 5.0, Stroke::new(if held { 1.5 } else { 1.0 }, ring)); - if targeted { - ui.painter().circle_stroke(c, 2.8, Stroke::new(1.0, t.icon)); + let (inner, dot) = target_marks(targeted, has_styled_target(n)); + if let Some(r) = inner { + ui.painter().circle_stroke(c, r, Stroke::new(TARGET_STROKE, t.icon)); } - if has_styled_target(n) { - ui.painter().circle_filled(c, 3.2, t.icon); + if let Some(r) = dot { + ui.painter().circle_filled(c, r, t.icon); } if resp.dragged_by(egui::PointerButton::Primary) { ui.ctx().set_cursor_icon(egui::CursorIcon::Grabbing); diff --git a/crates/ui-egui/src/panels/layers/tests.rs b/crates/ui-egui/src/panels/layers/tests.rs index fd463ee558..0fab685279 100644 --- a/crates/ui-egui/src/panels/layers/tests.rs +++ b/crates/ui-egui/src/panels/layers/tests.rs @@ -7,7 +7,8 @@ use super::*; fn filled_targets(app: &mut VectorcraftApp, ctx: &egui::Context) -> usize { let mut out = ctx.run_ui(egui::RawInput::default(), |ui| show(app, ui)); out.textures_delta.clear(); - out.shapes.iter().filter(|c| matches!(&c.shape, egui::Shape::Circle(cs) if cs.radius == 3.2 && cs.fill != Color32::TRANSPARENT)).count() + let dot = |r: f32| r == rows::TARGET_DOT || r == rows::TARGET_DOT_IN_RING; + out.shapes.iter().filter(|c| matches!(&c.shape, egui::Shape::Circle(cs) if dot(cs.radius) && cs.fill != Color32::TRANSPARENT)).count() } /// A generated `` name is translated where painted; an unnamed text object's text never @@ -417,12 +418,67 @@ fn targeted_rows(app: &mut VectorcraftApp, ctx: &egui::Context) -> Vec { let rings: Vec = out .shapes .iter() - .filter(|c| matches!(&c.shape, egui::Shape::Circle(cs) if cs.radius == 2.8)) + .filter(|c| matches!(&c.shape, egui::Shape::Circle(cs) if cs.radius == rows::TARGET_RING)) .map(|c| c.shape.visual_bounding_rect().center()) .collect(); circles.iter().enumerate().filter(|(_, c)| rings.iter().any(|r| r.distance(**c) < 0.5)).map(|(i, _)| i).collect() } +/// The marks one headless frame paints inside the outer ring of each target circle, top row +/// first: per circle, its (radius, fill, stroke width) circles, sorted by radius. +fn target_marks_painted(app: &mut VectorcraftApp, ctx: &egui::Context) -> Vec> { + let (circles, _) = frame(app, ctx, vec![], false); + let mut out = ctx.run_ui(egui::RawInput::default(), |ui| show(app, ui)); + out.textures_delta.clear(); + circles + .iter() + .map(|c| { + let mut marks: Vec<(f32, bool, f32)> = out + .shapes + .iter() + .filter_map(|s| match &s.shape { + egui::Shape::Circle(cs) if cs.radius < 5.0 && cs.center.distance(*c) < 0.01 => { + Some((cs.radius, cs.fill != Color32::TRANSPARENT, cs.stroke.width)) + } + _ => None, + }) + .collect(); + marks.sort_by(|a, b| a.0.total_cmp(&b.0)); + marks + }) + .collect() +} + +/// A targeted item with an appearance of its own keeps its inner ring in view: the appearance +/// dot sits inside the ring with a gap, so the four looks (neither, targeted, with an appearance, +/// both) differ, as the target icons the Appearance attributes help describes do (#8711). +#[test] +fn a_targeted_circle_with_an_appearance_shows_both_ring_and_dot() { + let (mut app, _layer, [a, b]) = two_rects(); + app.session.execute("transparency.set", &json!({"ids": [a.0], "opacity": 30})).unwrap(); + let ctx = egui::Context::default(); + // Rows top down: the layer, b, a. + let marks = target_marks_painted(&mut app, &ctx); + assert_eq!(marks.len(), 3); + let (neither, styled) = (marks[1].clone(), marks[2].clone()); + app.session.execute("layer.target", &json!({"id": b.0})).unwrap(); + let targeted = target_marks_painted(&mut app, &ctx)[1].clone(); + app.session.execute("layer.target", &json!({"id": a.0})).unwrap(); + let both = target_marks_painted(&mut app, &ctx)[2].clone(); + // The inner ring is painted, and nothing filled reaches its inner edge. + let ring = both.iter().find(|m| m.0 == rows::TARGET_RING && !m.1).expect("the inner ring"); + let inner_edge = ring.0 - ring.2 / 2.0; + let dot = both.iter().find(|m| m.1).expect("the appearance dot"); + assert!(dot.0 + dot.2 / 2.0 < inner_edge - 0.5, "the dot {dot:?} covers the ring {ring:?}"); + let looks = [&neither, &targeted, &styled, &both]; + for (i, x) in looks.iter().enumerate() { + for y in &looks[i + 1..] { + assert_ne!(x, y, "two states look the same: {looks:?}"); + } + } + assert_eq!(neither, vec![]); +} + /// A layer added to the selection from its target circle shows as targeted, as an object added /// the same way does (#8646): with nothing targeted, a layer's circle shows its inner ring while /// all of its visible, unlocked art is selected, and not while only part of it is. diff --git a/docs/ui-parity.md b/docs/ui-parity.md index 1418ed4cf8..7b87e825cb 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -1,6 +1,6 @@ # UI and interaction parity -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (Artboard tool: Shift held once a move or Alt-copy drag is under way keeps it to the level, upright or 45° line, #8580; scores and estimates unchanged; previously: Image Trace Ignore Color keeps the canvas View and stays armed on a missed pixel (#8068); Canvas context menu: a right-click on a path offers Simplify… next to Smooth…, opening the Simplify slider, or the Simplify dialog kept for next time, as Object › Path › Simplify… does, #8344; scores and estimates unchanged; previously: a tool drag held near an edge of the canvas scrolls the view, #8551; scores and estimates unchanged; previously: G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s, part of #5930; scores and estimates unchanged; previously: All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, and a hovered dimmed row takes the panel's darker fill so it stays readable, #8294; scores and estimates unchanged; previously: : selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: Layersselected Dimension extension-line color and weight in Properties (#7078; four focused UI regressions passed); scores and estimates unchanged; previously: Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); scores and estimates unchanged; previously: Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Layers panel: Alt over the list shows the copy cursor while rows or the selected-art square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar; previously minor: Ruler origin: the corner drag snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Outline view: images and gradient meshes are picked on what Outline draws, so a click inside them reaches the path behind, #6437; previously minor: a middle-click on a document tab closes it, #6506; previously minor: Blob Brush: a round tip's preview is the outline of the area it adds, round at both ends, as the stroke it commits (#4343); scores and estimates unchanged; previously:; ruler double-click adds a guide at the pointer, #5239; G5: Inventory Icons built-in symbol library (four built-ins); previously minor: files that record no units open in Preferences › Units › General, #5820; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Layers: Rename (`ui.rename`) opens the name field of the selected layer, group or object, #5324; Properties in Edit Artboards: Transform section above the Artboards section, #5219; scrubby labels: the Control bar's Stroke: and Opacity: links and the Properties panel's Stroke link scrub their fields, #4088; Properties: Quick Actions has Repeat Options for one selected repeat, #5181; Direct Selection: Shift-click picks several blend spine points, which drag together, #5285; Direct Selection: Cmd/Ctrl held lends the Selection tool and shows its bounding box, #3901; Join tool trims two crossing open paths and joins them at the crossing, #5844; Control bar: Paragraph: link and Align left/center/right while type is selected, #5372; shape tools: a press on the selection's centre point moves it and one in the rotate zone outside a box corner turns it, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; Units › East Asian Type acts, with Q and Ha units; scores unchanged) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (Layers: a targeted item with an appearance of its own keeps its inner ring visible around a smaller appearance dot, so the target circle's four looks differ, #8711; scores and estimates unchanged; previously: Artboard tool: Shift held once a move or Alt-copy drag is under way keeps it to the level, upright or 45° line, #8580; scores and estimates unchanged; previously: Image Trace Ignore Color keeps the canvas View and stays armed on a missed pixel (#8068); Canvas context menu: a right-click on a path offers Simplify… next to Smooth…, opening the Simplify slider, or the Simplify dialog kept for next time, as Object › Path › Simplify… does, #8344; scores and estimates unchanged; previously: a tool drag held near an edge of the canvas scrolls the view, #8551; scores and estimates unchanged; previously: G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s, part of #5930; scores and estimates unchanged; previously: All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, and a hovered dimmed row takes the panel's darker fill so it stays readable, #8294; scores and estimates unchanged; previously: : selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: Layersselected Dimension extension-line color and weight in Properties (#7078; four focused UI regressions passed); scores and estimates unchanged; previously: Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); scores and estimates unchanged; previously: Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Layers panel: Alt over the list shows the copy cursor while rows or the selected-art square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar; previously minor: Ruler origin: the corner drag snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Outline view: images and gradient meshes are picked on what Outline draws, so a click inside them reaches the path behind, #6437; previously minor: a middle-click on a document tab closes it, #6506; previously minor: Blob Brush: a round tip's preview is the outline of the area it adds, round at both ends, as the stroke it commits (#4343); scores and estimates unchanged; previously:; ruler double-click adds a guide at the pointer, #5239; G5: Inventory Icons built-in symbol library (four built-ins); previously minor: files that record no units open in Preferences › Units › General, #5820; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Layers: Rename (`ui.rename`) opens the name field of the selected layer, group or object, #5324; Properties in Edit Artboards: Transform section above the Artboards section, #5219; scrubby labels: the Control bar's Stroke: and Opacity: links and the Properties panel's Stroke link scrub their fields, #4088; Properties: Quick Actions has Repeat Options for one selected repeat, #5181; Direct Selection: Shift-click picks several blend spine points, which drag together, #5285; Direct Selection: Cmd/Ctrl held lends the Selection tool and shows its bounding box, #3901; Join tool trims two crossing open paths and joins them at the crossing, #5844; Control bar: Paragraph: link and Align left/center/right while type is selected, #5372; shape tools: a press on the selection's centre point moves it and one in the rotate zone outside a box corner turns it, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; Units › East Asian Type acts, with Q and Ha units; scores unchanged) > > Tech Circuit update (2026-11-14): three original procedural brushes; ten built-in brush libraries (G5). > @@ -620,6 +620,7 @@ before release (#6373). [Paint faces and edges](https://helpx.adobe.com/illustra | Date | Change | Summary | |---|---|---| +| 2026-11-19 | minor | Layers: a target circle whose item is targeted and has an appearance of its own keeps its inner ring visible, with a smaller appearance dot inside it and a gap between them, so not targeted, targeted, with an appearance and both look different, as the target icons in [Appearance attributes](https://helpx.adobe.com/illustrator/using/appearance-attributes.html) (Targeting items for appearance attributes) do. Before, the dot covered the ring and a targeted item with an appearance looked untargeted, #8711. Scores and estimates unchanged. | | 2026-11-19 | minor | Artboard tool: Shift held once a move or an Alt-drag copy of an artboard is under way keeps it to the level, upright or 45° line from General › Constrain Angle, and snaps slide it along that line; a Shift-press still draws an artboard inside another or marquee-selects (#2497), #8580. Scores and estimates unchanged. | | 2026-11-19 | minor | Canvas context menu: a right-click on a path, a group of paths or a compound path offers Simplify… between Average… and Smooth…, in the Path menu's order, opening the Simplify slider at the Auto-Simplify level, or the Simplify dialog on its kept settings, as Object › Path › Simplify… does (#8344). Scores and estimates unchanged. | | 2026-11-19 | minor | G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s (part of #5930, `file.cancelPlace`); indeterminate moving bar, Cancel (Esc) leaves the document unmodified without undo steps; scores and estimates unchanged. | From 7059a75c5988651150dca774725fa13191b21ea8 Mon Sep 17 00:00:00 2001 From: HassanKhan Date: Thu, 19 Nov 2026 23:16:42 +0500 Subject: [PATCH 36/49] Docs: record the Layers target-circle fix in the parity assessment and roadmap (#8711) --- docs/roadmap.md | 5 +++-- docs/target-app-parity.md | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/roadmap.md b/docs/roadmap.md index 759baae5bd..b065919f50 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -1,6 +1,6 @@ # Roadmap: milestones and what's next -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (Image Trace Ignore Color keeps the canvas View and stays armed on a missed pixel (#8068); M11: a tool drag held near an edge of the canvas scrolls the view, #8551; scores and estimates unchanged; previously: All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, and a hovered dimmed row takes the panel's darker fill so it stays readable, #8294; scores and estimates unchanged; previously: Layers: selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: M4: PDF import: type filled and stroked after a page of type filled only comes in filled and stroked, #8549 follow-up; scores and estimates unchanged; previously: selected Dimension extension-line color and weight in Properties (#7078; four focused UI regressions passed); scores and estimates unchanged; previously: Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: M4: `.ai` and EPS import: an Art brush in Tints of a swatch-linked stroke color comes in brushed, #8200; scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: M4: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, #8128; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: M1: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; M1: an Alt-drag in the Layers panel copies a row above or below its own place, #8237; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview are in; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; M4/M7: `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; M4/M7: `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; Hindi catalog and contributor loanword preferences; full wording review in progress; Effect dialogs: a colour swatch beside a hex colour opens the Color Picker, #5365; shape tools move the selection from its centre point and turn it from the zone outside a box corner, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (M1: Layers: a targeted item with an appearance of its own keeps its inner ring visible around a smaller appearance dot, so the target circle's four looks differ, #8711; scores and estimates unchanged; previously: Image Trace Ignore Color keeps the canvas View and stays armed on a missed pixel (#8068); M11: a tool drag held near an edge of the canvas scrolls the view, #8551; scores and estimates unchanged; previously: All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, and a hovered dimmed row takes the panel's darker fill so it stays readable, #8294; scores and estimates unchanged; previously: Layers: selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: M4: PDF import: type filled and stroked after a page of type filled only comes in filled and stroked, #8549 follow-up; scores and estimates unchanged; previously: selected Dimension extension-line color and weight in Properties (#7078; four focused UI regressions passed); scores and estimates unchanged; previously: Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: M4: `.ai` and EPS import: an Art brush in Tints of a swatch-linked stroke color comes in brushed, #8200; scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: M4: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, #8128; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: M1: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; M1: an Alt-drag in the Layers panel copies a row above or below its own place, #8237; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview are in; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; M4/M7: `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; M4/M7: `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; Hindi catalog and contributor loanword preferences; full wording review in progress; Effect dialogs: a colour swatch beside a hex colour opens the Color Picker, #5365; shape tools move the selection from its centre point and turn it from the zone outside a box corner, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) > > Oversized artboard import update (2026-11-12): Explicit editing-data import retains a single artboard beyond a capped 14,400 pt PDF page (#6865). > @@ -175,7 +175,7 @@ Gujarati interface follow-up (2026-11-14): the catalog and zero/one plural rule | # | Milestone | Status | Est. remaining, one agent (h) | |---|---|---|---| | M0 | Skeleton + vertical slice | ✅ done | — | -| M1 | Selection, transform, layers, MCP (common command tools, strict keys, session resources and version-aware result hints) | ✅ mostly done (path and compound-path interior selection follows enabled fill rows (#6625); a marquee leaves locked or hidden guide paths out inside groups, as clicks do (#8538); hidden-fill and no-fill stroke cap/join CPU regressions passed; document-tab artwork drag with lossless resource transfer and one target Undo; malformed MCP app replies discard the connection without replay, #1761; bounded control socket waits and connection-slot recovery, #1726; bounded synthetic control input, #1709; no-op anchor Align keeps Undo, Redo and saved state (#1180 follow-up); transform reference point snaps to anchors/centres; rotated objects keep a rotated bounding box and their angle; Free Transform, Scale and Reflect along a rotated box pending; the Transform fields take one Tab each, the W/H link after them) | 4–6 | +| M1 | Selection, transform, layers, MCP (common command tools, strict keys, session resources and version-aware result hints) | ✅ mostly done (a targeted Layers item with an appearance of its own shows its inner ring around a smaller appearance dot (#8711); path and compound-path interior selection follows enabled fill rows (#6625); a marquee leaves locked or hidden guide paths out inside groups, as clicks do (#8538); hidden-fill and no-fill stroke cap/join CPU regressions passed; document-tab artwork drag with lossless resource transfer and one target Undo; malformed MCP app replies discard the connection without replay, #1761; bounded control socket waits and connection-slot recovery, #1726; bounded synthetic control input, #1709; no-op anchor Align keeps Undo, Redo and saved state (#1180 follow-up); transform reference point snaps to anchors/centres; rotated objects keep a rotated bounding box and their angle; Free Transform, Scale and Reflect along a rotated box pending; the Transform fields take one Tab each, the W/H link after them) | 4–6 | | M2 | Drawing tools + smart guides | ✅ mostly done (Eraser preserves fill outside fixed and varied tip sweeps and Alt-drag marquees on fill-only open paths and keeps their compound holes; clipping masks retain surviving contours or empty geometry in the same node; ordinary Group/Layer paints and evaluated gradient placements are preserved when the stored paint reproduces their appearance; hidden Rasterize and Along/Across stroke rows do not block visible gradients; replacement-art effects, plug-ins/Rasterize, along/across-stroke gradients and placements that cannot be reproduced keep their existing fitting; stroked open paths retain main behavior (#6582); #3380 deletion creates independent selected path pieces and keeps bounds-fitted gradients in place; endpoint highlighting remains open; Polygon/Star exact-size count persistence, with repeated-drag, tool-switch and Cancel regression coverage; Curvature point markers without direction handles (#1236, in part); Direct Selection segment click/Delete preserves neighboring edges, #1278; Flare, Reshape, Live Corners widget dragging and per-corner radii and kinds landed, on any path's corners; Shaper rough-shape recognition and orientation steps, the remaining Pen modifier nuances; Shaper Groups with editable sources and separate fill/stroke edits landed; custom ruler origin with drag preview, active-artboard reset, relative X/Y fields and native round-trip (#1212); construction widget/refinements pending); a shape just drawn moves by its centre point and turns from the zone outside a corner with its tool still active (#5477); Tangent and straight-segment perpendicular snapping use saved Smart Guides Geometric Guides preferences and Control bar quick access (#2537), including the existing Snap to Glyph and Alignment Guides toggles (#6164); no View submenu; Copy and Cut with the Pen or Curvature tool take the anchors a Cmd/Ctrl-lent Direct Selection picked (#6123); Scissors hover and cuts use the Pen's path/align/intersect/anchor snaps, with Alt Add Anchor and cut endpoint selection retained (#6470) | 12–18 | | M3 | Paint & appearance (swatches, color, gradient, stroke, appearance, transparency, styles) | ✅ done (M3.7–M3.98): swatches, groups, libraries, tints, Lab spots and Registration; Eyedropper copies transformed character dimensions (#6404) and styles highlighted text only (atomic transparency rejection); Eyedropper reads visible locked and outside-isolation sources (#1251); Color Picker, Color panel (its spectrum grows with a resized panel, #8005), Color Guide, Color Themes, Edit Colors and Recolor Artwork (screen-bounded Edit chip list, #3416; native Lab entry and swatch libraries in the picker, Assign-row menus, #8031/#4028); gradients that follow every transform, the annotator, linked stops, freeform gradients, focal points, gradients on strokes and Expand; visible strokes when paint is added to inherited None/zero-width art (#1253); stroke geometry, arrowheads, dashes fitted to corners, stroke on type, width profiles and the Width tool (Shift-double-click enables adjoining adjustment in Width Point Edit; finite-arithmetic follow-up regressions and full CI passed ([Validation evidence](target-app-parity.md#evidence-what-ships-today-by-area))), Scale Strokes and preview bounds; Appearance targeting, container appearance, target circles, Expand Appearance; knockout, isolation, blend accuracy, CMYK blending, overprint, Attributes, masks and clipping, Flatten Transparency; graphic styles, links and libraries; CSS library export preserves fractional linear and radial gradient stop positions. Left: freeform gradients in SVG/PDF, mixed spot/process gradients in SVG and PDF gradients mixing a spot color with RGB or Lab stops export as stops or process colors; PDF export writes dithered gradient fills with spot stops, and Perceptual spot gradients with RGB or Lab stops other than white or more than 4,096 stops on their curve, as images in process colors; confirm the Scale Strokes & Effects default; Recolor model selection is available through the engine and MCP only (#2520); the dialog retains its existing controls; Library panels' lists (swatch, Color Book, brush, symbol and graphic style libraries) fill a taller panel above its footer (#2992; scores and estimates unchanged); Graphic Styles list fills a taller panel above its footer (#2992; scores and estimates unchanged); Swatches list fills a taller panel above its footer (#1638; `the_list_fills_a_tall_panel_above_its_footer`; scores and estimates unchanged); | 4–8 | | M4 | Files (native, SVG, PDF, raster, Export for Screens, clipboard interop) | `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths (#8128; estimates unchanged); Production Preflight checks fonts, overflow, links and image resolution with clickable findings and automatic rechecking (VectorCraft addition; estimates unchanged); PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked (#8300; estimates unchanged); PDF import: type filled and stroked by one text-showing operator comes in as one filled and stroked type object (#8015; not for type filled and stroked at less than full opacity, which still comes in as a filled object and a stroked one, as the file composites them; estimates unchanged); PDF import: type filled and stroked by a `TJ` whose kerning starts a new line part way through comes in filled and stroked, a type object for each part, also where it draws a glyph again where it drew one, in an `ActualText` span too, where it stays one replacement type object on the first glyph's line and in its style; a `TJ` over more than 65 lines (the 64 its fill pass finished, kept back, and the open one) stays a filled object and a stroked one for each part (#8543; estimates unchanged); PDF import: type filled and stroked after a page of type filled only (more than 64 lines) comes in as one filled and stroked type object again, with or without a path between, and a `TJ` over more lines than are kept with a glyph kept as an outline still stays a filled object and a stroked one for each part (#8549 follow-up; estimates unchanged); PDF import: stroked type keeps the file's line cap, line join and miter limit (#7741; estimates unchanged); Rename artboards in Export for Screens (#7275); Explicit editing-data import keeps oversized capped-page artboards (#6865; estimates unchanged); Save refusal continuation (#6146): ordinary Save offers Save As; unchanged format keeps options, changed format opens its Save options; cancellation/automation isolation; focused UI regressions passed, native acceptance pending; PDF authored ActualText preserved once in editable import (#6165; first-glyph line/style, bounded input; estimates unchanged); PDF export keeps harakat and zero-advance Noto Arabic dot glyphs in one compatible batch per layout line, with per-glyph vertical offsets (#6309). `crates/pdf/src/tests/realtext.rs` (`mark_text_*`) checks decoded cluster mappings, mixed Arabic/Latin/digits, contour placement against outline export, vertical columns, differing path rotations and PDF/X-1a/3/4. Editable-text import preserves authored ActualText separately (#6165), with cross-line/style layout limits; separately styled or differently rotated clusters and external viewer search/copy remain outside this export-only evidence. `.ai`/EPS type from the text document keeps its paragraphs' tab stops (#6147); `.ai`/EPS type from the text document keeps auto leading per line, its hyphenation options, and may show more of the last lines the file sets in an area frame of its own, when growing the frame by its lines' deepest descent plus 0.05 pt shows them (#6137); ✅ done (M4.14–M4.98 on 2026-10-05): Save As/Save a Copy/Revert/templates, Data Recovery and background save, SVG import and export fidelity (units, text, symbols, filters, SVGZ, Preserve Editing, SVG Options), shared guarded PDF writer and windowed reader ([pdf-backend.md](pdf-backend.md)), PDF import (colours, layers, masks, editable text, security) and export (presets, marks, bleed, ICC and output intent, raster effects, subset fonts, PDF/X-1a, X-3 and X-4, PDF layers, overprint, page thumbnails, fast web view, PDF 1.3), Place and Links, Package, EPS and DXF in and out (EPS legacy mesh corners, vector opacity masks and raster page comparison verified; closed SPLINE flags round-trip and circular paths export as native CIRCLE/ARC, #1299), EMF/WMF, TIFF/BMP/Targa/PSD/GIF/PNG-8 export, Print and print presets, slices, Save for Web, TIFF in Export for Screens and Asset Export, clipboard flavours, File Info; AF.1–AF.4 add Affinity import (native layers, artboards, vectors, text and images from Affinity 1–3 files; the embedded preview only as a warned fallback; AF.4 expands current `.af` fixtures and every-board round-trip validation); EPS Save and Save As keep an opened EPS as EPS with its page frame and complete editable VectorCraft document (2026-10-26; G9 import fidelity unchanged). Left: DWG (use DXF), PSD placement as layers, overprint read back from PDF, Affinity export, polish; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; PDF import: glyphs inside a marked-content span with an empty `ActualText` come in as outlines in their fill and stroke, adding no text (#6971; scores and estimates unchanged); | 3–6 (existing scope; Affinity export unestimated) | @@ -232,6 +232,7 @@ not take the artwork yet. Overflow-menu drag remains separate. Scores and hours | Date | Change | Summary | |---|---|---| +| 2026-11-19 | minor | M1: Layers: a target circle whose item is targeted and has an appearance of its own keeps its inner ring visible around a smaller appearance dot, so the four looks (not targeted, targeted, with an appearance, both) differ (#8711). Scores and estimates unchanged. | | 2026-11-18 | minor | M10/G5: Media Controls joins Basic Shapes, UI Frames, Map Markers, Inventory Icons, Skill Icons and Weather Icons as a seventh built-in symbol library (Play, Pause, Stop, Skip Next, Shuffle, Repeat; original procedural vector symbols generated in code, no default 9-slice); G5 estimate decremented to 2–12 h, milestone estimates unchanged | | 2026-11-18 | minor | M7/G4: Retype phase 1 (#4934): `type.retype` turns outlined text that exactly matches an available font back into point text. Scores and estimates unchanged | | 2026-11-18 | minor | M1: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538). Scores and estimates unchanged. | diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 1569441ec4..13ed85d3c0 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1,6 +1,6 @@ # Parity with Adobe Illustrator -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (Artboard tool: Shift held once a move or Alt-copy drag is under way keeps it to the level, upright or 45° line, #8580; scores and estimates unchanged; previously: Image Trace Ignore Color keeps the canvas View and stays armed on a missed pixel (#8068); a tool drag held near an edge of the canvas scrolls the view, #8551; scores and estimates unchanged; previously: G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s, part of #5930; scores and estimates unchanged; previously: All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, and a hovered dimmed row takes the panel's darker fill so it stays readable, #8294; scores and estimates unchanged; previously: Layers: selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: PDF import: type filled and stroked after a page of type filled only comes in filled and stroked, #8549 follow-up; scores and estimates unchanged; previously: selected Dimension extension-line color and weight in Properties (#7078; four focused UI regressions passed); scores and estimates unchanged; previously: Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: #8200: `.ai` and EPS import: an Art brush in Tints of a swatch-linked stroke color comes in brushed, its tints linked to the swatch; scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: SVG export preserves document units on root width/height for physical units, #864; G11 estimate 8–15 → 6–13 h; previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: #8128: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, so the compound clipping path clips its clipping group; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Twist: a strongly twisted path joins its pieces without kinks, #7069; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; Layers panel: Alt over the list shows the copy cursor while rows or the selection square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Properties panel: the Character section shows the font of the Type tool's selection, not the first run's (#8189); scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and a Standard Single-line and Every-line that set Indic, Arabic and Hebrew type glyph by glyph as the font maps it, for legacy fonts that keep a script on Latin character codes; PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; G5: Neon & Glow joins built-in graphic style libraries (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); scores and estimates unchanged; previously: Pencil ignores Smart Guides and Snap to Point and shows no Smart Guides, #7252; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: G5: Weather Icons joins built-in symbol libraries (Sun, Moon, Cloud, Rain, Thunder, Snow); scores and estimates unchanged; previously: a closed Pencil stroke closes with a straight segment; previously: Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; Character panel: the Set Font Height Reference dropdown shows an icon before each reference, #6304; scores and estimates unchanged; previously: Envelopes: a top object's side whose pieces are all one curve split at anchors follows that curve's parameter, so a top object saved with its sides' curves in pieces draws as its `.ai` drawn art, #7097; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously minor: Object › Rasterize with the Grayscale or Bitmap colour model makes a grayscale image, #6969; scores and estimates unchanged; previously minor: `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, miter tips and moved strokes included, after its glyphs grown by half its strokes' weight (#6824; #6617: Swatches panel menu: Show Recent Colors; scores unchanged; previously minor: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Type tool: kerning at a caret at the start of a line moves the character after it, #5111; scores and estimates unchanged; previously minor: Rulers: the zero point dragged out of the rulers' corner snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Envelopes: with Distort Appearance, type's strokes paint along the bent glyph outlines at their own weight, as users' `.ai` files draw them, which changes how VectorCraft's own envelopes of stroked type draw (#6644; scores and estimates unchanged); previously minor: G5: Energy Beams brush library; bundled content ~44% → ~46%; previously minor: G5: Skill Icons symbol library; bundled content ~42% → ~44%; previously minor: `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art (#6570; scores and estimates unchanged); previously minor: ruler double-click adds a guide at the pointer, #5239; G5: Status Effects graphic style library; bundled content ~40% → ~42%; MCP symbol libraries list UI Frames and Map Markers; previously minor: G5: Inventory Icons built-in symbol library; bundled content ~38% → ~40%; previously minor: `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke (#3179; scores and estimates unchanged); previously minor: `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid where VectorCraft's warp doesn't draw as their drawn art (#3179; scores and estimates unchanged); G5: Game Trails brush library; bundled content ~36% → ~38%; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page (#3179; scores and estimates unchanged); G5: Game HUD graphic style library; bundled content ~34% → ~36%; previously minor: Line Arrow arrowhead (#5421; scores and estimates unchanged); G5: Map Markers built-in symbol library; bundled content ~32% → ~34%; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Canvas: a 3D effect changed on type or a group redraws where its solid was; Fit to Artwork Bounds and per-artboard SVG export build each solid once for all artboards; previously minor: Effect Gallery: a thumbnail for each filter and a preview area inside the dialog, on an original drawing; Raster effects 52% → 55%, hours 1–2 → none; headline numbers unchanged; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: UI Frames built-in symbol library with default 9-slice; bundled content ~32%; previously minor: G5: dynamic symbol part on-canvas opacity/blend/gradient/pattern; strokes remaining no longer lists Overlap/auto corners; symbols ~88%; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: harakat paint fallback clarified; previously minor: current Guides feature-area rows consolidated using existing ruler evidence; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap and Pattern brush auto corners removed from strokes remaining; symbols remaining lists dynamic on-canvas beyond solid and guides outside the art; previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; `.ai` and EPS import: older Art brush objects read; numeric fields step on wheel hover without taking keyboard focus, and a panel wheel turn cannot seed a canvas zoom glide, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; the canvas keeps selection outlines and anchors between frames; Indian-language hyphenation review and license allowlist, #4947; Stroke gradients: an arrowhead aligned to the tip is painted to the corners of its base, #5964; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Hindi catalog and contributor loanword preferences; full wording review in progress; Properties in Edit Artboards: a Transform section with the reference point above the Artboards section, #5219; the Control bar's Stroke: and Opacity: links scrub their fields, #4088; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window, #4155; Control bar Paragraph section with type selected, #5372; translating unchanged type reuses its glyph and character-stroke outlines; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026; Units › East Asian Type acts, with Q and Ha units; scores unchanged) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (Layers: a targeted item with an appearance of its own keeps its inner ring visible around a smaller appearance dot, so the target circle's four looks differ, #8711; scores and estimates unchanged; previously: Artboard tool: Shift held once a move or Alt-copy drag is under way keeps it to the level, upright or 45° line, #8580; scores and estimates unchanged; previously: Image Trace Ignore Color keeps the canvas View and stays armed on a missed pixel (#8068); a tool drag held near an edge of the canvas scrolls the view, #8551; scores and estimates unchanged; previously: G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s, part of #5930; scores and estimates unchanged; previously: All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, and a hovered dimmed row takes the panel's darker fill so it stays readable, #8294; scores and estimates unchanged; previously: Layers: selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: PDF import: type filled and stroked after a page of type filled only comes in filled and stroked, #8549 follow-up; scores and estimates unchanged; previously: selected Dimension extension-line color and weight in Properties (#7078; four focused UI regressions passed); scores and estimates unchanged; previously: Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: #8200: `.ai` and EPS import: an Art brush in Tints of a swatch-linked stroke color comes in brushed, its tints linked to the swatch; scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: SVG export preserves document units on root width/height for physical units, #864; G11 estimate 8–15 → 6–13 h; previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: #8128: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, so the compound clipping path clips its clipping group; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Twist: a strongly twisted path joins its pieces without kinks, #7069; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; Layers panel: Alt over the list shows the copy cursor while rows or the selection square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Properties panel: the Character section shows the font of the Type tool's selection, not the first run's (#8189); scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and a Standard Single-line and Every-line that set Indic, Arabic and Hebrew type glyph by glyph as the font maps it, for legacy fonts that keep a script on Latin character codes; PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; G5: Neon & Glow joins built-in graphic style libraries (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); scores and estimates unchanged; previously: Pencil ignores Smart Guides and Snap to Point and shows no Smart Guides, #7252; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: G5: Weather Icons joins built-in symbol libraries (Sun, Moon, Cloud, Rain, Thunder, Snow); scores and estimates unchanged; previously: a closed Pencil stroke closes with a straight segment; previously: Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; Character panel: the Set Font Height Reference dropdown shows an icon before each reference, #6304; scores and estimates unchanged; previously: Envelopes: a top object's side whose pieces are all one curve split at anchors follows that curve's parameter, so a top object saved with its sides' curves in pieces draws as its `.ai` drawn art, #7097; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously minor: Object › Rasterize with the Grayscale or Bitmap colour model makes a grayscale image, #6969; scores and estimates unchanged; previously minor: `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, miter tips and moved strokes included, after its glyphs grown by half its strokes' weight (#6824; #6617: Swatches panel menu: Show Recent Colors; scores unchanged; previously minor: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Type tool: kerning at a caret at the start of a line moves the character after it, #5111; scores and estimates unchanged; previously minor: Rulers: the zero point dragged out of the rulers' corner snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Envelopes: with Distort Appearance, type's strokes paint along the bent glyph outlines at their own weight, as users' `.ai` files draw them, which changes how VectorCraft's own envelopes of stroked type draw (#6644; scores and estimates unchanged); previously minor: G5: Energy Beams brush library; bundled content ~44% → ~46%; previously minor: G5: Skill Icons symbol library; bundled content ~42% → ~44%; previously minor: `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art (#6570; scores and estimates unchanged); previously minor: ruler double-click adds a guide at the pointer, #5239; G5: Status Effects graphic style library; bundled content ~40% → ~42%; MCP symbol libraries list UI Frames and Map Markers; previously minor: G5: Inventory Icons built-in symbol library; bundled content ~38% → ~40%; previously minor: `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke (#3179; scores and estimates unchanged); previously minor: `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid where VectorCraft's warp doesn't draw as their drawn art (#3179; scores and estimates unchanged); G5: Game Trails brush library; bundled content ~36% → ~38%; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page (#3179; scores and estimates unchanged); G5: Game HUD graphic style library; bundled content ~34% → ~36%; previously minor: Line Arrow arrowhead (#5421; scores and estimates unchanged); G5: Map Markers built-in symbol library; bundled content ~32% → ~34%; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Canvas: a 3D effect changed on type or a group redraws where its solid was; Fit to Artwork Bounds and per-artboard SVG export build each solid once for all artboards; previously minor: Effect Gallery: a thumbnail for each filter and a preview area inside the dialog, on an original drawing; Raster effects 52% → 55%, hours 1–2 → none; headline numbers unchanged; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: UI Frames built-in symbol library with default 9-slice; bundled content ~32%; previously minor: G5: dynamic symbol part on-canvas opacity/blend/gradient/pattern; strokes remaining no longer lists Overlap/auto corners; symbols ~88%; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: harakat paint fallback clarified; previously minor: current Guides feature-area rows consolidated using existing ruler evidence; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap and Pattern brush auto corners removed from strokes remaining; symbols remaining lists dynamic on-canvas beyond solid and guides outside the art; previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; `.ai` and EPS import: older Art brush objects read; numeric fields step on wheel hover without taking keyboard focus, and a panel wheel turn cannot seed a canvas zoom glide, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; the canvas keeps selection outlines and anchors between frames; Indian-language hyphenation review and license allowlist, #4947; Stroke gradients: an arrowhead aligned to the tip is painted to the corners of its base, #5964; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Hindi catalog and contributor loanword preferences; full wording review in progress; Properties in Edit Artboards: a Transform section with the reference point above the Artboards section, #5219; the Control bar's Stroke: and Opacity: links scrub their fields, #4088; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window, #4155; Control bar Paragraph section with type selected, #5372; translating unchanged type reuses its glyph and character-stroke outlines; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026; Units › East Asian Type acts, with Q and Ha units; scores unchanged) > > Tech Circuit update (2026-11-14): three original procedural brushes; ten built-in brush libraries (G5). > @@ -73,6 +73,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| +| 2026-11-19 | minor | Layers: a target circle whose item is targeted and has an appearance of its own keeps its inner ring visible around a smaller appearance dot, so the four looks (not targeted, targeted, with an appearance, both) differ (#8711). Scores and estimates unchanged. | | 2026-11-19 | minor | PDF import (#8549 follow-up): type filled and stroked after a page of type filled only came in as a filled object and a stroked one: since #8549 lines filled only are kept for a stroke pass too, and the glyphs of the lines finished past the 64 kept were remembered until the next stroke, so `2 Tr (Title) Tj` after more than 64 lines of type filled only took its first stroke for the start of a stroke pass over them, always once more than 4,096 glyphs had been finished so. Those glyphs are now forgotten when anything else is drawn (a path, an image, a Type 3 glyph's art, a change of blend mode or soft mask: nothing is drawn between an operator's fill pass and its stroke pass), and past the first 4,096 glyphs none are remembered instead of every stroke matching. A `TJ` over more lines than are kept still comes in as a filled object and a stroked one for each part, also when it ends where it began, and when a glyph kept as an outline comes before that (the line it starts keeps the glyphs of the lines finished). Remaining: with nothing drawn between them, type filled and stroked at exactly the place, font, size and text of a glyph filled only on a line finished so still comes in as a filled object and a stroked one, as the device can't tell its stroke pass from the start of one over that glyph. Tests: `type_filled_and_stroked_after_a_dense_page_of_filled_type_is_filled_and_stroked`, `type_filled_and_stroked_over_a_finished_glyph_after_a_path_is_filled_and_stroked`, `an_outline_glyph_in_a_tj_over_more_lines_than_are_kept_leaves_fill_and_stroke_apart`; scores and estimates unchanged. | | 2026-11-18 | minor | Layers: a layer whose art was all added to the selection from its target circle shows as targeted, as an object does (#8646). Scores and estimates unchanged. | | 2026-11-18 | minor | G11: SVG export writes physical unit suffixes on the root for documents with physical units (mm, cm, in, pc), preventing drawings from scaling to 75% in external tools and preserving units across round-trips (#864; general unit preference on restart remains open under #864). Tests: export_physical_units_writes_unit_suffixes (crates/svg/tests/it/import_units.rs) and svg_round_trip_preserves_document_units (crates/engine/src/cmd/fileio/tests_svg.rs). G11 estimate 8–15 → 6–13 h. | @@ -750,6 +751,7 @@ since 2026-10-01. - **Large Shift-marquee selections and Select › Inverse:** `select.toggle` and `select.add` with many ids (a Shift-drag marquee sends them together) go through the selection once instead of once per id, and Select › Inverse looks each object up in a set of the selected ones. The resulting selection, its order and the reply are the same as before. With 50,000 objects the selection step of toggling every object off took 528 to 655 ms before and 2.5 to 4.6 ms after in 7 runs, wall clock on a machine that was running other builds (`cargo run --release -p vectorcraft-engine --example selection_bench`). Regression tests: `add_all_does_what_adding_each_does` and `toggle_all_does_what_toggling_each_does` in `crates/doc/src/selection/tests.rs`, and `toggle_and_add_handle_each_listed_id_in_order` in `crates/engine/tests/it/selection_commands.rs`. - **Shift-click in the Layers panel's selection column on a large layer:** `layer.selectAll {id, add: true}` checks whether the row's art is all selected with a set of the selected objects, and removes or adds that art in one pass instead of once per object. The resulting selection, its order, the reply and the highlighted rows are the same as before. On a layer of 50,000 objects the whole command took a median of 733 ms before and 6.9 ms after when all of the layer's art was selected, and 369 ms before and 24 ms after when every other object was, in 7 runs each, wall clock on Linux while other builds were running (`cargo run --release -p vectorcraft-engine --example layer_select_bench`). Regression test: `a_shift_click_in_the_selection_column_matches_adding_or_removing_each_id` in `crates/engine/src/tests/layers.rs`. - **Layers added to the selection from their target circles show as targeted (#8646):** with several items picked from their circles (nothing targeted), a layer or sublayer's circle shows its inner ring while all of its visible, unlocked art is selected, as an object's circle does while the object is selected. A layer is never selected itself, only its art, so its circle used to keep a single ring. Regression test: `a_layer_added_from_its_target_circle_shows_as_targeted` in `crates/ui-egui/src/panels/layers/tests.rs`. +- **A targeted item with an appearance of its own shows both marks (#8711):** its target circle keeps the inner ring of a targeted item, with the appearance dot drawn smaller inside it and a gap between them, so not targeted, targeted, with an appearance and both look different, as the target icons in [Appearance attributes](https://helpx.adobe.com/illustrator/using/appearance-attributes.html) do. The dot used to cover the ring. Regression test: `a_targeted_circle_with_an_appearance_shows_both_ring_and_dot` in `crates/ui-egui/src/panels/layers/tests.rs`. - **Selection passes through raster effects:** clicks with the Selection, Direct Selection and Group Selection tools (Group Selection's repeated click included), the Selection tool's pointer and marquee, Direct Selection's marquee, pointer and anchor highlight, and Group Selection's marquee (E for enclosed objects included) leave out the area that a drop shadow, a glow, a blur or another raster effect paints beyond an object. A click on a shadow selects the object under it, or nothing over an empty canvas, a repeated Group Selection click there adds the groups of the object under it, and a press on the shadow of a selected object does not move it ([the help page](https://helpx.adobe.com/illustrator/using/selecting-objects.html)). Over a shadow, Direct Selection highlights only the anchors of the object under it, and Group Selection keeps its own pointer and highlights no anchor, as it does everywhere (VectorCraft's own rule). No setting changes this. This covers paths, groups, type, symbol instances and images. Regression tests: `crates/engine/src/tests/select_effects.rs`. - **Symbol instances are selected where their art draws past their box:** a click or a marquee selects a symbol instance where a clipping path in its art, moved or reshaped by its live geometry effects, shows the art past the instance's box, as it selects a group of the same art; a click also selects it where a stroke in its art paints past the box ([the help page](https://helpx.adobe.com/illustrator/desktop/manage-objects/select-objects/select-objects.html)). The rest is VectorCraft's own rule: inside the box the instance is selected as before; in Outline view and below a layer whose Preview is off only the box counts; hidden art and the area a raster effect paints are left out. This covers instances in groups, nested in other symbols' art, moved and scaled. Regression tests: `a_symbol_instance_is_hit_where_a_moved_clipping_path_in_its_art_shows_the_art` and `a_symbol_instance_is_hit_on_the_stroke_of_its_art_past_its_box` in `crates/doc/src/hit/tests.rs`. - **Selection follows geometry effects:** a click or a marquee with the selection tools selects a path or compound path where its live geometry effects (Transform, Offset Path, Roughen, Zig Zag and the other effects that reshape a path, on the object or on its fills and strokes) draw it, the copies a Transform effect makes included, and not where its own geometry no longer paints. The members of a group or layer whose own geometry effects move or reshape them are selected where they are drawn, at the depth each tool selects, and a locked member there lets the click through to what is below and is listed there in the Unlock submenu. A group's own fills and strokes are clicked where they paint its members, and a clipping path inside such a group is taken on its drawn outline before the art it clips. A compound path keeps its holes, Object Selection by Path Only takes the drawn outline and not its fill, and stacking order is kept. The selection tools select objects by clicking or by a marquee ([the help page](https://helpx.adobe.com/illustrator/desktop/manage-objects/select-objects/select-objects.html)), and the effects leave the art they reshape editable ([the help page](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/apply-filter-effects/apply-and-modify-effects.html)); where clicks land on the reshaped art is VectorCraft's own rule. In Outline view clicks and marquees use the plain paths, and in a layer with Preview off they take outlines only. The area a raster effect paints is still left out. Regression tests: `a_*_shifted_art_*`, `a_click_hits_a_paths_copy_and_evaluates_its_art_once_until_it_changes`, `a_groups_own_effect_moves_where_its_members_are_hit`, `a_layers_own_effect_moves_where_its_art_is_hit`, `a_preview_off_sublayer_of_an_effected_layer_is_clicked_in_outline`, `a_painted_group_around_an_effected_symbols_instance_is_hit_where_its_art_is_drawn`, `an_intertwine_group_in_a_layers_drawn_art_is_hit_in_its_woven_order`, `a_click_in_a_plain_group_evaluates_only_its_member_with_effects`, `a_clip_groups_own_effect_moves_where_its_mask_outline_is_hit`, `an_isolated_clip_group_with_its_own_effect_is_marqueed_by_its_members_own_geometry` and `a_clip_groups_art_is_hit_when_its_drawn_art_holds_only_the_clipping_path` in `crates/doc/src/hit/tests.rs`, and `a_click_and_a_marquee_select_art_where_its_transform_effect_draws_it`, `a_click_selects_a_group_where_its_own_fill_paints_a_moved_member`, `a_marquee_takes_an_inner_groups_own_fill_inside_a_painted_group` and `a_marquee_takes_a_groups_own_fill_inside_a_painted_layer` in `crates/engine/src/tests/select_effects.rs`. @@ -3104,6 +3106,7 @@ Edit › Copy and Cut put the selected ruler guides on the clipboard, with the s | Date | Change | Summary | |---|---|---| +| 2026-11-19 | minor | Layers: a target circle whose item is targeted and has an appearance of its own keeps its inner ring visible around a smaller appearance dot, so the four looks (not targeted, targeted, with an appearance, both) differ (#8711). Scores and estimates unchanged. | | 2026-11-19 | minor | Artboard tool: Shift held once a move or an Alt-drag copy of an artboard is under way keeps it to the level, upright or 45° line from General › Constrain Angle, and snaps slide it along that line; a Shift-press still draws an artboard inside another or marquee-selects (#2497), #8580. Scores and estimates unchanged. | | 2026-11-18 | minor | Layers panel: context menu on guide rows (Release Guide, Duplicate, Delete Guide, Lock/Unlock, Hide/Show) with one-step undo; regression tests in `crates/ui-egui/src/panels/layers/tests.rs`; scores and estimates unchanged. | | 2026-11-18 | minor | Type advanced: Retype phase 1 (`type.retype`, #4934), exact matches of available fonts become point text again; evidence added; near matches, the ranked font list and images remain; score and hours unchanged | From efadb7ee0d2edb138cf00078da7513abe1674e6f Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 20:52:26 -0800 Subject: [PATCH 37/49] Fill Area: in isolation mode only the isolated group's paths bound areas With a group or layer isolated, the tool's hover and click and shapeBuilder.copyRegion take only the paths inside it, and the new path goes inside it, directly above the object in it that holds the front-most path along the area. Before, a click on art outside the isolated group added a path there. No area is found while the isolated object is a path or compound path, a group that makes, moves or combines its own art (Live Paint, compound shapes, Shaper groups, graphs, Image Trace results, dimensions, flares, Objects on Path), a layer or group with a live effect, a clipping mask, or an object inside one of these or inside an envelope. An isolated object that no longer exists counts as no isolation, for the tool as for the command. --- crates/engine/src/cmd/buildcmds.rs | 2 +- .../engine/src/cmd/buildcmds/shape_builder.rs | 14 +- crates/engine/src/tests/fill_area.rs | 131 ++++++++++++++++++ crates/tools/src/builder.rs | 2 +- crates/tools/src/builder/fill_area.rs | 113 ++++++++++++--- docs/mcp.md | 8 +- docs/target-app-parity.md | 2 +- 7 files changed, 243 insertions(+), 29 deletions(-) diff --git a/crates/engine/src/cmd/buildcmds.rs b/crates/engine/src/cmd/buildcmds.rs index 8f9a828885..3136b52e42 100644 --- a/crates/engine/src/cmd/buildcmds.rs +++ b/crates/engine/src/cmd/buildcmds.rs @@ -73,7 +73,7 @@ pub fn specs() -> Vec { "Fill Area", [], None, - "{point: [x,y], ids?|id?: [id…] (the objects or layers whose paths bound areas; default: every layer, nothing needs to be selected), gap?: pt (0–72; 0: Gap Detection off; out of range is an error), openFilledAsClosed?: true (as shapeBuilder.merge), fill?, stroke?: \"#rrggbb\" | {color|swatch|gradient|none} (default: the current fill and stroke, with the current stroke weight)} add a new closed path of the area under point that the visible, unlocked paths enclose (the region of shapeBuilder.regions holding it: areas a shape already fills and areas open paths bound count too), directly above the front-most object along the area (its outline touches the area's outline, or it covers the area; when a group, Live Paint group, Shaper group or clipping group holds that path, above the outermost group in its layer, never inside it), and select it; the paths around the area are not changed; a point in no enclosed area is an error and changes nothing (no undo step); when the paths together have more than 65,536 segments, only an area the paths near the point enclose is found → {id, above (the object the new path went above)}", + "{point: [x,y], ids?|id?: [id…] (the objects or layers whose paths bound areas; default: every layer, nothing needs to be selected), gap?: pt (0–72; 0: Gap Detection off; out of range is an error), openFilledAsClosed?: true (as shapeBuilder.merge), fill?, stroke?: \"#rrggbb\" | {color|swatch|gradient|none} (default: the current fill and stroke, with the current stroke weight)} add a new closed path of the area under point that the visible, unlocked paths enclose (the region of shapeBuilder.regions holding it: areas a shape already fills and areas open paths bound count too), directly above the front-most object along the area (its outline touches the area's outline, or it covers the area; when a group, Live Paint group, Shaper group or clipping group holds that path, above the outermost group in its layer, never inside it), and select it; in isolation mode only the paths of the isolated layer or group bound areas (with ids, only the paths of the listed objects that are in it), and the new path goes inside it, directly above the object in it that holds that path; no area is found while the isolated object is not a layer or group (a path or compound path), is a Live Paint group, compound shape, Shaper group, graph, Image Trace result, dimension, flare or Objects on Path group, is a layer or group with a live effect or a clipping mask, or lies inside one of these or inside an envelope; the paths around the area are not changed; a point in no enclosed area is an error and changes nothing (no undo step); when the paths together have more than 65,536 segments, only an area the paths near the point enclose is found → {id, above (the object the new path went above)}", has_doc, sb_copy_region ), diff --git a/crates/engine/src/cmd/buildcmds/shape_builder.rs b/crates/engine/src/cmd/buildcmds/shape_builder.rs index a24d04bcda..626efb44b1 100644 --- a/crates/engine/src/cmd/buildcmds/shape_builder.rs +++ b/crates/engine/src/cmd/buildcmds/shape_builder.rs @@ -195,18 +195,22 @@ pub(super) fn sb_copy_region(s: &mut Session, p: &Value) -> Result { let stroke = paint_param(s, p, "stroke", C)?.unwrap_or_else(|| s.paint.stroke.clone()); let look = s.new_art_look(fill, stroke, s.paint.stroke_width); let area = { - let d = &s.doc()?.doc; - let roots = match named_ids(p)? { + let st = s.doc()?; + let d = &st.doc; + let named = match named_ids(p)? { Some(ids) => { if let Some(bad_id) = ids.iter().find(|i| d.node(**i).is_none()) { return Err(EngineError::NoNode(*bad_id)); } // An object listed with a layer or group that holds it counts once. - outermost(d, ids) + Some(outermost(d, ids)) } - None => b::every_layer(d), + None => None, }; - b::AreaFinder::new(d, &roots, gap, open_filled_as_closed).find(pt) + // In isolation mode only the isolated layer or group's paths bound areas, and the new path + // goes inside it. + b::fill_area_roots(d, st.isolation, named.as_deref()) + .and_then(|(roots, scope)| b::AreaFinder::new(d, &roots, scope, gap, open_filled_as_closed).find(pt)) }; let Some(area) = area else { return Err(EngineError::Other("Fill Area: no enclosed area under the pointer".into())) }; let id = s.edit("Fill Area", |d, sel| { diff --git a/crates/engine/src/tests/fill_area.rs b/crates/engine/src/tests/fill_area.rs index 0b00ddf954..7ba4bcc26f 100644 --- a/crates/engine/src/tests/fill_area.rs +++ b/crates/engine/src/tests/fill_area.rs @@ -189,6 +189,137 @@ fn fill_area_stacks_above_the_group_that_holds_the_paths() { assert_eq!(members(&s, clip), before); } +/// In isolation mode only the isolated group's paths bound areas, for the command and the tool: a +/// click in an area that art outside the group encloses adds nothing, and the new path goes inside +/// the group, above the path along the area. +#[test] +fn fill_area_stays_inside_the_isolated_group() { + let mut s = session(); + let outside = + [line(&mut s, (200.0, 0.0), (300.0, 100.0)), line(&mut s, (300.0, 0.0), (200.0, 100.0)), line(&mut s, (190.0, 80.0), (310.0, 80.0))]; + let lines = triangle(&mut s); + let ids: Vec = lines.iter().map(|l| l.0).collect(); + s.execute("select.set", &json!({"ids": ids})).unwrap(); + let g = id_of(&s.execute("object.group", &json!({})).unwrap()); + s.execute("object.isolate", &json!({"id": g.0})).unwrap(); + deselect(&mut s); + let members = |s: &Session| -> Vec { node(s, g).children().unwrap().iter().map(|n| n.id).collect() }; + let (undo, kids) = (undo_len(&s), stack(&s)); + assert!(s.execute("shapeBuilder.copyRegion", &json!({"point": [250, 70]})).is_err(), "art outside the isolated group"); + let named: Vec = outside.iter().map(|l| l.0).collect(); + assert!(s.execute("shapeBuilder.copyRegion", &json!({"point": [250, 70], "ids": named})).is_err(), "named art outside it"); + assert_eq!((undo_len(&s), stack(&s), members(&s)), (undo, kids.clone(), lines.to_vec())); + + let v = ViewInfo::default(); + s.select_tool("fillArea", v).unwrap(); + s.pointer(&PointerEvent::new(PointerKind::Move, 250.0, 70.0), v).unwrap(); + assert!( + !s.overlays(v).iter().any(|o| matches!(o, Overlay::Path { color: [0xff, 0x2a, 0x2a], .. })), + "no area outside the isolated group is outlined" + ); + s.pointer(&PointerEvent::new(PointerKind::Down, 250.0, 70.0), v).unwrap(); + s.pointer(&PointerEvent::new(PointerKind::Up, 250.0, 70.0), v).unwrap(); + assert_eq!((undo_len(&s), stack(&s), members(&s)), (undo, kids.clone(), lines.to_vec())); + + s.pointer(&PointerEvent::new(PointerKind::Move, 50.0, 70.0), v).unwrap(); + let red = s.overlays(v).into_iter().filter(|o| matches!(o, Overlay::Path { color: [0xff, 0x2a, 0x2a], .. })).count(); + assert_eq!(red, 1, "the isolated group's area is outlined"); + s.pointer(&PointerEvent::new(PointerKind::Down, 50.0, 70.0), v).unwrap(); + s.pointer(&PointerEvent::new(PointerKind::Up, 50.0, 70.0), v).unwrap(); + let new = s.doc().unwrap().selection.objects[0]; + assert_eq!(s.doc().unwrap().doc.parent_of(new), Some(g)); + assert_eq!(members(&s), [lines.as_slice(), &[new]].concat()); + assert_eq!(stack(&s), kids); + assert!((area(&s, new) - 900.0).abs() < 1.0, "{}", area(&s, new)); + + // An isolated object that no longer exists counts as no isolation, for the tool as for the + // command: the area outside the group fills. + s.doc_mut().unwrap().isolation = Some(NodeId(999_999)); + s.pointer(&PointerEvent::new(PointerKind::Move, 250.0, 70.0), v).unwrap(); + let red = s.overlays(v).into_iter().filter(|o| matches!(o, Overlay::Path { color: [0xff, 0x2a, 0x2a], .. })).count(); + assert_eq!(red, 1, "the area outside the group is outlined"); + s.pointer(&PointerEvent::new(PointerKind::Down, 250.0, 70.0), v).unwrap(); + s.pointer(&PointerEvent::new(PointerKind::Up, 250.0, 70.0), v).unwrap(); + let new = s.doc().unwrap().selection.objects[0]; + assert_eq!(s.doc().unwrap().doc.parent_of(new), s.doc().unwrap().doc.default_layer()); +} + +/// While a compound path is isolated, Fill Area finds no area, for the command and the tool, and +/// changes nothing: the compound path cannot hold the new path. The same goes for an isolated +/// Objects on Path group, a group with a Transform effect and a group that is a clipping mask. +#[test] +fn fill_area_finds_nothing_while_a_compound_path_is_isolated() { + let mut s = session(); + let outer = rect(&mut s, 0.0, 0.0, 100.0, 100.0); + let inner = rect(&mut s, 25.0, 25.0, 50.0, 50.0); + s.execute("select.set", &json!({"ids": [outer.0, inner.0]})).unwrap(); + let c = id_of(&s.execute("object.compoundPath.make", &json!({})).unwrap()); + deselect(&mut s); + assert!(s.execute("shapeBuilder.copyRegion", &json!({"point": [10, 10]})).is_ok(), "the ring fills outside isolation"); + s.execute("edit.undo", &json!({})).unwrap(); + s.doc_mut().unwrap().isolation = Some(c); + let (undo, kids) = (undo_len(&s), stack(&s)); + assert!(s.execute("shapeBuilder.copyRegion", &json!({"point": [10, 10]})).is_err()); + let v = ViewInfo::default(); + s.select_tool("fillArea", v).unwrap(); + s.pointer(&PointerEvent::new(PointerKind::Move, 10.0, 10.0), v).unwrap(); + assert!(!s.overlays(v).iter().any(|o| matches!(o, Overlay::Path { color: [0xff, 0x2a, 0x2a], .. }))); + s.pointer(&PointerEvent::new(PointerKind::Down, 10.0, 10.0), v).unwrap(); + s.pointer(&PointerEvent::new(PointerKind::Up, 10.0, 10.0), v).unwrap(); + assert_eq!((undo_len(&s), stack(&s)), (undo, kids)); + + // An Objects on Path group moves its members along the path, so a new path in it would not + // stay where the area is. + let mut s = session(); + let a = rect(&mut s, 0.0, 0.0, 40.0, 40.0); + let b = rect(&mut s, 100.0, 0.0, 40.0, 40.0); + let path = line(&mut s, (0.0, 200.0), (300.0, 200.0)); + s.execute("select.set", &json!({"ids": [a.0, b.0]})).unwrap(); + let g = id_of(&s.execute("object.objectsOnPath.attach", &json!({"path": path.0})).unwrap()); + deselect(&mut s); + let c = s.doc().unwrap().doc.node(a).unwrap().geometric_bounds().unwrap().center(); + assert!(s.execute("shapeBuilder.copyRegion", &json!({"point": [c.x, c.y]})).is_ok(), "the square fills outside isolation"); + s.execute("edit.undo", &json!({})).unwrap(); + s.doc_mut().unwrap().isolation = Some(g); + let (undo, kids) = (undo_len(&s), stack(&s)); + assert!(s.execute("shapeBuilder.copyRegion", &json!({"point": [c.x, c.y]})).is_err()); + assert_eq!((undo_len(&s), stack(&s)), (undo, kids)); + + // A group with a Transform effect moves what is in it, so a new path in it would not be drawn + // where the area is. + let mut s = session(); + let lines = triangle(&mut s); + let ids: Vec = lines.iter().map(|l| l.0).collect(); + s.execute("select.set", &json!({"ids": ids})).unwrap(); + let g = id_of(&s.execute("object.group", &json!({})).unwrap()); + s.execute("effect.apply", &json!({"effect": "distort.transform", "params": {"moveH": 100}, "ids": [g.0], "item": null})).unwrap(); + deselect(&mut s); + s.doc_mut().unwrap().isolation = Some(g); + let (undo, kids) = (undo_len(&s), stack(&s)); + assert!(s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70]})).is_err()); + assert_eq!((undo_len(&s), stack(&s), node(&s, g).children().unwrap().len()), (undo, kids, 3)); + + // A group that is a clipping mask clips and is not painted, so it takes no new path. + let mut s = session(); + let back = rect(&mut s, -20.0, -20.0, 140.0, 140.0); + let edge = rect(&mut s, 0.0, 0.0, 100.0, 100.0); + s.execute("select.set", &json!({"ids": [back.0, edge.0]})).unwrap(); + let clip = id_of(&s.execute("object.clippingMask.make", &json!({})).unwrap()); + s.execute("select.set", &json!({"ids": [edge.0]})).unwrap(); + let mask = id_of(&s.execute("object.group", &json!({})).unwrap()); + // A filled square drawn in the mask group bounds an area of its own. + s.doc_mut().unwrap().isolation = Some(mask); + let square = rect(&mut s, 10.0, 10.0, 80.0, 80.0); + assert_eq!(s.doc().unwrap().doc.parent_of(square), Some(mask)); + deselect(&mut s); + let first = node(&s, clip).children().unwrap()[0].id; + assert_eq!(first, mask, "the group is the clipping mask"); + let (undo, kids) = (undo_len(&s), stack(&s)); + let members = node(&s, mask).children().unwrap().len(); + assert!(s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70]})).is_err()); + assert_eq!((undo_len(&s), stack(&s), node(&s, mask).children().unwrap().len()), (undo, kids, members)); +} + /// The new path goes directly above the front-most object along the area, not above art that /// lies elsewhere, and paths on other layers bound areas too. #[test] diff --git a/crates/tools/src/builder.rs b/crates/tools/src/builder.rs index 931c14532e..cec57b2887 100644 --- a/crates/tools/src/builder.rs +++ b/crates/tools/src/builder.rs @@ -34,7 +34,7 @@ mod lookup; mod map; use cache::{BACKGROUND_SEGMENTS, CacheKey, RegionCache}; -pub use fill_area::{AreaFinder, EnclosedArea, FillAreaTool, every_layer}; +pub use fill_area::{AreaFinder, EnclosedArea, FillAreaTool, every_layer, fill_area_roots}; #[cfg(test)] use live_paint::LpHover; pub use live_paint::{ diff --git a/crates/tools/src/builder/fill_area.rs b/crates/tools/src/builder/fill_area.rs index f38c69b723..663068f1b7 100644 --- a/crates/tools/src/builder/fill_area.rs +++ b/crates/tools/src/builder/fill_area.rs @@ -14,8 +14,9 @@ pub struct EnclosedArea { /// The area's outline, as a Shape Builder merge of that one region makes it. pub path: PathData, /// The object directly in a layer that holds the front-most path along the area (its outline - /// touches the area's outline, or it covers the area): the new path goes directly above it, so - /// it never goes inside a group, a Live Paint group, a Shaper group or a clipping group. + /// touches the area's outline, or it covers the area), or in isolation mode the object directly + /// in the isolated object: the new path goes directly above it, so it never goes inside a group, + /// a Live Paint group, a Shaper group or a clipping group other than the isolated one. pub above: NodeId, } @@ -99,19 +100,85 @@ fn within(inner: &Rect, outer: &Rect) -> bool { inner.x0 >= outer.x0 && inner.x1 <= outer.x1 && inner.y0 >= outer.y0 && inner.y1 <= outer.y1 } -/// The object directly in a layer (or sublayer) that holds `id`: `id` itself when a layer holds it. -fn outermost(doc: &Document, id: NodeId) -> NodeId { +/// The object directly in `scope` (the isolated object in isolation mode), or else directly in a +/// layer (or sublayer), that holds `id`: `id` itself when `scope` or a layer holds it, or when `id` +/// is `scope`. +fn outermost(doc: &Document, id: NodeId, scope: Option) -> NodeId { let Some(line) = doc.ancestry(id) else { return id }; - let layer = line.iter().rposition(|a| doc.node(*a).is_some_and(|n| n.is_layer())); - layer.and_then(|k| line.get(k + 1)).copied().unwrap_or(id) + let k = match scope { + Some(s) => line.iter().rposition(|a| *a == s), + None => line.iter().rposition(|a| doc.node(*a).is_some_and(|n| n.is_layer())), + }; + k.and_then(|k| line.get(k + 1)).copied().unwrap_or(id) +} + +/// Does `n` make, move or combine the art in it itself, so that a new path in it would not stay as +/// Fill Area adds it: a Live Paint group, a compound shape, a Shaper group, a graph, an Image Trace +/// result, a dimension, a flare or an Objects on Path group. +fn managed(n: &Node) -> bool { + let e = n.extras(); + super::lookup::is_live_paint(n) + || n.is_compound_shape() + || e.shaper.is_some() + || e.graph.is_some() + || e.trace.is_some() + || e.dimension.is_some() + || e.flare.is_some() + || e.objects_on_path.is_some() +} + +/// The roots the Fill Area tool and `shapeBuilder.copyRegion` find areas among, with the isolated +/// object the new path goes into ([`AreaFinder::new`]'s `scope`), for `isolation` (the document's +/// isolated object) and `named` (the objects or layers named; None: every layer). In isolation mode +/// only the isolated layer or group's paths count: of `named`, the ones inside it, with the +/// isolated object in place of one that holds it. An isolated object that no longer exists counts +/// as no isolation. None while an object that is not a layer or a group is isolated (a compound +/// path or a single path), a layer or group with a live effect, a group that is [`managed`] or a +/// clipping mask, or one inside such an object or inside another object that is not a layer or a +/// group (an envelope): no area is found then. +pub fn fill_area_roots(doc: &Document, isolation: Option, named: Option<&[NodeId]>) -> Option<(Vec, Option)> { + let Some(iso) = isolation.filter(|i| doc.node(*i).is_some()) else { + return Some((named.map_or_else(|| every_layer(doc), <[NodeId]>::to_vec), None)); + }; + let line = doc.ancestry(iso)?; + // Every object from the layer down to the isolated one is a layer or a plain group: an + // envelope, a blend or another object that draws its contents its own way does not hold + // the new path as drawn. + // A layer or group with a live effect (a Transform effect moves what is in it) draws the new + // path elsewhere than the area. + let plain = + |a: &Node| (a.is_layer() || (matches!(a.kind, NodeKind::Group { .. }) && !managed(a))) && !a.appearance.effects.iter().any(|e| e.visible); + if !line.iter().all(|a| doc.node(*a).is_some_and(plain)) { + return None; + } + // A clipping group or clipped layer's first member is its mask, which clips and is not painted. + let in_mask = line.windows(2).any(|w| { + let [p, m] = w else { return false }; + doc.node(*p).is_some_and(|p| p.clips() && p.children().and_then(|c| c.first()).is_some_and(|f| f.id == *m)) + }); + if in_mask { + return None; + } + let Some(named) = named else { return Some((vec![iso], Some(iso))) }; + let mut out = vec![]; + for r in named { + if line.contains(r) { + out.push(iso); + } else if doc.ancestry(*r).is_some_and(|a| a.contains(&iso)) { + out.push(*r); + } + } + Some((out, Some(iso))) } impl AreaFinder { /// The finder over the paths of `roots` (layers or objects) that the Shape Builder takes: /// visible, unlocked paths, compound paths and Live Paint faces and edges that draw, not on a /// locked artboard. Gaps up to `gap` close, and with `open_filled_as_closed` a filled open path - /// bounds an area as if an invisible edge closed it. - pub fn new(doc: &Document, roots: &[NodeId], gap: f64, open_filled_as_closed: bool) -> Self { + /// bounds an area as if an invisible edge closed it. With `scope` (the isolated object in + /// isolation mode), an area's new path goes directly above the object in `scope` that holds the + /// front-most path along it, so it stays inside the isolated object. + pub fn new(doc: &Document, roots: &[NodeId], scope: Option, gap: f64, open_filled_as_closed: bool) -> Self { let roots = sorted_roots(doc, roots); let (shapes, leaves) = shape_builder_shapes(doc, &roots, open_filled_as_closed); let editable = doc.editable(); @@ -121,7 +188,7 @@ impl AreaFinder { .filter(|(_, l)| editable(l.id)) .filter_map(|(s, l)| { let b = s.path.bounds()?; - Some((s, b, outermost(doc, l.id))) + Some((s, b, outermost(doc, l.id, scope))) }) .collect(); let total = inputs.iter().map(|(_, b, _)| *b).reduce(|a, b| a.union(b)); @@ -281,8 +348,8 @@ pub struct FillAreaTool { /// The finder for the document as it is, with the key it was made for. Away while a search /// runs on another thread. finder: Option<(FinderKey, AreaFinder)>, - /// The area under the pointer, with the document revision it was found in. - hover: Option<((u64, u64), EnclosedArea)>, + /// The area under the pointer, with the key of the finder that found it. + hover: Option<(FinderKey, EnclosedArea)>, /// Where the pointer last moved over the canvas. at: Option, /// A hover search running on another thread. @@ -293,8 +360,9 @@ pub struct FillAreaTool { pressing: bool, } -/// The document revision, the gap and the open-filled rule an [`AreaFinder`] was made with. -type FinderKey = ((u64, u64), f64, bool); +/// The document revision, the gap, the open-filled rule and the isolated object an [`AreaFinder`] +/// was made with. +type FinderKey = ((u64, u64), f64, bool, Option); /// A search for the area under `p` on another thread, which hands back the finder it took. struct HoverJob { @@ -346,21 +414,26 @@ impl FillAreaTool { } fn finder_key(&self, cx: &ToolContext) -> FinderKey { - (cx.revision, self.gap(), self.open_filled_as_closed()) + (cx.revision, self.gap(), self.open_filled_as_closed(), cx.isolation) } - /// The finder for the document as `cx` has it, made again when the key changed. + /// The finder for the document as `cx` has it, made again when the key changed. In isolation + /// mode it takes only the isolated object's paths, as the command does. fn take_finder(&mut self, cx: &ToolContext) -> AreaFinder { let key = self.finder_key(cx); match self.finder.take() { Some((k, f)) if k == key => f, - _ => AreaFinder::new(cx.doc, &every_layer(cx.doc), key.1, key.2), + _ => { + // An isolated object Fill Area does not work in gives a finder of no paths. + let (roots, scope) = fill_area_roots(cx.doc, key.3, None).unwrap_or_default(); + AreaFinder::new(cx.doc, &roots, scope, key.1, key.2) + } } } /// The hover area when it is current and holds `p`. fn hover_holding(&self, cx: &ToolContext, p: Point) -> Option<&EnclosedArea> { - self.hover.as_ref().filter(|(rev, a)| *rev == cx.revision && path_contains(&a.path, FillRule::NonZero, p)).map(|(_, a)| a) + self.hover.as_ref().filter(|(k, a)| *k == self.finder_key(cx) && path_contains(&a.path, FillRule::NonZero, p)).map(|(_, a)| a) } /// The area under `p`, found here and now (a click). A search running on another thread is @@ -407,7 +480,7 @@ impl FillAreaTool { Err(f) => finder = *f, } } - self.hover = finder.find(p).map(|a| (key.0, a)); + self.hover = finder.find(p).map(|a| (key, a)); self.finder = Some((key, finder)); } @@ -440,7 +513,7 @@ impl FillAreaTool { } // The area found serves wherever the pointer moved meanwhile, as long as it holds it. let at = self.at; - self.hover = area.filter(|a| current && at.is_some_and(|p| path_contains(&a.path, FillRule::NonZero, p))).map(|a| (job.key.0, a)); + self.hover = area.filter(|a| current && at.is_some_and(|p| path_contains(&a.path, FillRule::NonZero, p))).map(|a| (job.key, a)); if let Some(p) = at && self.hover.is_none() && (p != job.p || !current) @@ -494,7 +567,7 @@ impl Tool for FillAreaTool { fn overlays(&self, cx: &ToolContext) -> Vec { self.hover .iter() - .filter(|(rev, _)| *rev == cx.revision) + .filter(|(k, _)| *k == self.finder_key(cx)) .map(|(_, a)| Overlay::Path { path: a.path.to_bezpath(), color: HIGHLIGHT_RED, width: 3.0, dashed: false }) .collect() } diff --git a/docs/mcp.md b/docs/mcp.md index ba62592f84..569d08f199 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -13228,7 +13228,13 @@ Double-clicking the Fill Area tool opens the Shape Builder Tool Options (`tool.o The new path takes the current fill, stroke and stroke weight (`fill` and `stroke` override the paints), goes directly above the front-most object along the area (one whose outline touches the area's outline, or that covers it) and is selected. When a group, Live Paint group, Shaper group or clipping group holds that object, the new path goes above the -outermost group in its layer, not inside it, and the group keeps its members. A point in no enclosed area is the error "Fill Area: no enclosed area under the pointer" and records no undo +outermost group in its layer, not inside it, and the group keeps its members. In isolation mode only the paths in +the isolated layer or group bound areas, for the tool's hover and click and for the command (with `ids`, only the +paths of the listed objects that are in it), and the new path goes inside the isolated layer or group, directly above +the object in it that holds that path. No area is found while the isolated object is not a layer or group (a path +or compound path), is a Live Paint group, compound shape, Shaper group, graph, Image Trace result, dimension, flare or +Objects on Path group, is a layer or group with a live effect or a clipping mask, or lies inside one of these or +inside an envelope. A point in no enclosed area is the error "Fill Area: no enclosed area under the pointer" and records no undo step; a `gap` outside 0 to 72 is an error. It returns `{id, above}`. The command looks for the area among the paths near the point first. When the paths together have more than 65,536 segments and the paths near the point do not enclose it, the point counts as in no enclosed area. diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 79ea0f99c7..70be2d54ff 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1526,7 +1526,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur With Pick Color From Artwork, a merged shape takes the appearance, opacity and blending mode of the object where the drag starts, else of the object where it ends, else of the front-most selected object, as the [Shape Builder combine page](https://web.archive.org/web/20251006211643/https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/draw-shapes/combine-shapes-with-shape-builder-tool.html) describes. A click in an area that no selected object covers, such as a hole other shapes enclose, takes the front-most selected object's look (`shapeBuilder.merge` `points`: the first point is where the drag starts, and the last point is where it ends). A Shift-drag with the Shape Builder tool draws a rectangular marquee for merging many paths at once, as [Combine shapes with the Shape Builder tool](https://web.archive.org/web/20251006211643/https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/draw-shapes/combine-shapes-with-shape-builder-tool.html) describes: the regions it reaches are shaded while it is drawn and merge into one shape on release, or with Alt they are deleted. The marquee reaches each region whose outline crosses it or has an anchor inside it, and the region that holds the whole marquee; this rule is VectorCraft's own. For Pick Color From Artwork, the marquee's starting corner is where the drag starts and the opposite corner is where it ends (`shapeBuilder.merge` `rect`). The Shape Builder works on the selected paths, as [Combine shapes with the Shape Builder tool](https://web.archive.org/web/20251006211643/https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/draw-shapes/combine-shapes-with-shape-builder-tool.html) describes. As VectorCraft's own rule, a click or drag that builds nothing says why in the status bar when it is released: "Shape Builder: select paths or compound paths" when nothing is selected or the selection holds no unlocked, visible path; "Shape Builder: select all paths you want to merge" when the release is over a path or compound path that is not selected; and "Shape Builder: no region under the pointer" otherwise. The document, the selection and the undo history stay as they were, and the next gesture that builds something clears the message. Regression tests: `shape_builder_with_nothing_selected_says_what_to_select`, `shape_builder_names_the_unselected_path_under_a_release_that_built_nothing` and `shape_builder_replayed_gesture_over_nothing_gives_its_status_once` in `builder/tests.rs`, and `tests::build::shape_builder_click_that_builds_nothing_shows_why`. - As VectorCraft's own tool, Fill Area (in the Live Paint Bucket's group) adds a new closed path of the area under a click with the current fill and stroke, directly above the front-most object along it, and leaves the paths around it as they are. It needs no selection: the visible, unlocked paths on every layer bound areas, open paths and the overlap of filled shapes included, and it uses the Shape Builder's Gap Detection (`shapeBuilder.copyRegion`). Regression tests: `tests::fill_area::*`. + As VectorCraft's own tool, Fill Area (in the Live Paint Bucket's group) adds a new closed path of the area under a click with the current fill and stroke, directly above the front-most object along it, and leaves the paths around it as they are. It needs no selection: the visible, unlocked paths on every layer bound areas, open paths and the overlap of filled shapes included, and it uses the Shape Builder's Gap Detection (`shapeBuilder.copyRegion`). In isolation mode only the isolated layer or group's paths bound areas and the new path goes inside it. It finds no area while the isolated object is not a layer or group, is a group that makes, moves or combines its own art (Live Paint, compound shapes, Shaper groups, graphs, Image Trace results, dimensions, flares, Objects on Path), is a layer or group with a live effect or a clipping mask, or lies inside one of these or inside an envelope. Regression tests: `tests::fill_area::*`. Shape Builder pieces on dense hatches (lines at exact 0.25 or 0.5 pt steps across another line) come back one per stretch between crossings, with no speck where the sweep cut a line's two passes a rounding error apart: the planar map contracts the stub between such cuts into one vertex, bounded by each cluster's extent so a run of tiny level segments keeps its length (`crates/pathops/src/planar.rs` tests `a_dense_hatch_at_exact_binary_steps_cuts_each_line_once_per_crossing`, `a_run_of_tiny_level_segments_is_not_contracted_as_stubs`, `a_line_crossed_where_its_two_passes_part_is_cut_once`). The Shape Builder's gray hatch over the region under the pointer and the regions a drag has touched is drawn by a sweep that tests each hatch line only against the region's edges that span it, instead of every edge on every line. The hatch lines are the same, coordinate for coordinate; on a 2,000-sided region 1,000 hatches take about 83 ms of CPU time instead of 356 ms (release build, median of 7 alternating runs), and on a region of 40 sides the time is about the same, so the gain is on large, complex regions such as traced art (`crates/tools/src/builder/tests.rs` tests `hatch_matches_testing_every_edge`, `hatch_tests_only_the_edges_spanning_each_line` and `hatch_sweep_finds_the_crossings_of_every_edge`; timing: `hatch_perf`). The planar map's edge-source grid stays linear in memory on any input: a segment is filed once per cell it crosses, and the grid holds at most a budget of cell references (a few dozen per item plus a few rows' worth), past which the remaining items go to a short scanned list and are still found, so thousands of coincident segments cannot make the index quadratic (`crates/pathops/src/planar.rs` test `rect_index_holds_a_bounded_number_of_references`). From c10df66a904888d73f46c8efc76e7bb7de9e106f Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Thu, 19 Nov 2026 12:41:42 -0800 Subject: [PATCH 38/49] Fill Area: left-out paths, stacking and the press follow the area itself When the paths near a click have more segments than one map takes and the largest are left out, a left-out path now stops the search only when it crosses the area or comes within the gap of its outline, not when it merely lies in the area's box: a dense path in the empty corner of a filled L no longer keeps the L from being filled. A left-out closed path in front that covers the area still decides where the new path goes, so the new path is not hidden under it. With Gap Detection off, a path counts as along the area only when an anchor of the area's outline lies within 0.05 pt of it. Before, a long path's own snap distance (1 pt for a 10,000 pt line) let a line that neither touches nor covers the area take the new path onto its layer. A press while a hover search runs on another thread waits for that search only, and no longer starts and waits for a search at the position the pointer passed on the way. --- crates/engine/src/tests/fill_area.rs | 70 +++++++++++++ crates/tools/src/builder/fill_area.rs | 145 +++++++++++++++++++------- crates/tools/src/builder/tests.rs | 29 ++++++ 3 files changed, 208 insertions(+), 36 deletions(-) diff --git a/crates/engine/src/tests/fill_area.rs b/crates/engine/src/tests/fill_area.rs index 7ba4bcc26f..a11f8d2975 100644 --- a/crates/engine/src/tests/fill_area.rs +++ b/crates/engine/src/tests/fill_area.rs @@ -480,6 +480,76 @@ fn fill_area_fills_an_area_that_a_left_out_paths_box_holds_but_its_segments_miss } } +/// Puts `path` with `look` in front on the current layer. +fn insert_path(s: &mut Session, path: PathData, look: vectorcraft_doc::Appearance) -> NodeId { + s.edit("t", |d, _| { + let id = d.alloc_id(); + let top = d.children(d.default_layer()).map_or(0, |c| c.len()); + d.insert(d.default_layer(), top, Node::path(id, path, look))?; + Ok(id) + }) + .unwrap() +} + +/// A path with too many segments in the empty corner of a filled L, well clear of both arms, is +/// left out and does not stop the L from being filled, though the L's box holds it. +#[test] +fn fill_area_fills_an_l_whose_empty_corner_holds_a_left_out_path() { + let mut s = session(); + let l = [(0.0, 0.0), (400.0, 0.0), (400.0, 100.0), (100.0, 100.0), (100.0, 400.0), (0.0, 400.0)].map(|(x, y)| Point::new(x, y)); + let solid = vectorcraft_doc::Appearance::basic(Paint::solid(Color::BLACK), Paint::None, 0.0); + insert_path(&mut s, PathData::single(vectorcraft_geom::SubPath::polyline(&l, true)), solid); + let n = vectorcraft_pathops::SHAPE_BUILDER_MAX_SEGMENTS; + let pts: Vec = (0..=n).map(|k| Point::new(250.0 + 100.0 * k as f64 / n as f64, 250.0 + (k % 2) as f64)).collect(); + let look = vectorcraft_doc::Appearance::basic(Paint::None, Paint::solid(Color::BLACK), 1.0); + insert_path(&mut s, PathData::single(vectorcraft_geom::SubPath::polyline(&pts, false)), look); + deselect(&mut s); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 50]})).unwrap(); + assert!((area(&s, id_of(&r)) - 70_000.0).abs() < 1.0, "{}", area(&s, id_of(&r))); +} + +/// A filled contour with too many segments on a higher layer surrounds a small square, its outline +/// far from it: it is left out of the map, and the new path still goes above it, since it covers +/// the area. +#[test] +fn fill_area_stacks_above_a_left_out_path_that_covers_the_area() { + let mut s = session(); + let layer = s.doc().unwrap().doc.default_layer(); + rect(&mut s, 0.0, 0.0, 100.0, 100.0); + let over = id_of(&s.execute("layer.new", &json!({"name": "Over"})).unwrap()); + let n = vectorcraft_pathops::SHAPE_BUILDER_MAX_SEGMENTS + 1; + let pts: Vec = (0..n) + .map(|k| { + let a = k as f64 * std::f64::consts::TAU / n as f64; + Point::new(50.0 + 3000.0 * a.cos(), 50.0 + 3000.0 * a.sin()) + }) + .collect(); + let solid = vectorcraft_doc::Appearance::basic(Paint::solid(Color::BLACK), Paint::None, 0.0); + let contour = insert_path(&mut s, PathData::single(vectorcraft_geom::SubPath::polyline(&pts, true)), solid); + deselect(&mut s); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 50]})).unwrap(); + assert!((area(&s, id_of(&r)) - 10_000.0).abs() < 1.0, "{}", area(&s, id_of(&r))); + assert_eq!(r["above"], json!(contour.0)); + let d = &s.doc().unwrap().doc; + assert_eq!(d.parent_of(id_of(&r)), Some(over)); + assert_ne!(d.parent_of(id_of(&r)), layer); +} + +/// With Gap Detection off, a long line on a higher layer 0.75 pt from a square's edge neither +/// touches nor covers the square, so the new path stays above the square. +#[test] +fn fill_area_does_not_stack_above_a_line_that_does_not_touch_the_area() { + let mut s = session(); + let layer = s.doc().unwrap().doc.default_layer(); + let square = rect(&mut s, 0.0, 0.0, 100.0, 100.0); + id_of(&s.execute("layer.new", &json!({"name": "Other"})).unwrap()); + line(&mut s, (-5000.0, -0.75), (5000.0, -0.75)); + deselect(&mut s); + let r = s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 50]})).unwrap(); + assert_eq!(r["above"], json!(square.0)); + assert_eq!(s.doc().unwrap().doc.parent_of(id_of(&r)), layer); +} + /// With Gap Detection on, a square on a higher layer within the gap of the area's corners does not /// bound the area, so the new path stays above the square that does. #[test] diff --git a/crates/tools/src/builder/fill_area.rs b/crates/tools/src/builder/fill_area.rs index 663068f1b7..bd41eeaf24 100644 --- a/crates/tools/src/builder/fill_area.rs +++ b/crates/tools/src/builder/fill_area.rs @@ -38,7 +38,8 @@ const NEAR_ROUNDS: usize = 4; /// have no area under the point, or the area does not fit after [`WINDOW_ROUNDS`] widenings, the /// finder maps every path. When a window's paths have more segments than one Shape Builder map /// takes, the paths with the most segments are left out until the rest fit, and an area is taken -/// only when no path left out reaches it. When every path together has more segments than that, +/// only when no path left out crosses it or comes within the gap of it; a path left out that +/// covers it still counts for where the new path goes. When every path together has more segments than that, /// an area no window finds is not found. The map of every path, once a search has needed it, is /// kept for the next search. pub struct AreaFinder { @@ -67,32 +68,77 @@ fn meet(a: &Rect, b: &Rect) -> bool { a.x0 <= b.x1 && b.x0 <= a.x1 && a.y0 <= b.y1 && b.y0 <= a.y1 } -/// Does a segment of `path` (closing segments included) meet `zone`? A path whose box meets the zone -/// may still lie wholly outside it, as a path of subpaths far apart, a diagonal line or a curve -/// that arcs around the zone does. -fn reaches(path: &PathData, zone: &Rect) -> bool { - let bez = path.to_bezpath(); - vectorcraft_geom::kurbo::segments(bez.elements().iter().copied()).any(|seg| segment_reaches(seg, zone, 0)) +/// The area a path left out of a window's map may cut: its outline, the same as a closed path +/// (`bez`), and the box (`zone`) its outline reaches with the gap. +struct Reach<'a> { + face: &'a PathData, + bez: &'a vectorcraft_geom::kurbo::BezPath, + zone: Rect, + /// How close (pt) to the outline a path may come and still change the area: the gap and 1 pt. + reach: f64, } -/// How many times [`segment_reaches`] halves a segment: a piece of 1/2^24 of a segment counts as -/// meeting the zone when its box does. +/// Does a segment of `path` (closing segments included) lie inside the area or come within its +/// reach of the area's outline? A path in the box of the area may still lie wholly outside the +/// area, in the empty corner of an L or around it, and such a path does not change it. `budget` +/// counts the work (pieces checked times the outline's segments); when it runs out, the path +/// counts as cutting the area. +fn cuts(path: &PathData, area: &Reach, budget: &mut usize) -> bool { + let bez = path.to_bezpath(); + let cost = area.face.subpaths.iter().map(|sp| sp.segment_count()).sum::().max(1); + vectorcraft_geom::kurbo::segments(bez.elements().iter().copied()).any(|seg| segment_cuts(seg, area, cost, budget, 0)) +} + +/// How many times [`segment_cuts`] halves a segment: a piece of 1/2^24 of a segment near the area +/// counts as cutting it. const REACH_SPLITS: u32 = 24; -/// The side (pt) below which a piece of a segment whose box meets the zone counts as meeting it. +/// The side (pt) below which a piece of a segment that may come within reach of the area counts as +/// cutting it. const REACH_TOLERANCE: f64 = 0.01; -/// Does `seg` meet `zone`? Its halves are checked in turn while their boxes meet the zone and -/// neither end is in it; a piece smaller than [`REACH_TOLERANCE`] whose box meets the zone counts. -fn segment_reaches(seg: PathSeg, zone: &Rect, depth: u32) -> bool { +/// How much work [`cuts`] does for one area before it takes a path as cutting it: pieces checked +/// times the segments of the area's outline. +const CUT_BUDGET: usize = 1 << 24; + +/// Does `seg` lie inside the area or come within its reach of the area's outline? A piece whose +/// box misses the area's zone does not; a piece whose middle is inside the area or within reach of +/// its outline does; a piece farther from the outline than its box is wide does not, since every +/// point of it is then out of reach and on the same side. The rest is halved. +fn segment_cuts(seg: PathSeg, area: &Reach, cost: usize, budget: &mut usize, depth: u32) -> bool { let b = segment_bounds(seg); - if !meet(&b, zone) { + if !meet(&b, &area.zone) { return false; } - if holds(zone, seg.start()) || holds(zone, seg.end()) || depth >= REACH_SPLITS || b.width().max(b.height()) < REACH_TOLERANCE { + let Some(left) = budget.checked_sub(cost) else { return true }; + *budget = left; + let mid = seg.eval(0.5); + if area.bez.winding(mid) != 0 { return true; } - segment_reaches(seg.subsegment(0.0..0.5), zone, depth + 1) || segment_reaches(seg.subsegment(0.5..1.0), zone, depth + 1) + let Some((.., d)) = area.face.nearest(mid) else { return true }; + if d <= area.reach { + return true; + } + let wide = b.width().hypot(b.height()); + if d - area.reach > wide { + return false; + } + if depth >= REACH_SPLITS || wide < REACH_TOLERANCE { + return true; + } + segment_cuts(seg.subsegment(0.0..0.5), area, cost, budget, depth + 1) || segment_cuts(seg.subsegment(0.5..1.0), area, cost, budget, depth + 1) +} + +/// How far (pt) an anchor of an area's outline may lie from a path's outline, with Gap Detection +/// off, and still count as on it: the least snap distance [`outline_snap`] gives, five times the +/// 0.01 pt precision the Shape Builder's map works to. +const CONTACT: f64 = 0.05; + +/// Does the filled area of the closed subpaths of `s` hold `p`? +fn covers(s: &po::Shape, p: Point) -> bool { + let closed = PathData::new(s.path.subpaths.iter().filter(|sp| sp.closed).cloned().collect()); + path_contains(&closed, s.rule, p) } /// Does `outer` hold all of `inner`? @@ -201,7 +247,7 @@ impl AreaFinder { /// `p` is in no enclosed area. pub fn find(&mut self, p: Point) -> Option { if let Some((map, picked)) = &self.full { - return self.area_in(map, picked, p); + return self.area_in(map, picked, &[], p); } let total = self.total?; // A gap bridge reaches at most `gap` past a path, so a window takes in every path within @@ -245,22 +291,27 @@ impl AreaFinder { let every = picked.len() == self.inputs.len(); let shapes: Vec = picked.iter().filter_map(|&i| self.inputs.get(i).map(|(s, ..)| s.clone())).collect(); let map = BuilderMap::of_shapes(shapes, false, self.gap); - let bounds = map.region_at(p).and_then(|k| map.regions.get(k)).map(|(.., rb)| *rb); + let face = map.region_at(p).and_then(|k| map.regions.get(k)); + let bounds = face.map(|(.., rb)| *rb); if every { - let area = self.area_in(&map, &picked, p); + let area = self.area_in(&map, &picked, &[], p); self.full = Some((map, picked)); return area; } let before = window; match bounds { - // A path left out that reaches the area could cut it, and only the map of every - // path holds both. + // A path left out that crosses the area or comes within its reach could cut it, and + // only the map of every path holds both. Some(rb) if within(&rb, &window) => { let reached = rb.inflate(reach, reach); + let mut budget = CUT_BUDGET; let cut = any_left_out - && self.inputs.iter().zip(&left_out).any(|((s, b, _), out)| *out && meet(b, &reached) && reaches(&s.path, &reached)); + && face.is_none_or(|(region, bez, _)| { + let area = Reach { face: ®ion.path, bez, zone: reached, reach }; + self.inputs.iter().zip(&left_out).any(|((s, b, _), out)| *out && meet(b, &reached) && cuts(&s.path, &area, &mut budget)) + }); if !cut { - return self.area_in(&map, &picked, p); + return self.area_in(&map, &picked, &left_out, p); } every_path = true; } @@ -301,8 +352,11 @@ impl AreaFinder { out } - /// The area under `p` in `map`, made of the inputs `picked` (in its order). - fn area_in(&self, map: &BuilderMap, picked: &[usize], p: Point) -> Option { + /// The area under `p` in `map`, made of the inputs `picked` (in its order). `left_out` marks + /// the inputs left out of the map, by index, none of which comes near the area: the front-most + /// of them that covers the area decides where the new path goes when it is in front of the + /// shape the map gives. + fn area_in(&self, map: &BuilderMap, picked: &[usize], left_out: &[bool], p: Point) -> Option { let (region, ..) = map.region_at(p).and_then(|k| map.regions.get(k))?; let path = po::FaceMerger::with_gap(&map.shapes, self.gap).merge(&[region]); if path.is_empty() { @@ -312,9 +366,10 @@ impl AreaFinder { // The front-most shape that covers the area or that an anchor of its outline lies on. A // shape within the gap of an anchor counts only when no shape is along the area itself, // so a path near the area that bounds none of it does not decide where the new path goes. + // Without a gap, an anchor is on a shape's outline within [`CONTACT`]. let along = |gap: f64| { map.shapes.iter().enumerate().rev().find(|(i, s)| { - let tol = outline_snap(&s.path) + gap; + let tol = if gap > 0.0 { outline_snap(&s.path) + gap } else { CONTACT }; region.sources.contains(i) || s.path.bounds().is_some_and(|b| { let b = b.inflate(tol, tol); @@ -323,7 +378,12 @@ impl AreaFinder { }) }; let k = along(0.0).or_else(|| along(self.gap)).map_or(map.shapes.len().checked_sub(1)?, |(i, _)| i); - let above = picked.get(k).and_then(|&i| self.inputs.get(i)).map(|(.., id)| *id)?; + let mapped = *picked.get(k)?; + // A path left out comes near no part of the area, so it covers all of it or none of it. + let covering = + left_out.iter().enumerate().rev().find(|(i, out)| **out && *i > mapped && self.inputs.get(*i).is_some_and(|(s, ..)| covers(s, p))); + let front = covering.map_or(mapped, |(i, _)| i); + let above = self.inputs.get(front).map(|(.., id)| *id)?; Some(EnclosedArea { path, above }) } } @@ -371,9 +431,22 @@ struct HoverJob { done: std::sync::mpsc::Receiver<(AreaFinder, Option)>, } +#[cfg(not(target_arch = "wasm32"))] +thread_local! { + /// The hover searches this thread has started on other threads ([`hover_searches_started`]). + static HOVER_SEARCHES: std::cell::Cell = const { std::cell::Cell::new(0) }; +} + +/// How many hover searches this thread has started on other threads, for tests that count them. +#[cfg(all(test, not(target_arch = "wasm32")))] +pub(super) fn hover_searches_started() -> usize { + HOVER_SEARCHES.with(std::cell::Cell::get) +} + /// Runs `finder.find(p)` on another thread; gives the finder back when no thread starts. #[cfg(not(target_arch = "wasm32"))] fn spawn_find(finder: AreaFinder, p: Point) -> Result)>, Box> { + HOVER_SEARCHES.with(|n| n.set(n.get() + 1)); let (tx, done) = std::sync::mpsc::channel(); let (back_tx, back) = std::sync::mpsc::channel(); let spawned = std::thread::Builder::new().name("vectorcraft-fill-area".into()).spawn(move || { @@ -437,14 +510,13 @@ impl FillAreaTool { } /// The area under `p`, found here and now (a click). A search running on another thread is - /// waited for first, so its finder is not made again. + /// waited for first, so its finder is not made again; no search starts for where the pointer + /// moved meanwhile. fn area_at(&mut self, cx: &ToolContext, p: Point) -> Option { if let Some(a) = self.hover_holding(cx, p) { return Some(a.clone()); } - while self.job.is_some() { - self.settle(cx, true); - } + self.settle(cx, true, false); let key = self.finder_key(cx); let mut finder = self.take_finder(cx); let area = finder.find(p); @@ -485,8 +557,8 @@ impl FillAreaTool { } /// Takes the result of the hover search on another thread when it is done (`wait`: waits for - /// it), and starts the search for where the pointer moved meanwhile. - fn settle(&mut self, cx: &ToolContext, wait: bool) { + /// it), and with `follow` starts the search for where the pointer moved meanwhile. + fn settle(&mut self, cx: &ToolContext, wait: bool, follow: bool) { let Some(job) = self.job.take() else { return }; let got = if wait { job.done.recv().ok() @@ -514,7 +586,8 @@ impl FillAreaTool { // The area found serves wherever the pointer moved meanwhile, as long as it holds it. let at = self.at; self.hover = area.filter(|a| current && at.is_some_and(|p| path_contains(&a.path, FillRule::NonZero, p))).map(|a| (job.key, a)); - if let Some(p) = at + if follow + && let Some(p) = at && self.hover.is_none() && (p != job.p || !current) { @@ -591,9 +664,9 @@ impl Tool for FillAreaTool { } fn poll(&mut self, cx: &ToolContext, wait: bool) -> Vec { - self.settle(cx, wait); + self.settle(cx, wait, true); while wait && self.job.is_some() { - self.settle(cx, true); + self.settle(cx, true, true); } vec![] } diff --git a/crates/tools/src/builder/tests.rs b/crates/tools/src/builder/tests.rs index dc31c1ba79..0cdaad3434 100644 --- a/crates/tools/src/builder/tests.rs +++ b/crates/tools/src/builder/tests.rs @@ -3767,6 +3767,35 @@ fn live_paint_selection_options_set_the_highlight() { assert_eq!(t.options()["width"], json!(LP_SELECT_WIDTH_RANGE.0)); } +/// A press while a Fill Area hover search runs on another thread waits for that search only: no +/// search starts for where the pointer moved meanwhile, and the press finds its own area. +#[cfg(not(target_arch = "wasm32"))] +#[test] +fn fill_area_press_does_not_search_a_hover_position_it_passed() { + let mut d = Document::new(800.0, 600.0); + let l = d.layers[0].id; + let pts: Vec = (0..200) + .map(|k| { + let a = k as f64 * std::f64::consts::TAU / 200.0; + Point::new(300.0 + 100.0 * a.cos(), 300.0 + 100.0 * a.sin()) + }) + .collect(); + let poly = d.alloc_id(); + d.insert(Some(l), 0, Node::path(poly, PathData::single(SubPath::polyline(&pts, true)), Appearance::default_art())).unwrap(); + let s = Selection::default(); + let p = paint(); + let cx = ToolContext { revision: (1, 1), ..cx(&d, &s, &p) }; + let mut t = FillAreaTool::new(); + let started = super::fill_area::hover_searches_started(); + t.pointer(&cx, &ev(PointerKind::Move, 500.0, 500.0)); + assert!(t.waiting()); + t.pointer(&cx, &ev(PointerKind::Move, 510.0, 500.0)); + let acts = t.pointer(&cx, &ev(PointerKind::Down, 300.0, 300.0)); + assert!(matches!(acts.as_slice(), [Action::Begin(_), Action::Preview(id, _)] if id == "shapeBuilder.copyRegion"), "{acts:?}"); + assert!(!t.waiting()); + assert_eq!(super::fill_area::hover_searches_started() - started, 1, "only the search that was running"); +} + #[test] fn create_builds_the_three_tools() { for id in ["shapeBuilder", "livePaintBucket", "livePaintSelection"] { From 6adc5c651c03c813af2b560f9f28257018167b6f Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Thu, 19 Nov 2026 13:14:42 -0800 Subject: [PATCH 39/49] Fill Area: no area while a clipping group or the art it clips is isolated Before, only a clipping mask itself was refused in isolation mode. A clipping group or clipped layer that was isolated, or that held the isolated group, still took the new path, where its mask could hide or cut it. Now no area is found then, for the tool and for shapeBuilder.copyRegion, as the documentation of the command states. --- crates/engine/src/tests/fill_area.rs | 13 +++++++++++++ crates/tools/src/builder/fill_area.rs | 15 ++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/crates/engine/src/tests/fill_area.rs b/crates/engine/src/tests/fill_area.rs index a11f8d2975..6625c7e150 100644 --- a/crates/engine/src/tests/fill_area.rs +++ b/crates/engine/src/tests/fill_area.rs @@ -318,6 +318,19 @@ fn fill_area_finds_nothing_while_a_compound_path_is_isolated() { let members = node(&s, mask).children().unwrap().len(); assert!(s.execute("shapeBuilder.copyRegion", &json!({"point": [50, 70]})).is_err()); assert_eq!((undo_len(&s), stack(&s), node(&s, mask).children().unwrap().len()), (undo, kids, members)); + // The clipping group itself, and a group of the art it clips, take no new path either: the + // mask would hide or cut it. + s.doc_mut().unwrap().isolation = None; + s.execute("select.set", &json!({"ids": [back.0]})).unwrap(); + let clipped = id_of(&s.execute("object.group", &json!({})).unwrap()); + assert_eq!(s.doc().unwrap().doc.parent_of(clipped), Some(clip)); + deselect(&mut s); + for iso in [clip, clipped] { + s.doc_mut().unwrap().isolation = Some(iso); + let (undo, kids) = (undo_len(&s), stack(&s)); + assert!(s.execute("shapeBuilder.copyRegion", &json!({"point": [5, 5]})).is_err(), "{iso:?}"); + assert_eq!((undo_len(&s), stack(&s)), (undo, kids), "{iso:?}"); + } } /// The new path goes directly above the front-most object along the area, not above art that diff --git a/crates/tools/src/builder/fill_area.rs b/crates/tools/src/builder/fill_area.rs index bd41eeaf24..f535bd0aa3 100644 --- a/crates/tools/src/builder/fill_area.rs +++ b/crates/tools/src/builder/fill_area.rs @@ -179,9 +179,9 @@ fn managed(n: &Node) -> bool { /// only the isolated layer or group's paths count: of `named`, the ones inside it, with the /// isolated object in place of one that holds it. An isolated object that no longer exists counts /// as no isolation. None while an object that is not a layer or a group is isolated (a compound -/// path or a single path), a layer or group with a live effect, a group that is [`managed`] or a -/// clipping mask, or one inside such an object or inside another object that is not a layer or a -/// group (an envelope): no area is found then. +/// path or a single path), a layer or group with a live effect, a group that is [`managed`], a +/// clipping group or clipped layer, or one inside such an object or inside another object that is +/// not a layer or a group (an envelope): no area is found then. pub fn fill_area_roots(doc: &Document, isolation: Option, named: Option<&[NodeId]>) -> Option<(Vec, Option)> { let Some(iso) = isolation.filter(|i| doc.node(*i).is_some()) else { return Some((named.map_or_else(|| every_layer(doc), <[NodeId]>::to_vec), None)); @@ -197,12 +197,9 @@ pub fn fill_area_roots(doc: &Document, isolation: Option, named: Option< if !line.iter().all(|a| doc.node(*a).is_some_and(plain)) { return None; } - // A clipping group or clipped layer's first member is its mask, which clips and is not painted. - let in_mask = line.windows(2).any(|w| { - let [p, m] = w else { return false }; - doc.node(*p).is_some_and(|p| p.clips() && p.children().and_then(|c| c.first()).is_some_and(|f| f.id == *m)) - }); - if in_mask { + // A clipping group or clipped layer's mask clips and is not painted, and its mask hides or cuts + // a new path among the art it clips. + if line.iter().any(|a| doc.node(*a).is_some_and(Node::clips)) { return None; } let Some(named) = named else { return Some((vec![iso], Some(iso))) }; From 4b1d0b257b3442f2fde740d77dedc1f5433a295b Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Thu, 19 Nov 2026 16:26:07 -0500 Subject: [PATCH 40/49] refactor(eps): delegate EPSI preview decoding to craft-eps --- crates/eps/src/import/preview.rs | 42 +++----------------------------- 1 file changed, 3 insertions(+), 39 deletions(-) diff --git a/crates/eps/src/import/preview.rs b/crates/eps/src/import/preview.rs index 74e977e93a..9c87826e0d 100644 --- a/crates/eps/src/import/preview.rs +++ b/crates/eps/src/import/preview.rs @@ -5,9 +5,6 @@ use vectorcraft_doc::{Document, ImageBlob, ImageObject, Node, NodeKind}; use vectorcraft_geom::{Affine, Rect}; -/// Largest EPSI bitmap side read (pixels). -const MAX_EPSI: usize = 8192; - /// A preview's document and how the user is told about it. pub(super) struct Preview { pub document: Document, @@ -90,40 +87,7 @@ fn metafile_doc(wmf: &[u8], frame: Rect) -> Option { /// The EPSI preview in `ps`'s comments (`%%BeginPreview: width height depth lines`, hex rows, /// 0 white and the largest value black). fn epsi(ps: &[u8]) -> Option { - let text = String::from_utf8_lossy(ps); - let mut lines = text.lines(); - let head = lines.find_map(|l| l.strip_prefix("%%BeginPreview:"))?; - let n: Vec = head.split_whitespace().map_while(|w| w.parse().ok()).collect(); - let [w, h, depth, ..] = n[..] else { return None }; - if !(1..=MAX_EPSI).contains(&w) || !(1..=MAX_EPSI).contains(&h) || ![1, 2, 4, 8].contains(&depth) { - return None; - } - let row = (w * depth).div_ceil(8); - let mut hex = Vec::with_capacity((row * h * 2).min(ps.len())); - for l in lines { - if l.starts_with("%%EndPreview") || hex.len() >= row * h * 2 { - break; - } - hex.extend(l.strip_prefix('%')?.bytes().filter(u8::is_ascii_hexdigit)); - } - hex.truncate(row * h * 2); - // A trailing half byte would decode padded with zero: the preview is cut short, so none. - if hex.len() % 2 != 0 { - return None; - } - let bytes = super::lex::hex_decode(&hex)?; - // A preview with its samples missing is none, not a blank image of the size it claims. - if bytes.len() < row * h { - return None; - } - let max = (1u32 << depth) - 1; - let mut img = image::RgbaImage::new(w as u32, h as u32); - for (x, y, px) in img.enumerate_pixels_mut() { - let bit = y as usize * row * 8 + x as usize * depth; - let byte = u32::from(bytes.get(bit / 8).copied().unwrap_or(0)); - let v = (byte >> (8 - depth - bit % 8)) & max; - let grey = (255 - v * 255 / max) as u8; - *px = image::Rgba([grey, grey, grey, 255]); - } - Some(img) + let bitmap = craft_eps::epsi(ps)?; + let rgba = bitmap.gray.into_iter().flat_map(|g| [g, g, g, 255]).collect(); + image::RgbaImage::from_raw(bitmap.width, bitmap.height, rgba) } From 93b05424381299bb0d9f6660cd2e1aed9befe9f0 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Thu, 19 Nov 2026 13:13:12 -0800 Subject: [PATCH 41/49] Panels: give floating panels and the restored window each monitor's work area The monitor list for floating panels now carries each monitor's work area: rcWork from GetMonitorInfo on Windows, and visibleFrame on macOS, turned into the top-left origin and physical pixels of the monitor's rect. The work area is converted to points with the same scale and zoom as the rect, and craft-ui uses it to decide whether a reopened panel's title bar can be grabbed and where to move it. A work area with no width or height is left out. Restoring the main window now keeps it inside its monitor's work area too, so a window saved at the top edge of a monitor with a taskbar along its top opens below the taskbar, and a window taller or wider than the work area is made to fit it, with room for a system title bar and border when the window has them. On Windows the panel list stays empty when the monitors have different scale factors, as before, and a build without the wgpu feature reads no work areas. Linux and the BSDs keep the whole monitor rect. --- apps/vectorcraft/Cargo.toml | 4 +- apps/vectorcraft/src/window.rs | 226 +++++++++++++++++++++++++++++++-- docs/target-app-parity.md | 1 + 3 files changed, 217 insertions(+), 14 deletions(-) diff --git a/apps/vectorcraft/Cargo.toml b/apps/vectorcraft/Cargo.toml index 58b9741ac5..0fe5804a16 100644 --- a/apps/vectorcraft/Cargo.toml +++ b/apps/vectorcraft/Cargo.toml @@ -46,6 +46,8 @@ winreg = "0.55" # Which GPU drives which display (EnumDisplayDevices, src/gpu.rs), so the window is drawn on the # GPU that shows it: drawing on a GPU without a monitor reset the display driver. Safe wrappers over # Win32 (MIT); the `user` feature is User32.dll only. Only the wgpu renderer chooses an adapter. +# It also lists each monitor's work area for floating panels (src/window.rs), so a build without +# the `wgpu` feature keeps the panels to the monitors' whole rects. winsafe = { version = "0.0.29", default-features = false, features = ["user"], optional = true } # Waits for Direct3D 12's adapter list before the window starts (src/gpu.rs, #4150). MIT OR # Apache-2.0, already in the build through eframe. @@ -73,7 +75,7 @@ vectorcraft-render = { workspace = true } # with default features off). Pinned exactly: review the diff before bumping. muda = { version = "=0.21.2", default-features = false } objc2 = "0.6" -objc2-app-kit = { version = "0.3", default-features = false, features = ["std", "block2", "objc2-core-foundation", "objc2-quartz-core", "NSApplication", "NSCursor", "NSImage", "NSImageRep", "NSBitmapImageRep", "NSButton", "NSColor", "NSColorSampler", "NSColorSpace", "NSControl", "NSMenu", "NSEvent", "NSPasteboard", "NSPopUpButton", "NSResponder", "NSSavePanel", "NSTextField", "NSTextInputContext", "NSView", "NSWindow"] } +objc2-app-kit = { version = "0.3", default-features = false, features = ["std", "block2", "objc2-core-foundation", "objc2-quartz-core", "NSApplication", "NSCursor", "NSImage", "NSImageRep", "NSBitmapImageRep", "NSButton", "NSColor", "NSColorSampler", "NSColorSpace", "NSControl", "NSMenu", "NSEvent", "NSPasteboard", "NSPopUpButton", "NSResponder", "NSSavePanel", "NSScreen", "NSTextField", "NSTextInputContext", "NSView", "NSWindow"] } # Files opened from Finder and the Dock (src/open_documents.rs), pasted bitmaps (src/clipboard.rs) and the control channel's App Nap activity (src/control_server.rs); both already come with winit, muda and rfd. objc2-foundation = { version = "0.3", default-features = false, features = ["std", "block2", "NSArray", "NSData", "NSGeometry", "NSNotification", "NSOperation", "NSProcessInfo", "NSString", "NSURL"] } block2 = "0.6" diff --git a/apps/vectorcraft/src/window.rs b/apps/vectorcraft/src/window.rs index ea10fecad0..ce224584fd 100644 --- a/apps/vectorcraft/src/window.rs +++ b/apps/vectorcraft/src/window.rs @@ -11,26 +11,51 @@ use winit::dpi::{LogicalSize, PhysicalPosition, PhysicalSize}; pub const DEFAULT_SIZE: [f32; 2] = [1440.0, 900.0]; /// The smallest window, in points. pub const MIN_SIZE: [f32; 2] = [800.0, 500.0]; -/// Room the first window leaves around itself for a taskbar, Dock or menu bar (the system doesn't -/// say how much of the screen they take): a monitor with less room opens it maximized. +/// Room the first window leaves around itself for a taskbar, Dock or menu bar when it decides +/// whether to open maximized: a monitor with less room opens it maximized. This check uses the +/// fixed allowance on every platform, including where the system reports a work area. const SCREEN_ROOM: [f32; 2] = [64.0, 128.0]; /// Seconds between readings of the monitor list, which picks up a monitor connected while the app runs. const MONITORS_EVERY: f64 = 1.0; -/// A monitor: its top-left corner and size in physical pixels, and its scale factor. +/// A monitor: its top-left corner and size in physical pixels, its scale factor, and the part +/// windows may use where the system reports one. #[derive(Clone, Copy, Debug, PartialEq)] pub struct Monitor { pos: [i64; 2], size: [i64; 2], scale: f32, + /// `[x, y, width, height]` in physical pixels, without the taskbar, Dock or menu bar. + work: Option<[i64; 4]>, +} + +/// A monitor's rect and its work area as the system lists them, `[x, y, width, height]` in +/// physical pixels. Only Windows and macOS list them. +#[derive(Clone, Copy, Debug, PartialEq)] +#[cfg_attr(not(any(all(windows, feature = "wgpu"), target_os = "macos")), allow(dead_code))] +pub struct WorkArea { + monitor: [i64; 4], + work: [i64; 4], } impl Monitor { pub fn new(pos: PhysicalPosition, size: PhysicalSize, scale: f64) -> Self { let scale = scale as f32; let scale = if scale.is_finite() && scale > 0.0 { scale } else { 1.0 }; - Self { pos: [pos.x.into(), pos.y.into()], size: [size.width.into(), size.height.into()], scale } + Self { pos: [pos.x.into(), pos.y.into()], size: [size.width.into(), size.height.into()], scale, work: None } + } + + /// This monitor with the work area of the entry in `areas` whose monitor rect matches its own, + /// to the pixel either way to allow for rounding. Without a match, or when the matching work + /// area has no width or height, it has none. + fn with_work_area(self, areas: &[WorkArea]) -> Self { + let [x, y] = self.pos; + let [w, h] = self.size; + let rect = [x, y, w, h]; + let work = + areas.iter().find(|a| a.monitor.iter().zip(rect).all(|(a, b)| a.abs_diff(b) <= 1)).map(|a| a.work).filter(|&[_, _, w, h]| w > 0 && h > 0); + Self { work, ..self } } /// Its size in points. @@ -38,6 +63,19 @@ impl Monitor { self.size.map(|s| s as f32 / self.scale) } + /// This monitor with its work area made smaller by a window frame of `frame` physical pixels + /// (outer size less inner size), so a window whose inner size fits the result fits the work area + /// with its frame. + fn less_frame(self, frame: [i64; 2]) -> Self { + let work = self.work.map(|[x, y, w, h]| [x, y, (w - frame[0].max(0)).max(1), (h - frame[1].max(0)).max(1)]); + Self { work, ..self } + } + + /// The size of its work area in points, or of the whole monitor when it has none. + fn work_points(&self) -> [f32; 2] { + self.work.map_or_else(|| self.points(), |[_, _, w, h]| [w, h].map(|s| s as f32 / self.scale)) + } + /// Its size in points less room for a taskbar, Dock or menu bar. fn usable(&self) -> [f32; 2] { let points = self.points(); @@ -61,24 +99,31 @@ impl Monitor { } /// The top-left corner nearest to `pos` (centred when none) that keeps a window of `size` - /// points on this monitor. + /// points on this monitor, inside its work area when it has one. A window bigger than the area + /// gets the area's top-left corner. fn keep_on(&self, pos: Option<[i32; 2]>, size: [f32; 2]) -> [i32; 2] { let px = self.pixels(size); + let [x, y] = self.pos; + let [w, h] = self.size; + let [ax, ay, aw, ah] = self.work.unwrap_or([x, y, w, h]); + let (start, extent) = ([ax, ay], [aw, ah]); std::array::from_fn(|i| { - let lo = self.pos[i]; - let hi = lo + self.size[i].saturating_sub(px[i]).max(0); + let lo = start[i]; + let hi = lo + extent[i].saturating_sub(px[i]).max(0); let want = pos.map_or(lo + (hi - lo) / 2, |p| i64::from(p[i])); i32::try_from(want.max(lo).min(hi)).unwrap_or_default() }) } /// This monitor for floating panels, in the points egui reports for a window on it: physical - /// pixels divided by the monitor's scale factor and the UI zoom. + /// pixels divided by the monitor's scale factor and the UI zoom. The work area is converted the + /// same way. fn docking(&self, name: Option, zoom: f32) -> DockMonitor { let scale = self.scale * zoom; let [x, y] = self.pos; let [w, h] = self.size; - DockMonitor { name, rect: [x, y, w, h].map(|v| v as f32 / scale), scale, work_area: None } + let points = |rect: [i64; 4]| rect.map(|v| v as f32 / scale); + DockMonitor { name, rect: points([x, y, w, h]), scale, work_area: self.work.map(points) } } } @@ -108,7 +153,10 @@ pub fn place(saved: Option, monitors: &[Monitor], home: Option room[i]); - let size = fit(saved.size, if too_big { m.usable() } else { room }); + // No bigger than the work area either, so the window fits below or beside the taskbar. + let work = m.work_points(); + let room = if too_big { m.usable() } else { room }; + let size = fit(saved.size, std::array::from_fn(|i| room[i].min(work[i]))); WindowGeometry { // Moved fully onto its monitor, or centred on the home monitor. pos: saved.pos.map(|p| m.keep_on(shown.map(|_| p), size)), @@ -128,12 +176,94 @@ pub fn monitors_due(listed: Option<(f64, f32)>, now: f64, zoom: f32) -> bool { listed.is_none_or(|(at, listed_zoom)| listed_zoom != zoom || now - at >= MONITORS_EVERY) } -/// The connected monitors for floating panels (`Services::dock_monitors`). +/// The connected monitors for floating panels (`Services::dock_monitors`), with the work area the +/// system reports for each (Windows and macOS). pub fn dock_monitors(window: &winit::window::Window, zoom: f32) -> Vec { - let monitors: Vec<_> = window.available_monitors().map(|m| (Monitor::new(m.position(), m.size(), m.scale_factor()), m.name())).collect(); + let areas = work_areas::list(); + let monitors: Vec<_> = + window.available_monitors().map(|m| (Monitor::new(m.position(), m.size(), m.scale_factor()).with_work_area(&areas), m.name())).collect(); docking_list(&monitors, zoom, cfg!(target_os = "macos")) } +/// A rect in macOS screen coordinates (points, origin at the bottom-left of the primary screen, +/// y up) in the physical pixels winit gives a monitor's position and size: points from the top-left +/// of the primary screen, `primary_height` points tall, times `scale`. +#[cfg(any(target_os = "macos", test))] +fn from_bottom_left([x, y, w, h]: [f64; 4], primary_height: f64, scale: f64) -> Option<[i64; 4]> { + let rect = [x, primary_height - (y + h), w, h].map(|v| (v * scale).round()); + // `as` saturates; a coordinate of 1e12 pixels or more is not a monitor's. + rect.iter().all(|v| v.is_finite() && v.abs() < 1e12).then(|| rect.map(|v| v as i64)) +} + +/// Each monitor's rect and work area as the system reports them. +mod work_areas { + pub use platform::list; + + /// `GetMonitorInfo` for every monitor: `rcMonitor` and `rcWork`, in the physical pixels winit + /// reports for a per-monitor DPI aware process. + #[cfg(all(windows, feature = "wgpu"))] + mod platform { + use super::super::WorkArea; + use winsafe::prelude::Handle; + use winsafe::{HDC, RECT}; + + pub fn list() -> Vec { + let rect = |r: RECT| { + let [left, top, right, bottom] = [r.left, r.top, r.right, r.bottom].map(i64::from); + [left, top, right - left, bottom - top] + }; + let mut areas = Vec::new(); + // Without a list the panels keep to the monitors' whole rects, as before. + let _ = HDC::NULL.EnumDisplayMonitors(None, |monitor, _, _| { + if let Ok(info) = monitor.GetMonitorInfo() { + areas.push(WorkArea { monitor: rect(info.rcMonitor), work: rect(info.rcWork) }); + } + true + }); + areas + } + } + + /// `NSScreen`'s `frame` and `visibleFrame` for every screen, turned into the top-left origin + /// and physical pixels winit uses for its monitors. + #[cfg(target_os = "macos")] + mod platform { + use super::super::{WorkArea, from_bottom_left}; + use objc2_app_kit::NSScreen; + use objc2_foundation::{MainThreadMarker, NSRect}; + + pub fn list() -> Vec { + // `NSScreen::screens` needs the main thread, where the UI frame runs. + let Some(mtm) = MainThreadMarker::new() else { + return Vec::new(); + }; + let screens: Vec<_> = NSScreen::screens(mtm).iter().collect(); + // The first screen holds the menu bar and is the origin of the screen coordinates. + let Some(primary) = screens.first().map(|s| s.frame().size.height) else { + return Vec::new(); + }; + let rect = |r: NSRect| [r.origin.x, r.origin.y, r.size.width, r.size.height]; + screens + .iter() + .filter_map(|s| { + let scale = s.backingScaleFactor(); + let monitor = from_bottom_left(rect(s.frame()), primary, scale)?; + let work = from_bottom_left(rect(s.visibleFrame()), primary, scale)?; + Some(WorkArea { monitor, work }) + }) + .collect() + } + } + + /// No work areas: the panels keep to the monitors' whole rects. + #[cfg(not(any(all(windows, feature = "wgpu"), target_os = "macos")))] + mod platform { + pub fn list() -> Vec { + Vec::new() + } + } +} + /// The list for floating panels, empty when `monitors` have different scales and `shared_points` is /// false. macOS has one desktop of points. Elsewhere a new window multiplies its saved position by the /// scale of the monitor it is created on, which can put a window saved on another scale off every @@ -154,7 +284,19 @@ fn docking_list(monitors: &[(Monitor, Option)], zoom: f32, shared_points /// until the host reports maximized (fixes #3635). pub fn restore(window: &winit::window::Window, saved: Option) -> WindowGeometry { let handles: Vec<_> = window.available_monitors().collect(); - let monitors: Vec = handles.iter().map(|m| Monitor::new(m.position(), m.size(), m.scale_factor())).collect(); + let areas = work_areas::list(); + // The system title bar and border, which the inner size leaves out, in points: each monitor + // draws them at its own scale. + let (outer, inner, scale) = (window.outer_size(), window.inner_size(), window.scale_factor()); + let scale = if scale.is_finite() && scale > 0.0 { scale } else { 1.0 }; + let frame = [outer.width.saturating_sub(inner.width), outer.height.saturating_sub(inner.height)].map(|px| f64::from(px) / scale); + let monitors: Vec = handles + .iter() + .map(|m| { + let px = frame.map(|f| (f * m.scale_factor()).ceil().min(1e6) as i64); + Monitor::new(m.position(), m.size(), m.scale_factor()).with_work_area(&areas).less_frame(px) + }) + .collect(); let home = window.current_monitor().or_else(|| window.primary_monitor()).and_then(|c| handles.iter().position(|m| *m == c)); let g = place(saved, &monitors, home); if let Some([x, y]) = g.pos { @@ -257,6 +399,64 @@ mod tests { assert_eq!(zoomed, DockMonitor { name: Some("m".into()), rect: [-2048.0, 0.0, 2048.0, 1152.0], scale: 1.25, work_area: None }); } + #[test] + fn floating_panels_get_each_monitors_work_area_in_the_same_points() { + // A 4K monitor at 200% with a 96-pixel taskbar along its bottom, and one at 100% to its + // right with a 48-pixel taskbar along its left edge. + let areas = [ + WorkArea { monitor: [0, 0, 3840, 2160], work: [0, 0, 3840, 2064] }, + WorkArea { monitor: [3840, 0, 1920, 1080], work: [3888, 0, 1872, 1080] }, + ]; + let left = monitor(0, 0, 3840, 2160, 2.0).with_work_area(&areas); + assert_eq!(left.docking(None, 1.0).work_area, Some([0.0, 0.0, 1920.0, 1032.0])); + // The UI zoom divides the work area as it divides the rect. + assert_eq!(left.docking(None, 1.25).work_area, Some([0.0, 0.0, 1536.0, 825.6])); + // Rounding of a fractional scale can move a rect by a pixel. + let right = monitor(3841, 0, 1919, 1080, 1.0).with_work_area(&areas); + assert_eq!(right.docking(None, 1.0).work_area, Some([3888.0, 0.0, 1872.0, 1080.0])); + // A monitor the system did not list keeps to its whole rect. + let other = monitor(5760, 0, 1920, 1080, 1.0).with_work_area(&areas); + assert_eq!(other.docking(None, 1.0).work_area, None); + assert_eq!(monitor(0, 0, 3840, 2160, 2.0).with_work_area(&[]).docking(None, 1.0).work_area, None); + // A work area with no height is left out, so the monitor keeps to its whole rect. + let flat = [WorkArea { monitor: [0, 0, 1920, 1080], work: [0, 1080, 1920, 0] }]; + assert_eq!(monitor(0, 0, 1920, 1080, 1.0).with_work_area(&flat).docking(None, 1.0).work_area, None); + } + + #[test] + fn a_restored_window_keeps_its_title_bar_out_of_a_taskbar_along_the_top() { + // A 1920 × 1080 monitor with a 48-pixel taskbar along its top edge. + let areas = [WorkArea { monitor: [0, 0, 1920, 1080], work: [0, 48, 1920, 1032] }]; + let m = [monitor(0, 0, 1920, 1080, 1.0).with_work_area(&areas)]; + // A window saved at the top edge moves down below the taskbar. + let g = place(saved(Some([100, 0]), [1000.0, 700.0], false), &m, Some(0)); + assert_eq!(g.pos, Some([100, 48])); + // A window that fits below the taskbar keeps its place. + assert_eq!(place(saved(Some([100, 200]), [1000.0, 700.0], false), &m, Some(0)).pos, Some([100, 200])); + // A window taller than the work area is made as tall as the work area and placed in it. + let tall = place(saved(Some([0, 0]), [1900.0, 1060.0], false), &m, Some(0)); + assert_eq!((tall.pos, tall.size), (Some([0, 48]), [1900.0, 1032.0])); + // With a system frame of 16 × 39 pixels the inner size leaves room for it. + let framed = [m[0].less_frame([16, 39])]; + let tall = place(saved(Some([0, 0]), [1900.0, 1060.0], false), &framed, Some(0)); + assert_eq!((tall.pos, tall.size), (Some([0, 48]), [1900.0, 993.0])); + // Without a work area the frame leaves the monitor's rect as it was. + assert_eq!(monitor(0, 0, 1920, 1080, 1.0).less_frame([16, 39]).work, None); + } + + #[test] + fn macos_screen_rects_turn_into_winits_top_left_pixels() { + // A 1512 × 982 point primary screen at 2× with a 37-point menu bar and an 80-point Dock, + // and a 1920 × 1080 screen at 1× above it, its bottom-left 200 points right of the + // primary's top-left. + let primary = 982.0; + assert_eq!(from_bottom_left([0.0, 0.0, 1512.0, 982.0], primary, 2.0), Some([0, 0, 3024, 1964])); + assert_eq!(from_bottom_left([0.0, 80.0, 1512.0, 865.0], primary, 2.0), Some([0, 74, 3024, 1730])); + assert_eq!(from_bottom_left([200.0, 982.0, 1920.0, 1080.0], primary, 1.0), Some([200, -1080, 1920, 1080])); + assert_eq!(from_bottom_left([f64::NAN, 0.0, 1.0, 1.0], primary, 1.0), None); + assert_eq!(from_bottom_left([0.0, 0.0, 1e300, 1.0], primary, 1.0), None); + } + #[test] fn monitors_of_different_scales_are_listed_only_on_a_desktop_of_shared_points() { let named = |m: Monitor, name: &str| (m, Some(name.to_string())); diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index be5e4d42b8..aa44eb6017 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1104,6 +1104,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - A floating panel's OS window hides while a tool group's flyout or the All Tools drawer is open in the main window, as it does under a modal dialog or a menu, and shows again when the flyout or the drawer closes (#5813; `a_tool_flyout_hides_the_palette_windows_until_it_closes`). - Focus moving between the app's own windows passes through a frame where none has it (a press on a panel's bar takes it from the main window): the panels' OS windows keep their level then, and leave the top level only once the app has had no focus for 0.25 s. Before, that frame lowered them, so with two floating panels a press on one panel's bar handed the keyboard to the other (the main window's tool cursor did not come back) and could leave both behind the main window (#6986; `focus_moving_between_the_apps_windows_leaves_the_palettes_on_top`). - On the desktop a floating panel in an OS window stores the monitor it is on and reopens there at the next launch. When that monitor is no longer connected, the panel opens on the main window's monitor at the same offset (#5582). Outside macOS, a desktop whose monitors have different scale factors keeps opening floating panels on the main window's monitor. Test: `panel_docking::native_tests::a_floating_panel_reopens_on_the_monitor_where_it_was_left`. + - The monitors given to floating panels carry each monitor's work area (the part without the taskbar, Dock or menu bar) on macOS, and on Windows when the monitors share one scale factor (a build without the `wgpu` feature reads none). A floating panel that reopens without enough of its title bar inside any work area to grab moves into the work area of the nearest monitor. A restored main window is kept inside its monitor's work area the same way. Tests: `floating_panels_get_each_monitors_work_area_in_the_same_points`, `macos_screen_rects_turn_into_winits_top_left_pixels` and `a_restored_window_keeps_its_title_bar_out_of_a_taskbar_along_the_top`. - A menu in a floating panel's OS window stops at that window's bottom edge and scrolls past it, and is never taller than the window (#5347; `a_long_panel_menu_scrolls_inside_a_short_native_window`). A panel's long submenus (Digits, Stylistic Sets, Save Selection, Move to Group), the libraries menu, the Color Guide's Limit to Library menu and the Layers panel's Filter popup scroll the same way. - The dock's double arrow collapses Properties, Layers and Libraries to icons at the top of the icon column, popping out like the other icon panels, and expands them again (`window.collapseDock`, kept with the preferences and in saved workspaces). The icon column's own arrow (expanding the icon panels into a full column) is not done. - Window › Toolbars › New Toolbar… and New Toolbar… in the All Tools drawer's menu ask for a name and make a blank toolbar that floats on its own, moved by its title bar and listed under Window › Toolbars, whose item shows or hides it. The title bar's × hides it, and its double arrow shows its tools in one column or two. Its ••• button opens the All Tools drawer beside it, and tools dragged from the drawer fill it. The toolbars are kept with the workspace they were made in: switching workspaces shows that workspace's toolbars, Reset Workspace keeps them, and New Workspace starts the new workspace with a copy of them (; `window.toolbar.new`, `window.toolbar.custom`, the `toolbar` param of `window.editToolbar` and `toolbar.addTool`/`removeTool`/`reset`; `tools_added_to_a_new_toolbar_survive_a_workspace_reload`). From ff7d571f9d5ef401fdfa2fe1c5610f1edc08fa4b Mon Sep 17 00:00:00 2001 From: HassanKhan Date: Fri, 20 Nov 2026 02:45:13 +0500 Subject: [PATCH 42/49] Docs: resolve the conflict markers left in by the main merge (#8711) --- docs/roadmap.md | 14 +------------- docs/target-app-parity.md | 9 +-------- docs/ui-parity.md | 9 +-------- 3 files changed, 3 insertions(+), 29 deletions(-) diff --git a/docs/roadmap.md b/docs/roadmap.md index 410fcef6f9..081f44d5f2 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -1,10 +1,6 @@ # Roadmap: milestones and what's next -<<<<<<< HEAD -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (M1: Layers: a targeted item with an appearance of its own keeps its inner ring visible around a smaller appearance dot, so the target circle's four looks differ, #8711; scores and estimates unchanged; previously: M5: In the web build, an edit while the view of a heavy document moves (a tool drag held at an edge of the canvas, #8551, or a wheel scroll during a drag) draws only the part it changed into the last frame, which stays drawn moved with the view, instead of rendering the whole canvas each frame (an edit that changes more than half of the frame, or a change of more than the view and the document, still renders it whole at once), and edits that go on once the view is still don't put off its render (#8688); scores and estimates unchanged; previously: Image Trace Ignore Color keeps the canvas View and stays armed on a missed pixel (#8068); M11: a tool drag held near an edge of the canvas scrolls the view, #8551; scores and estimates unchanged; previously: All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, and a hovered dimmed row takes the panel's darker fill so it stays readable, #8294; scores and estimates unchanged; previously: Layers: selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: M4: PDF import: type filled and stroked after a page of type filled only comes in filled and stroked, #8549 follow-up; scores and estimates unchanged; previously: selected Dimension extension-line color and weight in Properties (#7078; four focused UI regressions passed); scores and estimates unchanged; previously: Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: M4: `.ai` and EPS import: an Art brush in Tints of a swatch-linked stroke color comes in brushed, #8200; scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: M4: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, #8128; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: M1: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; M1: an Alt-drag in the Layers panel copies a row above or below its own place, #8237; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview are in; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; M4/M7: `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; M4/M7: `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; Hindi catalog and contributor loanword preferences; full wording review in progress; Effect dialogs: a colour swatch beside a hex colour opens the Color Picker, #5365; shape tools move the selection from its centre point and turn it from the zone outside a box corner, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) -======= -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (Scissors shows the actual proposed cut point while hovering, using its existing snapping and cut target (#8655); scores and estimates unchanged; previously: M5: In the web build, an edit while the view of a heavy document moves (a tool drag held at an edge of the canvas, #8551, or a wheel scroll during a drag) draws only the part it changed into the last frame, which stays drawn moved with the view, instead of rendering the whole canvas each frame (an edit that changes more than half of the frame, or a change of more than the view and the document, still renders it whole at once), and edits that go on once the view is still don't put off its render (#8688); scores and estimates unchanged; previously: Image Trace Ignore Color keeps the canvas View and stays armed on a missed pixel (#8068); M11: a tool drag held near an edge of the canvas scrolls the view, #8551; scores and estimates unchanged; previously: All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, and a hovered dimmed row takes the panel's darker fill so it stays readable, #8294; scores and estimates unchanged; previously: Layers: selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: M4: PDF import: type filled and stroked after a page of type filled only comes in filled and stroked, #8549 follow-up; scores and estimates unchanged; previously: selected Dimension extension-line color and weight in Properties (#7078; four focused UI regressions passed); scores and estimates unchanged; previously: Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: M4: `.ai` and EPS import: an Art brush in Tints of a swatch-linked stroke color comes in brushed, #8200; scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: M4: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, #8128; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: M1: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; M1: an Alt-drag in the Layers panel copies a row above or below its own place, #8237; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview are in; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; M4/M7: `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; M4/M7: `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; Hindi catalog and contributor loanword preferences; full wording review in progress; Effect dialogs: a colour swatch beside a hex colour opens the Color Picker, #5365; shape tools move the selection from its centre point and turn it from the zone outside a box corner, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) ->>>>>>> origin/main +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-20 · **Change:** minor (M1: Layers: a targeted item with an appearance of its own keeps its inner ring visible around a smaller appearance dot, so the target circle's four looks differ, #8711; scores and estimates unchanged; previously: Scissors shows the actual proposed cut point while hovering, using its existing snapping and cut target (#8655); scores and estimates unchanged; previously: M5: In the web build, an edit while the view of a heavy document moves (a tool drag held at an edge of the canvas, #8551, or a wheel scroll during a drag) draws only the part it changed into the last frame, which stays drawn moved with the view, instead of rendering the whole canvas each frame (an edit that changes more than half of the frame, or a change of more than the view and the document, still renders it whole at once), and edits that go on once the view is still don't put off its render (#8688); scores and estimates unchanged; previously: Image Trace Ignore Color keeps the canvas View and stays armed on a missed pixel (#8068); M11: a tool drag held near an edge of the canvas scrolls the view, #8551; scores and estimates unchanged; previously: All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, and a hovered dimmed row takes the panel's darker fill so it stays readable, #8294; scores and estimates unchanged; previously: Layers: selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: M4: PDF import: type filled and stroked after a page of type filled only comes in filled and stroked, #8549 follow-up; scores and estimates unchanged; previously: selected Dimension extension-line color and weight in Properties (#7078; four focused UI regressions passed); scores and estimates unchanged; previously: Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: M4: `.ai` and EPS import: an Art brush in Tints of a swatch-linked stroke color comes in brushed, #8200; scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: M4: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, #8128; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: M1: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; M1: an Alt-drag in the Layers panel copies a row above or below its own place, #8237; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: M10/G5: Energy Beams brush library; MCP docs list Energy Beams; previously minor: M10/G5: Skill Icons symbol library; MCP docs list Skill Icons; previously minor: M10/G5: Status Effects graphic style library; MCP docs catch-up for symbol libraries; previously minor: M10/G5: Inventory Icons built-in symbol library; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: M10/G5: Game HUD graphic style library; previously minor: resizable icon-strip flyouts and bottom-aligned panel footers, #5713; previously minor: M10/G5: Map Markers built-in symbol library; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: G2: Effect Gallery thumbnails and in-dialog preview are in; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; M4/M7: `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; M4/M7: `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Indian-language hyphenation review and license allowlist, #4947; Hindi catalog and contributor loanword preferences; full wording review in progress; Effect dialogs: a colour swatch beside a hex colour opens the Color Picker, #5365; shape tools move the selection from its centre point and turn it from the zone outside a box corner, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x) > > Oversized artboard import update (2026-11-12): Explicit editing-data import retains a single artboard beyond a capped 14,400 pt PDF page (#6865). > @@ -182,13 +178,8 @@ Gujarati interface follow-up (2026-11-14): the catalog and zero/one plural rule | # | Milestone | Status | Est. remaining, one agent (h) | |---|---|---|---| | M0 | Skeleton + vertical slice | ✅ done | — | -<<<<<<< HEAD | M1 | Selection, transform, layers, MCP (common command tools, strict keys, session resources and version-aware result hints) | ✅ mostly done (a targeted Layers item with an appearance of its own shows its inner ring around a smaller appearance dot (#8711); path and compound-path interior selection follows enabled fill rows (#6625); a marquee leaves locked or hidden guide paths out inside groups, as clicks do (#8538); hidden-fill and no-fill stroke cap/join CPU regressions passed; document-tab artwork drag with lossless resource transfer and one target Undo; malformed MCP app replies discard the connection without replay, #1761; bounded control socket waits and connection-slot recovery, #1726; bounded synthetic control input, #1709; no-op anchor Align keeps Undo, Redo and saved state (#1180 follow-up); transform reference point snaps to anchors/centres; rotated objects keep a rotated bounding box and their angle; Free Transform, Scale and Reflect along a rotated box pending; the Transform fields take one Tab each, the W/H link after them) | 4–6 | -| M2 | Drawing tools + smart guides | ✅ mostly done (Eraser preserves fill outside fixed and varied tip sweeps and Alt-drag marquees on fill-only open paths and keeps their compound holes; clipping masks retain surviving contours or empty geometry in the same node; ordinary Group/Layer paints and evaluated gradient placements are preserved when the stored paint reproduces their appearance; hidden Rasterize and Along/Across stroke rows do not block visible gradients; replacement-art effects, plug-ins/Rasterize, along/across-stroke gradients and placements that cannot be reproduced keep their existing fitting; stroked open paths retain main behavior (#6582); #3380 deletion creates independent selected path pieces and keeps bounds-fitted gradients in place; endpoint highlighting remains open; Polygon/Star exact-size count persistence, with repeated-drag, tool-switch and Cancel regression coverage; Curvature point markers without direction handles (#1236, in part); Direct Selection segment click/Delete preserves neighboring edges, #1278; Flare, Reshape, Live Corners widget dragging and per-corner radii and kinds landed, on any path's corners; Shaper rough-shape recognition and orientation steps, the remaining Pen modifier nuances; Shaper Groups with editable sources and separate fill/stroke edits landed; custom ruler origin with drag preview, active-artboard reset, relative X/Y fields and native round-trip (#1212); construction widget/refinements pending); a shape just drawn moves by its centre point and turns from the zone outside a corner with its tool still active (#5477); Tangent and straight-segment perpendicular snapping use saved Smart Guides Geometric Guides preferences and Control bar quick access (#2537), including the existing Snap to Glyph and Alignment Guides toggles (#6164); no View submenu; Copy and Cut with the Pen or Curvature tool take the anchors a Cmd/Ctrl-lent Direct Selection picked (#6123); Scissors hover and cuts use the Pen's path/align/intersect/anchor snaps, with Alt Add Anchor and cut endpoint selection retained (#6470) | 12–18 | -======= -| M1 | Selection, transform, layers, MCP (common command tools, strict keys, session resources and version-aware result hints) | ✅ mostly done (path and compound-path interior selection follows enabled fill rows (#6625); a marquee leaves locked or hidden guide paths out inside groups, as clicks do (#8538); hidden-fill and no-fill stroke cap/join CPU regressions passed; document-tab artwork drag with lossless resource transfer and one target Undo; malformed MCP app replies discard the connection without replay, #1761; bounded control socket waits and connection-slot recovery, #1726; bounded synthetic control input, #1709; no-op anchor Align keeps Undo, Redo and saved state (#1180 follow-up); transform reference point snaps to anchors/centres; rotated objects keep a rotated bounding box and their angle; Free Transform, Scale and Reflect along a rotated box pending; the Transform fields take one Tab each, the W/H link after them) | 4–6 | | M2 | Drawing tools + smart guides | ✅ mostly done (Eraser preserves fill outside fixed and varied tip sweeps and Alt-drag marquees on fill-only open paths and keeps their compound holes; clipping masks retain surviving contours or empty geometry in the same node; ordinary Group/Layer paints and evaluated gradient placements are preserved when the stored paint reproduces their appearance; hidden Rasterize and Along/Across stroke rows do not block visible gradients; replacement-art effects, plug-ins/Rasterize, along/across-stroke gradients and placements that cannot be reproduced keep their existing fitting; stroked open paths retain main behavior (#6582); #3380 deletion creates independent selected path pieces and keeps bounds-fitted gradients in place; endpoint highlighting remains open; Polygon/Star exact-size count persistence, with repeated-drag, tool-switch and Cancel regression coverage; Curvature point markers without direction handles (#1236, in part); Direct Selection segment click/Delete preserves neighboring edges, #1278; Flare, Reshape, Live Corners widget dragging and per-corner radii and kinds landed, on any path's corners; Shaper rough-shape recognition and orientation steps, the remaining Pen modifier nuances; Shaper Groups with editable sources and separate fill/stroke edits landed; custom ruler origin with drag preview, active-artboard reset, relative X/Y fields and native round-trip (#1212); construction widget/refinements pending); a shape just drawn moves by its centre point and turns from the zone outside a corner with its tool still active (#5477); Tangent and straight-segment perpendicular snapping use saved Smart Guides Geometric Guides preferences and Control bar quick access (#2537), including the existing Snap to Glyph and Alignment Guides toggles (#6164); no View submenu; Copy and Cut with the Pen or Curvature tool take the anchors a Cmd/Ctrl-lent Direct Selection picked (#6123); Scissors hover and cuts use the Pen's path/align/intersect/anchor snaps, with Alt Add Anchor and cut endpoint selection retained (#6470); Scissors previews the current anchor or curve cut point (#8655) | 12–18 | ->>>>>>> origin/main | M3 | Paint & appearance (swatches, color, gradient, stroke, appearance, transparency, styles) | ✅ done (M3.7–M3.98): swatches, groups, libraries, tints, Lab spots and Registration; Eyedropper copies transformed character dimensions (#6404) and styles highlighted text only (atomic transparency rejection); Eyedropper reads visible locked and outside-isolation sources (#1251); Color Picker, Color panel (its spectrum grows with a resized panel, #8005), Color Guide, Color Themes, Edit Colors and Recolor Artwork (screen-bounded Edit chip list, #3416; native Lab entry and swatch libraries in the picker, Assign-row menus, #8031/#4028); gradients that follow every transform, the annotator, linked stops, freeform gradients, focal points, gradients on strokes and Expand; visible strokes when paint is added to inherited None/zero-width art (#1253); stroke geometry, arrowheads, dashes fitted to corners, stroke on type, width profiles and the Width tool (Shift-double-click enables adjoining adjustment in Width Point Edit; finite-arithmetic follow-up regressions and full CI passed ([Validation evidence](target-app-parity.md#evidence-what-ships-today-by-area))), Scale Strokes and preview bounds; Appearance targeting, container appearance, target circles, Expand Appearance; knockout, isolation, blend accuracy, CMYK blending, overprint, Attributes, masks and clipping, Flatten Transparency; graphic styles, links and libraries; CSS library export preserves fractional linear and radial gradient stop positions. Left: freeform gradients in SVG/PDF, mixed spot/process gradients in SVG and PDF gradients mixing a spot color with RGB or Lab stops export as stops or process colors; PDF export writes dithered gradient fills with spot stops, and Perceptual spot gradients with RGB or Lab stops other than white or more than 4,096 stops on their curve, as images in process colors; confirm the Scale Strokes & Effects default; Recolor model selection is available through the engine and MCP only (#2520); the dialog retains its existing controls; Library panels' lists (swatch, Color Book, brush, symbol and graphic style libraries) fill a taller panel above its footer (#2992; scores and estimates unchanged); Graphic Styles list fills a taller panel above its footer (#2992; scores and estimates unchanged); Swatches list fills a taller panel above its footer (#1638; `the_list_fills_a_tall_panel_above_its_footer`; scores and estimates unchanged); | 4–8 | | M4 | Files (native, SVG, PDF, raster, Export for Screens, clipboard interop) | `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths (#8128; estimates unchanged); Production Preflight checks fonts, overflow, links and image resolution with clickable findings and automatic rechecking (VectorCraft addition; estimates unchanged); PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked (#8300; estimates unchanged); PDF import: type filled and stroked by one text-showing operator comes in as one filled and stroked type object (#8015; not for type filled and stroked at less than full opacity, which still comes in as a filled object and a stroked one, as the file composites them; estimates unchanged); PDF import: type filled and stroked by a `TJ` whose kerning starts a new line part way through comes in filled and stroked, a type object for each part, also where it draws a glyph again where it drew one, in an `ActualText` span too, where it stays one replacement type object on the first glyph's line and in its style; a `TJ` over more than 65 lines (the 64 its fill pass finished, kept back, and the open one) stays a filled object and a stroked one for each part (#8543; estimates unchanged); PDF import: type filled and stroked after a page of type filled only (more than 64 lines) comes in as one filled and stroked type object again, with or without a path between, and a `TJ` over more lines than are kept with a glyph kept as an outline still stays a filled object and a stroked one for each part (#8549 follow-up; estimates unchanged); PDF import: stroked type keeps the file's line cap, line join and miter limit (#7741; estimates unchanged); Rename artboards in Export for Screens (#7275); Explicit editing-data import keeps oversized capped-page artboards (#6865; estimates unchanged); Save refusal continuation (#6146): ordinary Save offers Save As; unchanged format keeps options, changed format opens its Save options; cancellation/automation isolation; focused UI regressions passed, native acceptance pending; PDF authored ActualText preserved once in editable import (#6165; first-glyph line/style, bounded input; estimates unchanged); PDF export keeps harakat and zero-advance Noto Arabic dot glyphs in one compatible batch per layout line, with per-glyph vertical offsets (#6309). `crates/pdf/src/tests/realtext.rs` (`mark_text_*`) checks decoded cluster mappings, mixed Arabic/Latin/digits, contour placement against outline export, vertical columns, differing path rotations and PDF/X-1a/3/4. Editable-text import preserves authored ActualText separately (#6165), with cross-line/style layout limits; separately styled or differently rotated clusters and external viewer search/copy remain outside this export-only evidence. `.ai`/EPS type from the text document keeps its paragraphs' tab stops (#6147); `.ai`/EPS type from the text document keeps auto leading per line, its hyphenation options, and may show more of the last lines the file sets in an area frame of its own, when growing the frame by its lines' deepest descent plus 0.05 pt shows them (#6137); ✅ done (M4.14–M4.98 on 2026-10-05): Save As/Save a Copy/Revert/templates, Data Recovery and background save, SVG import and export fidelity (units, text, symbols, filters, SVGZ, Preserve Editing, SVG Options), shared guarded PDF writer and windowed reader ([pdf-backend.md](pdf-backend.md)), PDF import (colours, layers, masks, editable text, security) and export (presets, marks, bleed, ICC and output intent, raster effects, subset fonts, PDF/X-1a, X-3 and X-4, PDF layers, overprint, page thumbnails, fast web view, PDF 1.3), Place and Links, Package, EPS and DXF in and out (EPS legacy mesh corners, vector opacity masks and raster page comparison verified; closed SPLINE flags round-trip and circular paths export as native CIRCLE/ARC, #1299), EMF/WMF, TIFF/BMP/Targa/PSD/GIF/PNG-8 export, Print and print presets, slices, Save for Web, TIFF in Export for Screens and Asset Export, clipboard flavours, File Info; AF.1–AF.4 add Affinity import (native layers, artboards, vectors, text and images from Affinity 1–3 files; the embedded preview only as a warned fallback; AF.4 expands current `.af` fixtures and every-board round-trip validation); EPS Save and Save As keep an opened EPS as EPS with its page frame and complete editable VectorCraft document (2026-10-26; G9 import fidelity unchanged). Left: DWG (use DXF), PSD placement as layers, overprint read back from PDF, Affinity export, polish; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; PDF import: glyphs inside a marked-content span with an empty `ActualText` come in as outlines in their fill and stroke, adding no text (#6971; scores and estimates unchanged); | 3–6 (existing scope; Affinity export unestimated) | | M5 | Performance | 🟡 background render + caches + MT done; text thread overlays index repeated selection lookups, keeping the first lookup and singleton selections direct (#6543); `vectorcraft-cli bench` and `vectorcraft-cli perf` (budget suite); opaque solid-fill knockout paths draw once in hard-edge/supersampled raster export, with analytical-AA compositing unchanged; file format v2 opens 3× faster (50k paths: 722 → 244 ms); raster effects (glows, shadows, blur, feather) no longer force the whole frame single-threaded (filtered offscreen per effect, verified equal to the single-threaded reference); Craquelure/Mosaic Tiles/Stained Glass distance searches optimized with pixel-invariance checks and the `texture_drag_perf` probe (#1257); effect-heavy demos need a clean-machine benchmark; in the web build an edit while the view of a heavy document moves draws only the part it changed into the last frame (#8688); dirty-region rendering, GPU backend spike pending | 15–25 | @@ -244,11 +235,8 @@ not take the artwork yet. Overflow-menu drag remains separate. Scores and hours | Date | Change | Summary | |---|---|---| -<<<<<<< HEAD | 2026-11-19 | minor | M1: Layers: a target circle whose item is targeted and has an appearance of its own keeps its inner ring visible around a smaller appearance dot, so the four looks (not targeted, targeted, with an appearance, both) differ (#8711). Scores and estimates unchanged. | -======= | 2026-11-19 | minor | Scissors previews its actual anchor or curve cut point with a native point marker while hovering, retaining existing snapping, Alt Add Anchor and cut behavior (#8655). Scores and estimates unchanged. | ->>>>>>> origin/main | 2026-11-19 | minor | M5: In the web build, an edit while the view of a heavy document moves (a tool drag held at an edge of the canvas, #8551, or a wheel scroll during a drag) draws only the part it changed into the last frame, which stays drawn moved with the view, instead of rendering the whole canvas each frame (an edit that changes more than half of the frame, or a change of more than the view and the document, still renders it whole at once), and edits that go on once the view is still don't put off its render (#8688). Scores and estimates unchanged. | | 2026-11-18 | minor | M10/G5: Media Controls joins Basic Shapes, UI Frames, Map Markers, Inventory Icons, Skill Icons and Weather Icons as a seventh built-in symbol library (Play, Pause, Stop, Skip Next, Shuffle, Repeat; original procedural vector symbols generated in code, no default 9-slice); G5 estimate decremented to 2–12 h, milestone estimates unchanged | | 2026-11-18 | minor | M7/G4: Retype phase 1 (#4934): `type.retype` turns outlined text that exactly matches an available font back into point text. Scores and estimates unchanged | diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 969b7605c9..8e9bf93fca 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1,10 +1,6 @@ # Parity with Adobe Illustrator -<<<<<<< HEAD -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-20 · **Change:** minor (Layers: a targeted item with an appearance of its own keeps its inner ring visible around a smaller appearance dot, so the target circle's four looks differ, #8711; scores and estimates unchanged; previously: G12: Brushes panel: item right-click context menu (Brush Options, Duplicate Brush, Delete Brush) with selection handling; scores and estimates unchanged; previously: Graphic Styles panel: right-click item context menu for tiles and rows with Options, Duplicate, Delete, Redefine, Break Link; scores and estimates unchanged; previously: In the web build, an edit while the view of a heavy document moves (a tool drag held at an edge of the canvas, #8551, or a wheel scroll during a drag) draws only the part it changed into the last frame, which stays drawn moved with the view, instead of rendering the whole canvas each frame, and edits that go on once the view is still don't put off its render (#8688); scores and estimates unchanged; previously: G12: Links panel row context menu (Relink…, Go To Link, Update Link, Edit Original, Show in Folder, Embed Image / Unembed…) with selection handling; scores and estimates unchanged; previously: Artboard tool: Shift held once a move or Alt-copy drag is under way keeps it to the level, upright or 45° line, #8580; scores and estimates unchanged; previously: Image Trace Ignore Color keeps the canvas View and stays armed on a missed pixel (#8068); a tool drag held near an edge of the canvas scrolls the view, #8551; scores and estimates unchanged; previously: G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s, part of #5930; scores and estimates unchanged; previously: All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, and a hovered dimmed row takes the panel's darker fill so it stays readable, #8294; scores and estimates unchanged; previously: Layers: selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: PDF import: type filled and stroked after a page of type filled only comes in filled and stroked, #8549 follow-up; scores and estimates unchanged; previously: selected Dimension extension-line color and weight in Properties (#7078; four focused UI regressions passed); scores and estimates unchanged; previously: Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: #8200: `.ai` and EPS import: an Art brush in Tints of a swatch-linked stroke color comes in brushed, its tints linked to the swatch; scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: SVG export preserves document units on root width/height for physical units, #864; G11 estimate 8–15 → 6–13 h; previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: #8128: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, so the compound clipping path clips its clipping group; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Twist: a strongly twisted path joins its pieces without kinks, #7069; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; Layers panel: Alt over the list shows the copy cursor while rows or the selection square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Properties panel: the Character section shows the font of the Type tool's selection, not the first run's (#8189); scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and a Standard Single-line and Every-line that set Indic, Arabic and Hebrew type glyph by glyph as the font maps it, for legacy fonts that keep a script on Latin character codes; PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; G5: Neon & Glow joins built-in graphic style libraries (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); scores and estimates unchanged; previously: Pencil ignores Smart Guides and Snap to Point and shows no Smart Guides, #7252; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: G5: Weather Icons joins built-in symbol libraries (Sun, Moon, Cloud, Rain, Thunder, Snow); scores and estimates unchanged; previously: a closed Pencil stroke closes with a straight segment; previously: Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; Character panel: the Set Font Height Reference dropdown shows an icon before each reference, #6304; scores and estimates unchanged; previously: Envelopes: a top object's side whose pieces are all one curve split at anchors follows that curve's parameter, so a top object saved with its sides' curves in pieces draws as its `.ai` drawn art, #7097; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously minor: Object › Rasterize with the Grayscale or Bitmap colour model makes a grayscale image, #6969; scores and estimates unchanged; previously minor: `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, miter tips and moved strokes included, after its glyphs grown by half its strokes' weight (#6824; #6617: Swatches panel menu: Show Recent Colors; scores unchanged; previously minor: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Type tool: kerning at a caret at the start of a line moves the character after it, #5111; scores and estimates unchanged; previously minor: Rulers: the zero point dragged out of the rulers' corner snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Envelopes: with Distort Appearance, type's strokes paint along the bent glyph outlines at their own weight, as users' `.ai` files draw them, which changes how VectorCraft's own envelopes of stroked type draw (#6644; scores and estimates unchanged); previously minor: G5: Energy Beams brush library; bundled content ~44% → ~46%; previously minor: G5: Skill Icons symbol library; bundled content ~42% → ~44%; previously minor: `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art (#6570; scores and estimates unchanged); previously minor: ruler double-click adds a guide at the pointer, #5239; G5: Status Effects graphic style library; bundled content ~40% → ~42%; MCP symbol libraries list UI Frames and Map Markers; previously minor: G5: Inventory Icons built-in symbol library; bundled content ~38% → ~40%; previously minor: `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke (#3179; scores and estimates unchanged); previously minor: `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid where VectorCraft's warp doesn't draw as their drawn art (#3179; scores and estimates unchanged); G5: Game Trails brush library; bundled content ~36% → ~38%; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page (#3179; scores and estimates unchanged); G5: Game HUD graphic style library; bundled content ~34% → ~36%; previously minor: Line Arrow arrowhead (#5421; scores and estimates unchanged); G5: Map Markers built-in symbol library; bundled content ~32% → ~34%; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Canvas: a 3D effect changed on type or a group redraws where its solid was; Fit to Artwork Bounds and per-artboard SVG export build each solid once for all artboards; previously minor: Effect Gallery: a thumbnail for each filter and a preview area inside the dialog, on an original drawing; Raster effects 52% → 55%, hours 1–2 → none; headline numbers unchanged; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: UI Frames built-in symbol library with default 9-slice; bundled content ~32%; previously minor: G5: dynamic symbol part on-canvas opacity/blend/gradient/pattern; strokes remaining no longer lists Overlap/auto corners; symbols ~88%; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: harakat paint fallback clarified; previously minor: current Guides feature-area rows consolidated using existing ruler evidence; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap and Pattern brush auto corners removed from strokes remaining; symbols remaining lists dynamic on-canvas beyond solid and guides outside the art; previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; `.ai` and EPS import: older Art brush objects read; numeric fields step on wheel hover without taking keyboard focus, and a panel wheel turn cannot seed a canvas zoom glide, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; the canvas keeps selection outlines and anchors between frames; Indian-language hyphenation review and license allowlist, #4947; Stroke gradients: an arrowhead aligned to the tip is painted to the corners of its base, #5964; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Hindi catalog and contributor loanword preferences; full wording review in progress; Properties in Edit Artboards: a Transform section with the reference point above the Artboards section, #5219; the Control bar's Stroke: and Opacity: links scrub their fields, #4088; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window, #4155; Control bar Paragraph section with type selected, #5372; translating unchanged type reuses its glyph and character-stroke outlines; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026; Units › East Asian Type acts, with Q and Ha units; scores unchanged) -======= -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (Scissors shows the actual proposed cut point while hovering, using its existing snapping and cut target (#8655); scores and estimates unchanged; previously: G12: Brushes panel: item right-click context menu (Brush Options, Duplicate Brush, Delete Brush) with selection handling; scores and estimates unchanged; previously: Graphic Styles panel: right-click item context menu for tiles and rows with Options, Duplicate, Delete, Redefine, Break Link; scores and estimates unchanged; previously: In the web build, an edit while the view of a heavy document moves (a tool drag held at an edge of the canvas, #8551, or a wheel scroll during a drag) draws only the part it changed into the last frame, which stays drawn moved with the view, instead of rendering the whole canvas each frame, and edits that go on once the view is still don't put off its render (#8688); scores and estimates unchanged; previously: G12: Links panel row context menu (Relink…, Go To Link, Update Link, Edit Original, Show in Folder, Embed Image / Unembed…) with selection handling; scores and estimates unchanged; previously: Artboard tool: Shift held once a move or Alt-copy drag is under way keeps it to the level, upright or 45° line, #8580; scores and estimates unchanged; previously: Image Trace Ignore Color keeps the canvas View and stays armed on a missed pixel (#8068); a tool drag held near an edge of the canvas scrolls the view, #8551; scores and estimates unchanged; previously: G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s, part of #5930; scores and estimates unchanged; previously: All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, and a hovered dimmed row takes the panel's darker fill so it stays readable, #8294; scores and estimates unchanged; previously: Layers: selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: PDF import: type filled and stroked after a page of type filled only comes in filled and stroked, #8549 follow-up; scores and estimates unchanged; previously: selected Dimension extension-line color and weight in Properties (#7078; four focused UI regressions passed); scores and estimates unchanged; previously: Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: #8200: `.ai` and EPS import: an Art brush in Tints of a swatch-linked stroke color comes in brushed, its tints linked to the swatch; scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: SVG export preserves document units on root width/height for physical units, #864; G11 estimate 8–15 → 6–13 h; previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: #8128: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, so the compound clipping path clips its clipping group; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Twist: a strongly twisted path joins its pieces without kinks, #7069; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; Layers panel: Alt over the list shows the copy cursor while rows or the selection square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Properties panel: the Character section shows the font of the Type tool's selection, not the first run's (#8189); scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and a Standard Single-line and Every-line that set Indic, Arabic and Hebrew type glyph by glyph as the font maps it, for legacy fonts that keep a script on Latin character codes; PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; G5: Neon & Glow joins built-in graphic style libraries (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); scores and estimates unchanged; previously: Pencil ignores Smart Guides and Snap to Point and shows no Smart Guides, #7252; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: G5: Weather Icons joins built-in symbol libraries (Sun, Moon, Cloud, Rain, Thunder, Snow); scores and estimates unchanged; previously: a closed Pencil stroke closes with a straight segment; previously: Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; Character panel: the Set Font Height Reference dropdown shows an icon before each reference, #6304; scores and estimates unchanged; previously: Envelopes: a top object's side whose pieces are all one curve split at anchors follows that curve's parameter, so a top object saved with its sides' curves in pieces draws as its `.ai` drawn art, #7097; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously minor: Object › Rasterize with the Grayscale or Bitmap colour model makes a grayscale image, #6969; scores and estimates unchanged; previously minor: `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, miter tips and moved strokes included, after its glyphs grown by half its strokes' weight (#6824; #6617: Swatches panel menu: Show Recent Colors; scores unchanged; previously minor: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Type tool: kerning at a caret at the start of a line moves the character after it, #5111; scores and estimates unchanged; previously minor: Rulers: the zero point dragged out of the rulers' corner snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Envelopes: with Distort Appearance, type's strokes paint along the bent glyph outlines at their own weight, as users' `.ai` files draw them, which changes how VectorCraft's own envelopes of stroked type draw (#6644; scores and estimates unchanged); previously minor: G5: Energy Beams brush library; bundled content ~44% → ~46%; previously minor: G5: Skill Icons symbol library; bundled content ~42% → ~44%; previously minor: `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art (#6570; scores and estimates unchanged); previously minor: ruler double-click adds a guide at the pointer, #5239; G5: Status Effects graphic style library; bundled content ~40% → ~42%; MCP symbol libraries list UI Frames and Map Markers; previously minor: G5: Inventory Icons built-in symbol library; bundled content ~38% → ~40%; previously minor: `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke (#3179; scores and estimates unchanged); previously minor: `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid where VectorCraft's warp doesn't draw as their drawn art (#3179; scores and estimates unchanged); G5: Game Trails brush library; bundled content ~36% → ~38%; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page (#3179; scores and estimates unchanged); G5: Game HUD graphic style library; bundled content ~34% → ~36%; previously minor: Line Arrow arrowhead (#5421; scores and estimates unchanged); G5: Map Markers built-in symbol library; bundled content ~32% → ~34%; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Canvas: a 3D effect changed on type or a group redraws where its solid was; Fit to Artwork Bounds and per-artboard SVG export build each solid once for all artboards; previously minor: Effect Gallery: a thumbnail for each filter and a preview area inside the dialog, on an original drawing; Raster effects 52% → 55%, hours 1–2 → none; headline numbers unchanged; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: UI Frames built-in symbol library with default 9-slice; bundled content ~32%; previously minor: G5: dynamic symbol part on-canvas opacity/blend/gradient/pattern; strokes remaining no longer lists Overlap/auto corners; symbols ~88%; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: harakat paint fallback clarified; previously minor: current Guides feature-area rows consolidated using existing ruler evidence; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap and Pattern brush auto corners removed from strokes remaining; symbols remaining lists dynamic on-canvas beyond solid and guides outside the art; previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; `.ai` and EPS import: older Art brush objects read; numeric fields step on wheel hover without taking keyboard focus, and a panel wheel turn cannot seed a canvas zoom glide, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; the canvas keeps selection outlines and anchors between frames; Indian-language hyphenation review and license allowlist, #4947; Stroke gradients: an arrowhead aligned to the tip is painted to the corners of its base, #5964; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Hindi catalog and contributor loanword preferences; full wording review in progress; Properties in Edit Artboards: a Transform section with the reference point above the Artboards section, #5219; the Control bar's Stroke: and Opacity: links scrub their fields, #4088; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window, #4155; Control bar Paragraph section with type selected, #5372; translating unchanged type reuses its glyph and character-stroke outlines; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026; Units › East Asian Type acts, with Q and Ha units; scores unchanged) ->>>>>>> origin/main +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-20 · **Change:** minor (Layers: a targeted item with an appearance of its own keeps its inner ring visible around a smaller appearance dot, so the target circle's four looks differ, #8711; scores and estimates unchanged; previously: Scissors shows the actual proposed cut point while hovering, using its existing snapping and cut target (#8655); scores and estimates unchanged; previously: G12: Brushes panel: item right-click context menu (Brush Options, Duplicate Brush, Delete Brush) with selection handling; scores and estimates unchanged; previously: Graphic Styles panel: right-click item context menu for tiles and rows with Options, Duplicate, Delete, Redefine, Break Link; scores and estimates unchanged; previously: In the web build, an edit while the view of a heavy document moves (a tool drag held at an edge of the canvas, #8551, or a wheel scroll during a drag) draws only the part it changed into the last frame, which stays drawn moved with the view, instead of rendering the whole canvas each frame, and edits that go on once the view is still don't put off its render (#8688); scores and estimates unchanged; previously: G12: Links panel row context menu (Relink…, Go To Link, Update Link, Edit Original, Show in Folder, Embed Image / Unembed…) with selection handling; scores and estimates unchanged; previously: Artboard tool: Shift held once a move or Alt-copy drag is under way keeps it to the level, upright or 45° line, #8580; scores and estimates unchanged; previously: Image Trace Ignore Color keeps the canvas View and stays armed on a missed pixel (#8068); a tool drag held near an edge of the canvas scrolls the view, #8551; scores and estimates unchanged; previously: G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s, part of #5930; scores and estimates unchanged; previously: All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, and a hovered dimmed row takes the panel's darker fill so it stays readable, #8294; scores and estimates unchanged; previously: Layers: selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: PDF import: type filled and stroked after a page of type filled only comes in filled and stroked, #8549 follow-up; scores and estimates unchanged; previously: selected Dimension extension-line color and weight in Properties (#7078; four focused UI regressions passed); scores and estimates unchanged; previously: Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: #8200: `.ai` and EPS import: an Art brush in Tints of a swatch-linked stroke color comes in brushed, its tints linked to the swatch; scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: SVG export preserves document units on root width/height for physical units, #864; G11 estimate 8–15 → 6–13 h; previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: #8128: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, so the compound clipping path clips its clipping group; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Twist: a strongly twisted path joins its pieces without kinks, #7069; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; Layers panel: Alt over the list shows the copy cursor while rows or the selection square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Properties panel: the Character section shows the font of the Type tool's selection, not the first run's (#8189); scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and a Standard Single-line and Every-line that set Indic, Arabic and Hebrew type glyph by glyph as the font maps it, for legacy fonts that keep a script on Latin character codes; PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; G5: Neon & Glow joins built-in graphic style libraries (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); scores and estimates unchanged; previously: Pencil ignores Smart Guides and Snap to Point and shows no Smart Guides, #7252; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: G5: Weather Icons joins built-in symbol libraries (Sun, Moon, Cloud, Rain, Thunder, Snow); scores and estimates unchanged; previously: a closed Pencil stroke closes with a straight segment; previously: Snap to Point with Smart Guides off draws no Smart Guides labels or lines, #7250; previously: 3D: the seams of Extrude & Bevel, Inflate and Rotate under a white light, and of the faces of Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic), went from miter to round joins, so white-light 3D output is expected to differ from the 2026-10-17 comparison at facet corners (not measured: the scenes were not exported again); previously: `.ai` and EPS import: in layers that don't draw as the page, art that differs away from an envelope of type no longer costs it its editable type; it keeps its drawn art where, in the pixels it and its drawn art ink, the layers with it differ from the page more than its own check allows, or past the envelopes' share of the page check, #7141; Character panel: the Set Font Height Reference dropdown shows an icon before each reference, #6304; scores and estimates unchanged; previously: Envelopes: a top object's side whose pieces are all one curve split at anchors follows that curve's parameter, so a top object saved with its sides' curves in pieces draws as its `.ai` drawn art, #7097; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously minor: Object › Rasterize with the Grayscale or Bitmap colour model makes a grayscale image, #6969; scores and estimates unchanged; previously minor: `.ai` and EPS import: type in an envelope with Distort Appearance is also tried mapped from the box of what it paints, miter tips and moved strokes included, after its glyphs grown by half its strokes' weight (#6824; #6617: Swatches panel menu: Show Recent Colors; scores unchanged; previously minor: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Type tool: kerning at a caret at the start of a line moves the character after it, #5111; scores and estimates unchanged; previously minor: Rulers: the zero point dragged out of the rulers' corner snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Envelopes: with Distort Appearance, type's strokes paint along the bent glyph outlines at their own weight, as users' `.ai` files draw them, which changes how VectorCraft's own envelopes of stroked type draw (#6644; scores and estimates unchanged); previously minor: G5: Energy Beams brush library; bundled content ~44% → ~46%; previously minor: G5: Skill Icons symbol library; bundled content ~42% → ~44%; previously minor: `.ai` and EPS import: an envelope saved in Edit Contents whose mesh lies away from its drawn art by a move opens live on that art (#6570; scores and estimates unchanged); previously minor: ruler double-click adds a guide at the pointer, #5239; G5: Status Effects graphic style library; bundled content ~40% → ~42%; MCP symbol libraries list UI Frames and Map Markers; previously minor: G5: Inventory Icons built-in symbol library; bundled content ~38% → ~40%; previously minor: `.ai` and EPS import: stroked type in an envelope maps from its glyphs grown by half its stroke (#3179; scores and estimates unchanged); previously minor: `.ai` and EPS import: warps of type open as mesh envelopes on their saved grid where VectorCraft's warp doesn't draw as their drawn art (#3179; scores and estimates unchanged); G5: Game Trails brush library; bundled content ~36% → ~38%; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: `.ai` and EPS import: envelopes of type open live where they draw as their drawn art and the layers with them draw as the page (#3179; scores and estimates unchanged); G5: Game HUD graphic style library; bundled content ~34% → ~36%; previously minor: Line Arrow arrowhead (#5421; scores and estimates unchanged); G5: Map Markers built-in symbol library; bundled content ~32% → ~34%; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Canvas: a 3D effect changed on type or a group redraws where its solid was; Fit to Artwork Bounds and per-artboard SVG export build each solid once for all artboards; previously minor: Effect Gallery: a thumbnail for each filter and a preview area inside the dialog, on an original drawing; Raster effects 52% → 55%, hours 1–2 → none; headline numbers unchanged; Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF editable import preserves authored ActualText once, including empty/nested spans and authored ordering (#6165); cross-line/style layout remains approximate; scores and estimates unchanged; PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; G5: UI Frames built-in symbol library with default 9-slice; bundled content ~32%; previously minor: G5: dynamic symbol part on-canvas opacity/blend/gradient/pattern; strokes remaining no longer lists Overlap/auto corners; symbols ~88%; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; previously minor: harakat paint fallback clarified; previously minor: current Guides feature-area rows consolidated using existing ruler evidence; scores and estimates unchanged; previously minor: Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; previously minor: G5 docs: Art brush Overlap and Pattern brush auto corners removed from strokes remaining; symbols remaining lists dynamic on-canvas beyond solid and guides outside the art; previously minor: custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: EPS import: embedded fonts (composite, Type 42, CID-keyed, Type 1, CFF FontSet) draw their glyphs; spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; `.ai`/EPS type keeps its tab stops, and right-aligned lines with tabs lay out as the file's page, #6147; `.ai`/EPS type from the text document lays its lines out closer to the file's page, within limits, #6137; `.ai` and EPS import: older Art brush objects read; numeric fields step on wheel hover without taking keyboard focus, and a panel wheel turn cannot seed a canvas zoom glide, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Tools stays beside the canvas with left-side panels; new gradients follow document color mode; Selection QoL: marquee modes and visible feedback, #5313; SVG CSS classes survive export and repeated import in all four styling modes (#2480); current-main integration retains event attributes and scripts; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; the canvas keeps selection outlines and anchors between frames; Indian-language hyphenation review and license allowlist, #4947; Stroke gradients: an arrowhead aligned to the tip is painted to the corners of its base, #5964; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Hindi catalog and contributor loanword preferences; full wording review in progress; Properties in Edit Artboards: a Transform section with the reference point above the Artboards section, #5219; the Control bar's Stroke: and Opacity: links scrub their fields, #4088; an image zoomed in on is separated, colorized or proofed only where it shows (#4155); a document's first frame renders on the render worker, so opening a heavy file no longer freezes the window, #4155; Control bar Paragraph section with type selected, #5372; translating unchanged type reuses its glyph and character-stroke outlines; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026; Units › East Asian Type acts, with Q and Ha units; scores unchanged) > > Tech Circuit update (2026-11-14): three original procedural brushes; ten built-in brush libraries (G5). > @@ -3135,11 +3131,8 @@ Edit › Copy and Cut put the selected ruler guides on the clipboard, with the s | Date | Change | Summary | |---|---|---| -<<<<<<< HEAD | 2026-11-19 | minor | Layers: a target circle whose item is targeted and has an appearance of its own keeps its inner ring visible around a smaller appearance dot, so the four looks (not targeted, targeted, with an appearance, both) differ (#8711). Scores and estimates unchanged. | -======= | 2026-11-19 | minor | Scissors previews its actual anchor or curve cut point with a native point marker while hovering, retaining existing snapping, Alt Add Anchor and cut behavior (#8655). Scores and estimates unchanged. | ->>>>>>> origin/main | 2026-11-19 | minor | Performance: In the web build, an edit while the view of a heavy document moves (a tool drag held at an edge of the canvas, #8551, or a wheel scroll during a drag) draws only the part it changed into the last frame, which stays drawn moved with the view, instead of rendering the whole canvas each frame, and edits that go on once the view is still don't put off its render (#8688). Evidence added; scores and estimates unchanged. | | 2026-11-19 | minor | Artboard tool: Shift held once a move or an Alt-drag copy of an artboard is under way keeps it to the level, upright or 45° line from General › Constrain Angle, and snaps slide it along that line; a Shift-press still draws an artboard inside another or marquee-selects (#2497), #8580. Scores and estimates unchanged. | | 2026-11-18 | minor | Layers panel: context menu on guide rows (Release Guide, Duplicate, Delete Guide, Lock/Unlock, Hide/Show) with one-step undo; regression tests in `crates/ui-egui/src/panels/layers/tests.rs`; scores and estimates unchanged. | diff --git a/docs/ui-parity.md b/docs/ui-parity.md index 350bd9312e..a08728470e 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -1,10 +1,6 @@ # UI and interaction parity -<<<<<<< HEAD -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-20 · **Change:** minor (Layers: a targeted item with an appearance of its own keeps its inner ring visible around a smaller appearance dot, so the target circle's four looks differ, #8711; scores and estimates unchanged; previously: Graphic Styles panel: right-click item context menu for tiles and rows with Options, Duplicate, Delete, Redefine, Break Link; scores and estimates unchanged; previously: Artboard tool: Shift held once a move or Alt-copy drag is under way keeps it to the level, upright or 45° line, #8580; scores and estimates unchanged; previously: Image Trace Ignore Color keeps the canvas View and stays armed on a missed pixel (#8068); Canvas context menu: a right-click on a path offers Simplify… next to Smooth…, opening the Simplify slider, or the Simplify dialog kept for next time, as Object › Path › Simplify… does, #8344; scores and estimates unchanged; previously: a tool drag held near an edge of the canvas scrolls the view, #8551; scores and estimates unchanged; previously: G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s, part of #5930; scores and estimates unchanged; previously: All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, and a hovered dimmed row takes the panel's darker fill so it stays readable, #8294; scores and estimates unchanged; previously: : selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: Layersselected Dimension extension-line color and weight in Properties (#7078; four focused UI regressions passed); scores and estimates unchanged; previously: Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); scores and estimates unchanged; previously: Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Layers panel: Alt over the list shows the copy cursor while rows or the selected-art square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar; previously minor: Ruler origin: the corner drag snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Outline view: images and gradient meshes are picked on what Outline draws, so a click inside them reaches the path behind, #6437; previously minor: a middle-click on a document tab closes it, #6506; previously minor: Blob Brush: a round tip's preview is the outline of the area it adds, round at both ends, as the stroke it commits (#4343); scores and estimates unchanged; previously:; ruler double-click adds a guide at the pointer, #5239; G5: Inventory Icons built-in symbol library (four built-ins); previously minor: files that record no units open in Preferences › Units › General, #5820; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Layers: Rename (`ui.rename`) opens the name field of the selected layer, group or object, #5324; Properties in Edit Artboards: Transform section above the Artboards section, #5219; scrubby labels: the Control bar's Stroke: and Opacity: links and the Properties panel's Stroke link scrub their fields, #4088; Properties: Quick Actions has Repeat Options for one selected repeat, #5181; Direct Selection: Shift-click picks several blend spine points, which drag together, #5285; Direct Selection: Cmd/Ctrl held lends the Selection tool and shows its bounding box, #3901; Join tool trims two crossing open paths and joins them at the crossing, #5844; Control bar: Paragraph: link and Align left/center/right while type is selected, #5372; shape tools: a press on the selection's centre point moves it and one in the rotate zone outside a box corner turns it, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; Units › East Asian Type acts, with Q and Ha units; scores unchanged) -======= -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (Scissors shows the actual proposed cut point while hovering, using its existing snapping and cut target (#8655); scores and estimates unchanged; previously: Graphic Styles panel: right-click item context menu for tiles and rows with Options, Duplicate, Delete, Redefine, Break Link; scores and estimates unchanged; previously: Artboard tool: Shift held once a move or Alt-copy drag is under way keeps it to the level, upright or 45° line, #8580; scores and estimates unchanged; previously: Image Trace Ignore Color keeps the canvas View and stays armed on a missed pixel (#8068); Canvas context menu: a right-click on a path offers Simplify… next to Smooth…, opening the Simplify slider, or the Simplify dialog kept for next time, as Object › Path › Simplify… does, #8344; scores and estimates unchanged; previously: a tool drag held near an edge of the canvas scrolls the view, #8551; scores and estimates unchanged; previously: G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s, part of #5930; scores and estimates unchanged; previously: All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, and a hovered dimmed row takes the panel's darker fill so it stays readable, #8294; scores and estimates unchanged; previously: : selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: Layersselected Dimension extension-line color and weight in Properties (#7078; four focused UI regressions passed); scores and estimates unchanged; previously: Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); scores and estimates unchanged; previously: Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Layers panel: Alt over the list shows the copy cursor while rows or the selected-art square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar; previously minor: Ruler origin: the corner drag snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Outline view: images and gradient meshes are picked on what Outline draws, so a click inside them reaches the path behind, #6437; previously minor: a middle-click on a document tab closes it, #6506; previously minor: Blob Brush: a round tip's preview is the outline of the area it adds, round at both ends, as the stroke it commits (#4343); scores and estimates unchanged; previously:; ruler double-click adds a guide at the pointer, #5239; G5: Inventory Icons built-in symbol library (four built-ins); previously minor: files that record no units open in Preferences › Units › General, #5820; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Layers: Rename (`ui.rename`) opens the name field of the selected layer, group or object, #5324; Properties in Edit Artboards: Transform section above the Artboards section, #5219; scrubby labels: the Control bar's Stroke: and Opacity: links and the Properties panel's Stroke link scrub their fields, #4088; Properties: Quick Actions has Repeat Options for one selected repeat, #5181; Direct Selection: Shift-click picks several blend spine points, which drag together, #5285; Direct Selection: Cmd/Ctrl held lends the Selection tool and shows its bounding box, #3901; Join tool trims two crossing open paths and joins them at the crossing, #5844; Control bar: Paragraph: link and Align left/center/right while type is selected, #5372; shape tools: a press on the selection's centre point moves it and one in the rotate zone outside a box corner turns it, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; Units › East Asian Type acts, with Q and Ha units; scores unchanged) ->>>>>>> origin/main +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-20 · **Change:** minor (Layers: a targeted item with an appearance of its own keeps its inner ring visible around a smaller appearance dot, so the target circle's four looks differ, #8711; scores and estimates unchanged; previously: Scissors shows the actual proposed cut point while hovering, using its existing snapping and cut target (#8655); scores and estimates unchanged; previously: Graphic Styles panel: right-click item context menu for tiles and rows with Options, Duplicate, Delete, Redefine, Break Link; scores and estimates unchanged; previously: Artboard tool: Shift held once a move or Alt-copy drag is under way keeps it to the level, upright or 45° line, #8580; scores and estimates unchanged; previously: Image Trace Ignore Color keeps the canvas View and stays armed on a missed pixel (#8068); Canvas context menu: a right-click on a path offers Simplify… next to Smooth…, opening the Simplify slider, or the Simplify dialog kept for next time, as Object › Path › Simplify… does, #8344; scores and estimates unchanged; previously: a tool drag held near an edge of the canvas scrolls the view, #8551; scores and estimates unchanged; previously: G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s, part of #5930; scores and estimates unchanged; previously: All Tools drawer: a tool the toolbar holds is dimmed in the readable dim text colour, not the disabled colour that was unreadable against the panel, and a hovered dimmed row takes the panel's darker fill so it stays readable, #8294; scores and estimates unchanged; previously: : selected guide rows stay highlighted after the pointer leaves (#7344); scores and estimates unchanged; previously: Layersselected Dimension extension-line color and weight in Properties (#7078; four focused UI regressions passed); scores and estimates unchanged; previously: Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); scores and estimates unchanged; previously: Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Layers panel: Alt over the list shows the copy cursor while rows or the selected-art square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar; previously minor: Ruler origin: the corner drag snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Outline view: images and gradient meshes are picked on what Outline draws, so a click inside them reaches the path behind, #6437; previously minor: a middle-click on a document tab closes it, #6506; previously minor: Blob Brush: a round tip's preview is the outline of the area it adds, round at both ends, as the stroke it commits (#4343); scores and estimates unchanged; previously:; ruler double-click adds a guide at the pointer, #5239; G5: Inventory Icons built-in symbol library (four built-ins); previously minor: files that record no units open in Preferences › Units › General, #5820; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; floating tab groups collapse into the side icon rail and opened rail panels fold back into it, #5925 in part; numeric fields step on wheel hover without taking keyboard focus, #5949; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen; Selection QoL: marquee modes and visible feedback, #5313; #3380 deletion-only review follow-up: independent survivors keep gradient placement, owned subpaths avoid discarded copies, and contracts/status/evidence are clarified; endpoint highlighting remains open; scores and estimates unchanged; Drop Shadow and glow dialogs: spinner arrows, #5367, #5368; Stroke Weight Up and Down shortcuts, #5797; Layers: Rename (`ui.rename`) opens the name field of the selected layer, group or object, #5324; Properties in Edit Artboards: Transform section above the Artboards section, #5219; scrubby labels: the Control bar's Stroke: and Opacity: links and the Properties panel's Stroke link scrub their fields, #4088; Properties: Quick Actions has Repeat Options for one selected repeat, #5181; Direct Selection: Shift-click picks several blend spine points, which drag together, #5285; Direct Selection: Cmd/Ctrl held lends the Selection tool and shows its bounding box, #3901; Join tool trims two crossing open paths and joins them at the crossing, #5844; Control bar: Paragraph: link and Align left/center/right while type is selected, #5372; shape tools: a press on the selection's centre point moves it and one in the rotate zone outside a box corner turns it, #5477; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; Units › East Asian Type acts, with Q and Ha units; scores unchanged) > > Tech Circuit update (2026-11-14): three original procedural brushes; ten built-in brush libraries (G5). > @@ -629,11 +625,8 @@ before release (#6373). [Paint faces and edges](https://helpx.adobe.com/illustra | Date | Change | Summary | |---|---|---| -<<<<<<< HEAD | 2026-11-19 | minor | Layers: a target circle whose item is targeted and has an appearance of its own keeps its inner ring visible, with a smaller appearance dot inside it and a gap between them, so not targeted, targeted, with an appearance and both look different, as the target icons in [Appearance attributes](https://helpx.adobe.com/illustrator/using/appearance-attributes.html) (Targeting items for appearance attributes) do. Before, the dot covered the ring and a targeted item with an appearance looked untargeted, #8711. Scores and estimates unchanged. | -======= | 2026-11-19 | minor | Scissors previews its actual anchor or curve cut point with a native point marker while hovering, retaining existing snapping, Alt Add Anchor and cut behavior (#8655). Scores and estimates unchanged. | ->>>>>>> origin/main | 2026-11-19 | minor | Artboard tool: Shift held once a move or an Alt-drag copy of an artboard is under way keeps it to the level, upright or 45° line from General › Constrain Angle, and snaps slide it along that line; a Shift-press still draws an artboard inside another or marquee-selects (#2497), #8580. Scores and estimates unchanged. | | 2026-11-19 | minor | Canvas context menu: a right-click on a path, a group of paths or a compound path offers Simplify… between Average… and Smooth…, in the Path menu's order, opening the Simplify slider at the Auto-Simplify level, or the Simplify dialog on its kept settings, as Object › Path › Simplify… does (#8344). Scores and estimates unchanged. | | 2026-11-19 | minor | G12: Place: show progress window with Cancel for slow placed files exceeding 0.4 s (part of #5930, `file.cancelPlace`); indeterminate moving bar, Cancel (Esc) leaves the document unmodified without undo steps; scores and estimates unchanged. | From 8d61d2bd34cb653dbf86d75d20c5be7c565d9cde Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Thu, 19 Nov 2026 13:58:12 -0800 Subject: [PATCH 43/49] Retype: a tracking that translucent glyphs cannot take no longer drops the tracked prefix already found A negative tracking candidate for glyphs that do not paint as one object returned the untracked line and discarded the best tracked reading found from an earlier seed. It now skips that candidate and tries the next. --- crates/engine/src/cmd/retype.rs | 2 +- crates/engine/src/cmd/retype_tests.rs | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/cmd/retype.rs b/crates/engine/src/cmd/retype.rs index 0e31d5632a..174d77c4a9 100644 --- a/crates/engine/src/cmd/retype.rs +++ b/crates/engine/src/cmd/retype.rs @@ -531,7 +531,7 @@ impl Line { continue; } if t < 0.0 && !paints_as_one(&self) { - return self; + continue; } let mut tracked = self.clone(); tracked.tracking = t; diff --git a/crates/engine/src/cmd/retype_tests.rs b/crates/engine/src/cmd/retype_tests.rs index 80361f1e0a..de2122fc09 100644 --- a/crates/engine/src/cmd/retype_tests.rs +++ b/crates/engine/src/cmd/retype_tests.rs @@ -1106,6 +1106,31 @@ fn tracking_near_a_whole_number_is_kept_as_measured_when_rounding_moves_glyphs() assert_same_places(&before, &text_of(&s, r["ids"][0].as_u64().unwrap())); } +#[test] +fn a_tracking_translucent_glyphs_cannot_take_keeps_the_tracking_that_fits() { + // The first three glyphs are tracked 50 and the last 150 further on. A tracking tighter than + // zero is not tried for glyphs that cannot be one object, and the tracked prefix is kept. + let mut s = session(); + let id = s.execute("text.create", &json!({"x": 40, "y": 100, "text": "MMMM", "size": 30})).unwrap()["id"].as_u64().unwrap(); + s.execute("text.setRangeStyle", &json!({"id": id, "start": 0, "end": 2, "tracking": 50})).unwrap(); + s.execute("text.setRangeStyle", &json!({"id": id, "start": 2, "end": 3, "tracking": 150})).unwrap(); + s.execute("select.set", &json!({"ids": [id]})).unwrap(); + let g = s.execute("type.createOutlines", &json!({})).unwrap()["ids"][0].as_u64().unwrap(); + let kids = children_of(&s, g); + s.edit("test", |d, _| { + for k in &kids { + d.node_mut(NodeId(*k)).unwrap().opacity = 0.5; + } + Ok(()) + }) + .unwrap(); + s.execute("select.set", &json!({"ids": [g]})).unwrap(); + let r = s.execute("type.retype", &json!({})).unwrap(); + let texts: Vec<&str> = r["texts"].as_array().unwrap().iter().map(|t| t.as_str().unwrap()).collect(); + assert_eq!(texts.concat(), "MMMM", "{r}"); + assert!(texts.iter().any(|t| t.len() > 1), "the tracked glyphs stay one object: {r}"); +} + #[test] fn overlapping_translucent_glyphs_are_not_tracked_into_one_object() { let mut s = session(); From 7c81cd7df8cec4e7a80087ad3e0c6d6392dd577a Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Thu, 19 Nov 2026 17:42:11 -0500 Subject: [PATCH 44/49] eps: document and test shared EPSI preview compatibility --- crates/eps/src/import/preview.rs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/crates/eps/src/import/preview.rs b/crates/eps/src/import/preview.rs index 9c87826e0d..36c0e5662c 100644 --- a/crates/eps/src/import/preview.rs +++ b/crates/eps/src/import/preview.rs @@ -86,8 +86,39 @@ fn metafile_doc(wmf: &[u8], frame: Rect) -> Option { /// The EPSI preview in `ps`'s comments (`%%BeginPreview: width height depth lines`, hex rows, /// 0 white and the largest value black). +/// The shared decoder intentionally tolerates blank preview lines and CR-only line endings; +/// unlike the former local parser, neither changes the decoded samples. fn epsi(ps: &[u8]) -> Option { let bitmap = craft_eps::epsi(ps)?; let rgba = bitmap.gray.into_iter().flat_map(|g| [g, g, g, 255]).collect(); image::RgbaImage::from_raw(bitmap.width, bitmap.height, rgba) } + +#[cfg(test)] +mod tests { + use super::epsi; + + #[test] + fn shared_epsi_depths_keep_row_padding_and_opaque_grayscale() { + for (depth, row, gray) in [(1, "40", [255, 0, 255]), (2, "18", [255, 170, 85]), (4, "05a0", [255, 170, 85]), (8, "0055aa", [255, 170, 85])] { + let source = format!("%%BeginPreview: 3 2 {depth} 2\n% {row}\n% {row}\n%%EndPreview\n"); + let image = epsi(source.as_bytes()).expect("ordinary EPSI preview"); + assert_eq!(image.dimensions(), (3, 2)); + let expected: Vec = gray.into_iter().cycle().take(6).flat_map(|g| [g, g, g, 255]).collect(); + assert_eq!(image.as_raw(), &expected, "depth {depth}"); + } + } + + #[test] + fn shared_epsi_intentionally_accepts_blank_and_cr_only_lines() { + let ordinary = "%%BeginPreview: 3 2 2 2\n% 18\n% e4\n%%EndPreview\n"; + let expected = epsi(ordinary.as_bytes()).expect("ordinary preview"); + for source in [ordinary.replace('\n', "\r"), ordinary.replace("% e4", "\n% e4")] { + let image = epsi(source.as_bytes()).expect("documented shared decoder tolerance"); + assert_eq!(image, expected); + } + let gray = [255, 170, 85, 0, 85, 170]; + let rgba: Vec = gray.into_iter().flat_map(|g| [g, g, g, 255]).collect(); + assert_eq!(expected.as_raw(), &rgba); + } +} From 54f58fff31946b8061f9fccd68c2d1e306d63ba0 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Thu, 19 Nov 2026 21:05:18 -0500 Subject: [PATCH 45/49] eps: cut over PostScript scanner (lex.rs) to craft-ps (#8793) * eps: cut over PostScript scanner (lex.rs) to craft-ps * chore: repin craft-ps to craft-libs main --- Cargo.lock | 14 +- Cargo.toml | 2 +- crates/eps/src/import/lex.rs | 304 ++++------------------------------- 3 files changed, 42 insertions(+), 278 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f6b5e507e6..c793b70f9d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1048,6 +1048,11 @@ dependencies = [ "thiserror 2.0.21", ] +[[package]] +name = "craft-eps" +version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=7258e42d8#7258e42d8dd909f2176fb08f09aae048611f3eaf" + [[package]] name = "craft-eps" version = "0.1.0" @@ -1248,10 +1253,15 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0#d7c9632bfb3040cf45db394e7500cc93c81c49e0" +source = "git+https://github.com/storytold/craft-libs?rev=7258e42d8#7258e42d8dd909f2176fb08f09aae048611f3eaf" dependencies = [ + "craft-eps 0.1.0 (git+https://github.com/storytold/craft-libs?rev=7258e42d8)", "flate2", "kurbo 0.13.1", + "miniz_oxide 0.8.9", + "pdf-writer", + "skrifa 0.47.0", + "weezl 0.1.12", ] [[package]] @@ -6866,7 +6876,7 @@ dependencies = [ name = "vectorcraft-eps" version = "0.24.1" dependencies = [ - "craft-eps", + "craft-eps 0.1.0 (git+https://github.com/storytold/craft-libs?rev=d7c9632bfb3040cf45db394e7500cc93c81c49e0)", "craft-image-codecs", "craft-pdf", "craft-ps", diff --git a/Cargo.toml b/Cargo.toml index 1a33442d15..d7d90bb1a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } -craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0", default-features = false, features = ["write"] } +craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "7258e42d8", default-features = false, features = ["read", "write"] } craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } diff --git a/crates/eps/src/import/lex.rs b/crates/eps/src/import/lex.rs index 0ce1707f61..4e7c2b2a19 100644 --- a/crates/eps/src/import/lex.rs +++ b/crates/eps/src/import/lex.rs @@ -1,293 +1,76 @@ //! The scanner: PostScript source into objects (numbers, names, strings, procedures), with the //! position the program's own data (`currentfile`) is read from. +//! +//! Backed by `craft_ps::read::lex`. use std::rc::Rc; -use super::obj::{Obj, PsError, Res}; -use crate::ps; +use craft_ps::read::lex::{LexError, Number, Token}; -/// Deepest procedure nesting the scanner reads. -const MAX_NESTING: usize = 256; +use super::obj::{Obj, PsError, Res}; + +pub(crate) use craft_ps::read::lex::{IMMEDIATE, find, hex_decode}; pub(crate) struct Lexer<'a> { - src: &'a [u8], - pos: usize, - /// The whitespace character that ended the last token is still unread (data the program - /// reads from itself starts after it). - fresh: bool, + inner: craft_ps::read::lex::Lexer<'a>, /// The last object read has immediately evaluated names (`//name`) in it, read as executable /// names starting with [`IMMEDIATE`] for the interpreter to replace by their values. pub immediate: bool, } -/// How an immediately evaluated name (`//name`) is read, until the interpreter replaces it. -pub(crate) const IMMEDIATE: &str = "//"; - -fn is_space(b: u8) -> bool { - matches!(b, b' ' | b'\t' | b'\r' | b'\n' | b'\x0c' | b'\0') -} - -fn is_delim(b: u8) -> bool { - matches!(b, b'(' | b')' | b'<' | b'>' | b'[' | b']' | b'{' | b'}' | b'/' | b'%') -} - -fn syntax(what: &str) -> Res { - Err(PsError::Ps("syntaxerror", what.to_string())) -} - impl<'a> Lexer<'a> { pub fn new(src: &'a [u8]) -> Self { - Self { src, pos: 0, fresh: false, immediate: false } + Self { inner: craft_ps::read::lex::Lexer::new(src), immediate: false } } /// What is left to read. pub fn rest(&self) -> &'a [u8] { - self.src.get(self.pos..).unwrap_or_default() + self.inner.rest() } /// What is left to read as data: after the whitespace that ended the last token (a CR LF /// pair counts as one). pub fn data(&mut self) -> &'a [u8] { - if std::mem::take(&mut self.fresh) { - match self.peek() { - Some(b'\r') => { - self.pos += 1; - if self.peek() == Some(b'\n') { - self.pos += 1; - } - } - Some(b) if is_space(b) => self.pos += 1, - _ => {} - } - } - self.rest() + self.inner.data() } /// Skip `n` bytes (the data a filter or `readstring` took). pub fn advance(&mut self, n: usize) { - self.fresh = false; - self.pos = self.pos.saturating_add(n).min(self.src.len()); - } - - fn peek(&self) -> Option { - self.src.get(self.pos).copied() - } - - fn skip_space(&mut self) { - while let Some(b) = self.peek() { - if is_space(b) { - self.pos += 1; - } else if b == b'%' { - while let Some(c) = self.peek() { - if c == b'\n' || c == b'\r' { - break; - } - self.pos += 1; - } - } else { - break; - } - } + self.inner.advance(n); } /// The next object at the top level (`None` at the end of the file). pub fn next(&mut self) -> Res> { - self.immediate = false; - let t = self.token(0); - self.fresh = true; - t - } - - fn token(&mut self, depth: usize) -> Res> { - self.skip_space(); - let Some(b) = self.peek() else { return Ok(None) }; - self.pos += 1; - Ok(Some(match b { - b'(' => Obj::string(self.string()?), - b'<' => match self.peek() { - Some(b'<') => { - self.pos += 1; - Obj::Exec(Rc::from("<<")) - } - Some(b'~') => { - self.pos += 1; - Obj::string(self.ascii85()?) - } - _ => Obj::string(self.hex()?), - }, - b'>' => { - if self.peek() != Some(b'>') { - return syntax(">"); - } - self.pos += 1; - Obj::Exec(Rc::from(">>")) - } - b'[' => Obj::Exec(Rc::from("[")), - b']' => Obj::Exec(Rc::from("]")), - b'{' => { - if depth >= MAX_NESTING { - return Err(PsError::Limit("procedures nested too deeply")); - } - let mut items = vec![]; - loop { - self.skip_space(); - match self.peek() { - None => return syntax("{"), - Some(b'}') => { - self.pos += 1; - break; - } - _ => match self.token(depth + 1)? { - Some(o) => items.push(o), - None => return syntax("{"), - }, - } - } - Obj::proc(items) - } - b'}' | b')' => return syntax(&char::from(b).to_string()), - b'/' => { - // `//name` stands for the name's value when it is read. - let immediate = self.peek() == Some(b'/'); - if immediate { - self.pos += 1; - self.immediate = true; - } - let name = self.word(); - if immediate { Obj::Exec(Rc::from(format!("{IMMEDIATE}{name}").as_str())) } else { Obj::Name(Rc::from(name.as_str())) } - } - _ => { - self.pos -= 1; - let w = self.word(); - number(&w).unwrap_or_else(|| Obj::Exec(Rc::from(w.as_str()))) - } - })) - } - - /// A regular token's characters. - fn word(&mut self) -> String { - let start = self.pos; - while let Some(b) = self.peek() { - if is_space(b) || is_delim(b) { - break; - } - self.pos += 1; - } - String::from_utf8_lossy(self.src.get(start..self.pos).unwrap_or_default()).into_owned() - } - - /// A literal string after its `(`. - fn string(&mut self) -> Res> { - let mut out = vec![]; - let mut depth = 0usize; - loop { - let Some(b) = self.peek() else { return syntax("(") }; - self.pos += 1; - match b { - b'(' => { - depth += 1; - out.push(b); - } - b')' if depth == 0 => return Ok(out), - b')' => { - depth -= 1; - out.push(b); - } - b'\\' => { - let Some(e) = self.peek() else { return syntax("(") }; - self.pos += 1; - match e { - b'n' => out.push(b'\n'), - b'r' => out.push(b'\r'), - b't' => out.push(b'\t'), - b'b' => out.push(8), - b'f' => out.push(12), - b'\r' => { - if self.peek() == Some(b'\n') { - self.pos += 1; - } - } - b'\n' => {} - b'0'..=b'7' => { - let mut v = u32::from(e - b'0'); - for _ in 0..2 { - match self.peek() { - Some(d @ b'0'..=b'7') => { - v = v * 8 + u32::from(d - b'0'); - self.pos += 1; - } - _ => break, - } - } - out.push((v & 0xff) as u8); - } - other => out.push(other), - } - } - _ => out.push(b), - } - } - } - - /// A hexadecimal string after its `<`. - fn hex(&mut self) -> Res> { - let end = self.rest().iter().position(|b| *b == b'>').ok_or(PsError::Ps("syntaxerror", "<".into()))?; - let body = self.rest().get(..end).unwrap_or_default(); - let out = hex_decode(body).ok_or(PsError::Ps("syntaxerror", "<".into()))?; - self.advance(end + 1); - Ok(out) - } - - /// An ASCII85 string after its `<~`. - fn ascii85(&mut self) -> Res> { - let end = find(self.rest(), b"~>").ok_or(PsError::Ps("syntaxerror", "<~".into()))?; - let text = String::from_utf8_lossy(self.rest().get(..end + 2).unwrap_or_default()).into_owned(); - self.advance(end + 2); - ps::ascii85_decode(&text).ok_or(PsError::Ps("syntaxerror", "<~".into())) + let res = self.inner.next().map(|opt| opt.map(into_obj)).map_err(into_err); + self.immediate = self.inner.immediate; + res } } -/// Where `needle` first starts in `hay`. -pub(crate) fn find(hay: &[u8], needle: &[u8]) -> Option { - if needle.is_empty() { - return Some(0); +fn into_err(err: LexError) -> PsError { + match err { + LexError::Syntax(what) => PsError::Ps("syntaxerror", what), + LexError::Limit(msg) => PsError::Limit(msg), } - memchr::memmem::find(hay, needle) } -/// Hexadecimal digits (whitespace ignored, an odd last digit padded with 0); `None` on others. -pub(crate) fn hex_decode(body: &[u8]) -> Option> { - // Callers pass an already-delimited body. Do not let the filter decoder's EOD - // handling silently accept a stray terminator or discard bytes after it. - if body.contains(&b'>') { - return None; +fn into_obj(tok: Token) -> Obj { + match tok { + Token::Int(i) => Obj::Int(i), + Token::Real(r) => Obj::Real(r), + Token::Name(n) => Obj::Name(Rc::from(n.as_str())), + Token::Exec(n) => Obj::Exec(Rc::from(n.as_str())), + Token::Str(s) => Obj::string(s), + Token::Proc(items) => Obj::proc(items.into_iter().map(into_obj).collect()), } - craft_stream_codecs::asciihex::decode(body, body.len().div_ceil(2)).ok() } /// A number token (`12`, `-3.5`, `.5`, `1e-3`, `16#ff`), or `None`. pub(crate) fn number(w: &str) -> Option { - let first = w.bytes().next()?; - if !(first.is_ascii_digit() || matches!(first, b'+' | b'-' | b'.')) { - return None; + match craft_ps::read::lex::number(w)? { + Number::Int(i) => Some(Obj::Int(i)), + Number::Real(r) => Some(Obj::Real(r)), } - if let Ok(i) = w.parse::() { - return Some(Obj::Int(i)); - } - if let Some((base, digits)) = w.split_once('#') { - let base: u32 = base.parse().ok().filter(|b| (2..=36).contains(b))?; - // `from_str_radix` accepts a leading sign; a PostScript radix number has digits only. - if digits.starts_with(['+', '-']) { - return None; - } - return i64::from_str_radix(digits, base).ok().map(Obj::Int); - } - // Rust reads `inf` and `nan`; PostScript doesn't. - if w.bytes().any(|b| b.is_ascii_alphabetic() && !matches!(b, b'e' | b'E')) { - return None; - } - let v: f64 = w.parse().ok()?; - v.is_finite().then_some(Obj::Real(v)) } #[cfg(test)] @@ -300,33 +83,4 @@ mod tests { assert!(number("16#-ff").is_none()); assert!(matches!(number("16#ff"), Some(Obj::Int(255)))); } - #[test] - fn shared_hex_decode_keeps_body_boundaries_and_odd_nibbles() { - assert_eq!(hex_decode(b" 4\t1\n4\r2\x0c4\0"), Some(vec![0x41, 0x42, 0x40])); - assert_eq!(hex_decode(b""), Some(vec![])); - for invalid in [b"41>42".as_slice(), b">", b"4g", b"4\x0b1", b"\xff"] { - assert_eq!(hex_decode(invalid), None); - } - // Every byte pairs with each possible nibble, including all whitespace - // and invalid-byte combinations; this is the former body-only contract. - for first in 0..=255u8 { - for second in 0..=255u8 { - let input = [first, second]; - let mut digits = Vec::new(); - let mut valid = true; - for b in input { - if is_space(b) { - continue; - } - match char::from(b).to_digit(16) { - Some(d) => digits.push(d as u8), - None => valid = false, - } - } - let expected = - if !valid { None } else { Some(digits.chunks(2).map(|pair| (pair[0] << 4) | pair.get(1).copied().unwrap_or(0)).collect()) }; - assert_eq!(hex_decode(&input), expected, "{input:?}"); - } - } - } } From 2848526796e197a27866e9c9d24ac773bffd3583 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Fri, 20 Nov 2026 02:32:03 -0500 Subject: [PATCH 46/49] fix: resolve two coverage test failures on main (#8813) - eps: restore linear-time memchr::memmem::find in lex::find so search_in_a_loop_runs_out_of_the_budget does not hit O(N*M) under craft_ps::read::lex::find. - ui-egui: wait for FontDb background scan and ensure >20 font families in menu_access_stationary_pointer_repeat_and_rerun_do_not_retarget_or_double_invoke so coverage/minimal runners do not race or fall short of 20 families. --- crates/eps/src/import/lex.rs | 10 +++++++++- crates/ui-egui/tests/menu_access_keys.rs | 9 +++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/crates/eps/src/import/lex.rs b/crates/eps/src/import/lex.rs index 4e7c2b2a19..b967f52676 100644 --- a/crates/eps/src/import/lex.rs +++ b/crates/eps/src/import/lex.rs @@ -9,7 +9,15 @@ use craft_ps::read::lex::{LexError, Number, Token}; use super::obj::{Obj, PsError, Res}; -pub(crate) use craft_ps::read::lex::{IMMEDIATE, find, hex_decode}; +pub(crate) use craft_ps::read::lex::{IMMEDIATE, hex_decode}; + +/// Where `needle` first starts in `hay` (uses `memmem` so large inputs stay linear-time). +pub(crate) fn find(hay: &[u8], needle: &[u8]) -> Option { + if needle.is_empty() { + return Some(0); + } + memchr::memmem::find(hay, needle) +} pub(crate) struct Lexer<'a> { inner: craft_ps::read::lex::Lexer<'a>, diff --git a/crates/ui-egui/tests/menu_access_keys.rs b/crates/ui-egui/tests/menu_access_keys.rs index 2389716d61..2d21b77d88 100644 --- a/crates/ui-egui/tests/menu_access_keys.rs +++ b/crates/ui-egui/tests/menu_access_keys.rs @@ -764,6 +764,15 @@ fn menu_access_stationary_pointer_repeat_and_rerun_do_not_retarget_or_double_inv assert_eq!(s.app.ui.view.rulers, !before, "one Text/Key pair invokes exactly once across passes"); s.end_access(); + // Wait for any background font scan and ensure > 20 families even on minimal runners. + let db = vectorcraft_text::FontDb::global(); + let _ = db.families(); + for i in 0..24 { + if db.menu_family_list_now().len() > 20 { + break; + } + db.add_font(vectorcraft_testkit::fonts::renamed(&format!("Menu Test Font {i:02}"))); + } let text = s.app.run("text.create", json!({"x": 250, "y": 200, "text": "Menu", "font": "Inter", "size": 12})).unwrap()["id"].clone(); s.app.run("select.set", json!({"ids": [text]})).unwrap(); let size = vec2(640.0, 420.0); From f987648e96b0238df46c6ec788de64863ff4f744 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Fri, 20 Nov 2026 03:01:58 -0500 Subject: [PATCH 47/49] eps: delegate scene-writer shading, image stream, and line style syntax to craft-ps (#8810) * eps: delegate scene-writer shading, image stream, and line style syntax to craft-ps * chore(eps): repin craft-ps to merged craft-libs main (cfcc86242) --- Cargo.lock | 6 ++-- Cargo.toml | 2 +- crates/eps/src/ai_ops.rs | 28 +++++---------- crates/eps/src/ps.rs | 31 ++++++++++++++++- crates/eps/src/scene.rs | 75 +++++++--------------------------------- 5 files changed, 54 insertions(+), 88 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c793b70f9d..7da3db5266 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1051,7 +1051,7 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=7258e42d8#7258e42d8dd909f2176fb08f09aae048611f3eaf" +source = "git+https://github.com/storytold/craft-libs?rev=cfcc86242d56fe68117cd5dc2e5dd3b7a0e5b0ec#cfcc86242d56fe68117cd5dc2e5dd3b7a0e5b0ec" [[package]] name = "craft-eps" @@ -1253,9 +1253,9 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=7258e42d8#7258e42d8dd909f2176fb08f09aae048611f3eaf" +source = "git+https://github.com/storytold/craft-libs?rev=cfcc86242d56fe68117cd5dc2e5dd3b7a0e5b0ec#cfcc86242d56fe68117cd5dc2e5dd3b7a0e5b0ec" dependencies = [ - "craft-eps 0.1.0 (git+https://github.com/storytold/craft-libs?rev=7258e42d8)", + "craft-eps 0.1.0 (git+https://github.com/storytold/craft-libs?rev=cfcc86242d56fe68117cd5dc2e5dd3b7a0e5b0ec)", "flate2", "kurbo 0.13.1", "miniz_oxide 0.8.9", diff --git a/Cargo.toml b/Cargo.toml index d7d90bb1a5..0279fa081a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } -craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "7258e42d8", default-features = false, features = ["read", "write"] } +craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "cfcc86242d56fe68117cd5dc2e5dd3b7a0e5b0ec", default-features = false, features = ["read", "write"] } craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "d7c9632bfb3040cf45db394e7500cc93c81c49e0" } diff --git a/crates/eps/src/ai_ops.rs b/crates/eps/src/ai_ops.rs index d74932e74a..9d0ff5ddc0 100644 --- a/crates/eps/src/ai_ops.rs +++ b/crates/eps/src/ai_ops.rs @@ -3,8 +3,6 @@ //! Format Specification, version 7.0, §5.3, §5.4 and §6), and the colors they write in place of //! the paint they can't hold. -use std::fmt::Write; - use vectorcraft_color::{Color, Gradient}; use vectorcraft_doc::{LAYER_COLORS, LayerColor, LineCap, LineJoin, StrokeLayer}; use vectorcraft_geom::{Affine, Anchor, AnchorKind, PathData, Point, Shape, SubPath}; @@ -184,25 +182,15 @@ pub(crate) fn window_samples(samples: &[u8], w: u32, channels: usize, [x0, y0, x /// The stroke's width, cap, join, miter limit and dashes: `w J j M d`. pub(crate) fn line_style(s: &mut String, st: &StrokeLayer) { let cap = match st.cap { - LineCap::Butt => 0, - LineCap::Round => 1, - LineCap::Square => 2, + LineCap::Butt => ps::LineCap::Butt, + LineCap::Round => ps::LineCap::Round, + LineCap::Square => ps::LineCap::Square, }; let join = match st.join { - LineJoin::Miter => 0, - LineJoin::Round => 1, - LineJoin::Bevel => 2, + LineJoin::Miter => ps::LineJoin::Miter, + LineJoin::Round => ps::LineJoin::Round, + LineJoin::Bevel => ps::LineJoin::Bevel, }; - ps::push_num(s, st.width); - let _ = write!(s, " w {cap} J {join} j "); - ps::push_num(s, if st.miter_limit.is_finite() { st.miter_limit.max(1.0) } else { 10.0 }); - s.push_str(" M ["); - let dash = st.dash.as_ref().filter(|d| d.is_dashed()); - if let Some(d) = dash { - ps::push_nums(s, &d.pattern); - s.pop(); - } - s.push_str("] "); - ps::push_num(s, dash.map_or(0.0, |d| d.offset)); - s.push_str(" d\n"); + let dash = st.dash.as_ref().filter(|d| d.is_dashed()).map(|d| (d.pattern.as_slice(), d.offset)); + ps::push_line_style(s, st.width, cap, join, st.miter_limit, dash); } diff --git a/crates/eps/src/ps.rs b/crates/eps/src/ps.rs index f43b08fcb7..a2b075df67 100644 --- a/crates/eps/src/ps.rs +++ b/crates/eps/src/ps.rs @@ -3,7 +3,10 @@ use vectorcraft_geom::{BezPath, FillRule}; -pub(crate) use craft_ps::write::{bytes, deflate, inflate, matrix, num, push_num, push_num_places, push_nums, string, written}; +pub(crate) use craft_ps::write::{ + LineCap, LineJoin, ShadingKind, bytes, deflate, inflate, matrix, num, push_image_array_ref, push_inline_image, push_line_style, push_num, + push_num_places, push_nums, push_reusable_image_ref, push_reusable_image_resource, push_shading, string, written, +}; /// The procedures the page uses, in `VCdict`. pub(crate) const PROLOG: &str = "/VCdict 64 dict def @@ -121,4 +124,30 @@ mod tests { assert_eq!(places(2.5, 7), "2.5"); assert_eq!(places(f64::NAN, 7), "0"); } + + #[test] + fn shared_scene_syntax_preserves_vc_names_and_shading() { + let mut line = String::new(); + super::push_line_style(&mut line, 3.0, super::LineCap::Square, super::LineJoin::Round, 4.0, Some((&[5.0, 1.5], 0.5))); + assert_eq!(line, "3 w 2 J 1 j 4 M [5 1.5] 0.5 d\n"); + + let mut shading = String::new(); + super::push_shading( + &mut shading, + super::ShadingKind::Axial, + "/DeviceCMYK", + &[0.0, 0.0, 100.0, 0.0], + 4, + &[(0.0, vec![0.0, 1.0, 1.0, 0.0]), (1.0, vec![1.0, 0.0, 1.0, 0.0])], + ); + assert!(shading.contains("/ShadingType 2 /ColorSpace /DeviceCMYK")); + assert!(shading.ends_with(">> shfill\n")); + + let mut inline = String::new(); + super::push_inline_image(&mut inline, "VCsrc", "", "<< /ImageType 1", "/FlateDecode", "image", "~>\n"); + assert_eq!( + inline, + "{ /VCsrc currentfile /ASCII85Decode filter def\n<< /ImageType 1\n/DataSource VCsrc /FlateDecode filter >> image\nVCsrc flushfile } exec\n~>\n" + ); + } } diff --git a/crates/eps/src/scene.rs b/crates/eps/src/scene.rs index 349bc2a16b..be26ba8c4f 100644 --- a/crates/eps/src/scene.rs +++ b/crates/eps/src/scene.rs @@ -50,8 +50,6 @@ const SPREAD_CAPPED: &str = "gradients that repeat or reflect are written with at most 256 runs of their stops (at most 16384 stops); they pad past those"; /// Wedges a conic gradient is written as: one a degree. const CONIC_WEDGE_COUNT: usize = 360; -/// Decimals of a smooth shading's stitching function bounds (stop offsets, 0 to 1). -const BOUNDS_PLACES: u32 = 7; /// The most colorants a DeviceN color space may have (PostScript's limit). const MAX_DEVICE_N: usize = 32; const MISSING_PATTERN: &str = "missing patterns are written as mid-grey"; @@ -63,8 +61,6 @@ const MAX_BODY: usize = 256 << 20; /// Most compressed bytes in one string of an image's samples at Level 2 (under PostScript's /// 65,535-byte string limit). const IMAGE_CHUNK: usize = 48 << 10; -/// The start of the procedure that reads an image's data from the lines after it. -const INLINE_SOURCE: &str = "{ /VCsrc currentfile /ASCII85Decode filter def\n"; /// An image as written: what sets up its color, its image dictionary and its compressed samples. /// Placed once, it is written where it is drawn, its data following the operators that read it. @@ -108,33 +104,20 @@ impl ImageCode { /// The operators and data that draw the image where it is placed. fn push_inline(&self, s: &mut String) { - s.push_str(&self.prelude); - s.push_str(INLINE_SOURCE); - s.push_str(&self.dict); - s.push_str(&self.inline_read()); - s.push_str(&self.ascii); - } - - /// The end of the procedure [`ImageCode::push_inline`] writes. The procedure is read whole - /// before it runs: the image data follows it, and flushing the ASCII85 filter afterwards reads - /// past its end marker. - fn inline_read(&self) -> String { - format!("\n/DataSource VCsrc {} filter >> {}\nVCsrc flushfile }} exec\n", self.filter, self.op) + ps::push_inline_image(s, "VCsrc", &self.prelude, &self.dict, self.filter, self.op, &self.ascii); } /// The operators that draw the image `VCim` holds, for an image placed more than once. fn reference(&self, i: usize, level: Level) -> String { + let mut s = String::new(); + let name = format!("VCim{i}"); match level { // The stream is read again from its start. - Level::Three => { - format!("{}VCim{i} resetfile\n{}\n/DataSource VCim{i} {} filter >> {}\n", self.prelude, self.dict, self.filter, self.op) - } + Level::Three => ps::push_reusable_image_ref(&mut s, &name, &self.prelude, &self.dict, self.filter, self.op), // A procedure gives the strings in turn, then an empty string: the end of the data. - Level::Two => format!( - "{}/VCi 0 def\n{}\n/DataSource {{VCi VCim{i} length lt {{VCim{i} VCi get /VCi VCi 1 add def}} {{()}} ifelse}} {} filter >> {}\n", - self.prelude, self.dict, self.filter, self.op - ), + Level::Two => ps::push_image_array_ref(&mut s, "VCi", &name, &self.prelude, &self.dict, self.filter, self.op), } + s } /// The setup's definition of `VCim`: the image's compressed samples, once. @@ -145,11 +128,7 @@ impl ImageCode { // The stream reads all of its data when it is made, so the data follows the // procedure that makes it. let intent = if self.op == "imagemask" { 1 } else { 0 }; - let _ = writeln!( - s, - "{{ /VCsrc currentfile /ASCII85Decode filter def\n/VCim{i} VCsrc << /Intent {intent} /AsyncRead false /CloseSource false >> /ReusableStreamDecode filter def\nVCsrc flushfile }} exec" - ); - s.push_str(&self.ascii); + ps::push_reusable_image_resource(&mut s, "VCsrc", &format!("VCim{i}"), intent, &self.ascii); } Level::Two => { let _ = writeln!(s, "/VCim{i} ["); @@ -1489,44 +1468,12 @@ impl<'a> Scene<'a> { /// A Level 3 smooth shading of `kind` (2 axial, 3 radial) at `coords`, extended both ways. fn shading(&mut self, kind: u8, space: &GradientSpace, coords: &[f64], stops: &[(f64, Vec)]) { - let n = space.n(); - let comps = |c: &[f32]| -> String { - let mut s = String::from("["); - push_nums(&mut s, &c.iter().take(n).map(|v| f64::from(*v)).collect::>()); - s.pop(); - s.push(']'); - s - }; - let segments: Vec<_> = stops.windows(2).filter(|w| w[1].0 > w[0].0).collect(); - let interp = |w: &&[(f64, Vec)]| format!("<< /FunctionType 2 /Domain [0 1] /C0 {} /C1 {} /N 1 >>", comps(&w[0].1), comps(&w[1].1)); - let function = match segments.as_slice() { - [one] => interp(one), - many => { - let mut f = String::from("<< /FunctionType 3 /Domain [0 1] /Functions [\n"); - for w in many { - f.push_str(&interp(w)); - f.push('\n'); - } - f.push_str("] /Bounds ["); - // Seven decimals: a gradient's stops repeated hundreds or thousands of times - // (`Gradient::padded_over`) keep their places in each run. - for w in many.iter().skip(1) { - ps::push_num_places(&mut f, w[0].0, BOUNDS_PLACES); - f.push(' '); - } - f.push_str("] /Encode ["); - f.push_str(&"0 1 ".repeat(many.len())); - f.push_str("] >>"); - f - } - }; + let kind = if kind == 3 { ps::ShadingKind::Radial } else { ps::ShadingKind::Axial }; let name = match space { GradientSpace::Process(s) => s.name(), GradientSpace::Inks(name, _) => name, }; - let _ = write!(self.body, "<< /ShadingType {kind} /ColorSpace {name} /Coords ["); - push_nums(&mut self.body, coords); - let _ = writeln!(self.body, "] /Extend [true true]\n/Function {function} >> shfill"); + ps::push_shading(&mut self.body, kind, name, coords, space.n(), stops); } /// The bands of each stretch between stops: how many, for colours `a` to `b` over `length` @@ -2090,7 +2037,9 @@ impl<'a> Scene<'a> { /// `data`, not yet placed. fn image_code(prelude: String, dict: String, filter: &'static str, op: &'static str, data: Vec) -> ImageCode { let mut code = ImageCode { prelude, dict, filter, op, ascii: ps::ascii85(&data), data, uses: 0, inline_len: 0, ref_len: 0 }; - code.inline_len = code.prelude.len() + INLINE_SOURCE.len() + code.dict.len() + code.inline_read().len() + code.ascii.len(); + let mut inline = String::new(); + ps::push_inline_image(&mut inline, "VCsrc", &code.prelude, &code.dict, code.filter, code.op, ""); + code.inline_len = inline.len() + code.ascii.len(); code } From 49be5fb8754b15894e5c60b30dbdf619215e1e67 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Thu, 19 Nov 2026 23:59:06 -0800 Subject: [PATCH 48/49] CI: the gate builds and runs the tests in five shards The gate's one job builds all 106 test binaries on a 4-CPU, 16 GB runner, and it is often stopped with exit code 143 ("The runner has received a shutdown signal") during that build. ci.yml now runs the gate as five legs: - Shards 1 to 4 run `cargo xtask ci shard`, which builds and runs the tests and doctests of its own crates: ui-egui, engine, the apps with mcp and xtask, and every other crate. - Shard 5 runs the other `cargo xtask ci` steps. - On pushes to main, a `cache warm` leg runs `cargo xtask ci warm`, which builds what every shard builds and saves the dependency cache. `gate (ubuntu-24.04)` passes only when all five legs passed. `cargo xtask ci` with no argument runs every step, as before. `cargo xtask shards` lists each shard's crates. It fails when a crate named in xtask/src/shards.rs is not a workspace member or is named twice, and when a crate builds with other features in its shard than in `cargo test --workspace`. Every shard runs it first. vectorcraft-affinity and vectorcraft-pdf now turn on `synth` and `read-count` in their own dev-dependencies, which vectorcraft-engine's dev-dependencies turned on before. Without that, 39 tests of affinity's `it` binary do not build in a shard without the engine. The gate also sets dev-debug "0" and dev-strip: true, so the workspace crates build without line tables and the test binaries without debug info or symbols. --- .github/workflows/ci.yml | 11 ++ Cargo.lock | 2 + crates/affinity/Cargo.toml | 3 + crates/pdf/Cargo.toml | 3 + xtask/src/main.rs | 188 ++++++++++++++++++++---- xtask/src/shards.rs | 294 +++++++++++++++++++++++++++++++++++++ 6 files changed, 471 insertions(+), 30 deletions(-) create mode 100644 xtask/src/shards.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b3b6bf5b8..773a82e145 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,17 @@ jobs: # Same craft-fonts commit as release.yml. craft-fonts-ref: b076417b5880bd4154bd22f00695b1d28c6bea83 timeout-minutes: 90 + # The workspace crates build without line tables, and the test binaries without debug info or + # symbols. A panic still names its file and line. + dev-debug: "0" + dev-strip: true + # Five legs instead of one: shards 1 to 4 each build and run the tests of their own crates, + # and shard 5 runs the other `cargo xtask ci` steps (xtask/src/shards.rs). `gate ()` + # passes only when all five did. On pushes to main, a `cache warm` leg builds what every + # shard builds and saves the dependency cache. + test-shards: 5 + shard-command: cargo xtask ci shard + warm-command: cargo xtask ci warm packages: >- pkg-config libxkbcommon-dev libwayland-dev libx11-dev libxcb1-dev libxcursor-dev libxrandr-dev libxi-dev libfontconfig1-dev libfreetype-dev mesa-vulkan-drivers diff --git a/Cargo.lock b/Cargo.lock index c793b70f9d..358891a86f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6683,6 +6683,7 @@ dependencies = [ "craft-image-codecs", "crc32fast", "proptest", + "vectorcraft-affinity", ] [[package]] @@ -7044,6 +7045,7 @@ dependencies = [ "vectorcraft-doc", "vectorcraft-effects", "vectorcraft-geom 0.24.1", + "vectorcraft-pdf", "vectorcraft-testkit", "vectorcraft-text", ] diff --git a/crates/affinity/Cargo.toml b/crates/affinity/Cargo.toml index 8e3bce12a9..92977884cf 100644 --- a/crates/affinity/Cargo.toml +++ b/crates/affinity/Cargo.toml @@ -21,3 +21,6 @@ proptest = { workspace = true } # The tests build containers and decode previews. crc32fast = { workspace = true } craft-image-codecs = { workspace = true } +# tests/it's `import_limits`, `outline_limits` and `text` modules need `synth`, also when this crate +# is tested without vectorcraft-engine (`cargo xtask ci shard`). +vectorcraft-affinity = { path = ".", features = ["synth"] } diff --git a/crates/pdf/Cargo.toml b/crates/pdf/Cargo.toml index 69bcf84f7f..f63a23a2ce 100644 --- a/crates/pdf/Cargo.toml +++ b/crates/pdf/Cargo.toml @@ -56,6 +56,9 @@ serde_json = { workspace = true } krilla = { workspace = true, features = ["simple-text"] } # How many times the symbol list is read to find symbols by name. vectorcraft-doc = { workspace = true, features = ["symbol-read-count"] } +# The counters vectorcraft-engine's tests turn on, also when this crate is tested without +# vectorcraft-engine (`cargo xtask ci shard`). +vectorcraft-pdf = { path = ".", features = ["read-count"] } # An independent raster oracle for gradient placement in PDF forms. These are test-only macOS # bindings; the exporter stays portable Rust and does not depend on an OS PDF renderer. diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 2c279e36aa..3c2a94c14d 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -13,6 +13,7 @@ mod layers; mod pdf_deps; mod pngsuite; mod sha256; +mod shards; mod stats; mod test262; mod ui_commands; @@ -37,6 +38,11 @@ commands: wasm cargo check --target wasm32-unknown-unknown for the wasm-safe crates and the web app test the workspace tests (cargo nextest when installed, else cargo test), then the doctests ci fmt --check, clippy -D warnings, test, doctests, no-bundled-fonts, pdf-deps, assets, brands, cursors (warnings only), ui-commands --check, layers, wasm (stops at first failure) + ci shard shard $GATE_SHARD of $GATE_SHARDS of ci (xtask/src/shards.rs): a test shard runs + the tests and doctests of its crates, the last shard the other steps + ci warm build what every shard builds, without running it (fills the gate's cache) + shards list the crates each shard tests; fails when a member is in no shard or in two, + or builds with other features in its shard than in the whole workspace corpus [--download] [--affinity] show where test corpora live; --download fetches PngSuite into corpus/pngsuite, --affinity the pinned public Affinity documents into corpus/affinity @@ -66,7 +72,10 @@ fn main() -> ExitCode { Some("pdf-deps") => pdf_deps::run(&root()), Some("wasm") => cmd_wasm(), Some("test") => cmd_test().and_then(|()| cmd_doctests()), + Some("ci") if rest.first() == Some(&"shard") => cmd_ci_shard(), + Some("ci") if rest.first() == Some(&"warm") => cmd_ci_warm(), Some("ci") => cmd_ci(), + Some("shards") => shards::run().map(drop), Some("corpus") if rest.contains(&"--affinity") => affinity_corpus::fetch(), Some("corpus") => cmd_corpus(rest.contains(&"--download")), Some("bundle") => bundle::run(&root()), @@ -246,30 +255,162 @@ fn has_nextest() -> bool { /// The workspace's unit and integration tests, without examples (clippy still checks those). /// nextest runs each test in its own process, in parallel across all test binaries. fn cmd_test() -> Result<(), String> { + test_packages(&["--workspace".to_owned()], "--workspace") +} + +/// [`cmd_test`] for the packages `select` picks (`--workspace` or `-p` ids), shown as `shown`. +fn test_packages(select: &[String], shown: &str) -> Result<(), String> { const TARGETS: [&str; 3] = ["--lib", "--bins", "--tests"]; let mut c = cargo(); if has_nextest() { - c.args(["nextest", "run", "--workspace"]).args(TARGETS); - run(c, "cargo nextest run --workspace --lib --bins --tests") + c.args(["nextest", "run"]).args(select).args(TARGETS); + run(c, &format!("cargo nextest run {shown} --lib --bins --tests")) } else { eprintln!("note: cargo-nextest is not installed; running cargo test (cargo install cargo-nextest for faster runs)"); - c.args(["test", "--workspace"]).args(TARGETS); - run(c, "cargo test --workspace --lib --bins --tests") + c.arg("test").args(select).args(TARGETS); + run(c, &format!("cargo test {shown} --lib --bins --tests")) } } /// The doctests, which nextest doesn't run. fn cmd_doctests() -> Result<(), String> { - let mut c = cargo(); - c.args(["test", "--workspace", "--doc"]); - run(c, "cargo test --workspace --doc") + doctest_packages(&["--workspace".to_owned()], "--workspace") } +/// [`cmd_doctests`] for the packages `select` picks, shown as `shown`. +fn doctest_packages(select: &[String], shown: &str) -> Result<(), String> { + let mut c = cargo(); + c.arg("test").args(select).arg("--doc"); + run(c, &format!("cargo test {shown} --doc")) +} + +/// One `cargo xtask ci` step: its name and what it runs. +type Step = (&'static str, Box Result<(), String>>); + +/// The `ci` steps that build and run tests of the whole workspace; `ci shard` runs them per shard. +const TEST_STEPS: [&str; 3] = ["test", "doctests", "i18n-report"]; + /// `cargo xtask ci`: each step in turn, stopping at the first that fails; the summary names the /// steps that passed and, after a failure, the one that failed and those skipped. fn cmd_ci() -> Result<(), String> { - type Step = (&'static str, Box Result<(), String>>); - let steps: Vec = vec![ + run_steps(&ci_steps()) +} + +/// `cargo xtask ci shard`: shard `GATE_SHARD` of `GATE_SHARDS` (1-based, as the shared gate +/// workflow sets them). A test shard runs the shard checks, then the tests and doctests of its +/// crates, and the i18n report where it tests vectorcraft-ui-egui. The checks shard runs every +/// other `ci` step and the shard checks. +fn cmd_ci_shard() -> Result<(), String> { + let number = |key: &str| -> Result { + let value = std::env::var(key).map_err(|_| format!("ci shard: {key} is not set (the gate workflow sets it)"))?; + value.trim().parse().map_err(|_| format!("ci shard: {key} is `{value}`, not a number")) + }; + let (shard, count) = (number("GATE_SHARD")?, number("GATE_SHARDS")?); + if count != shards::GROUPS.len() { + return Err(format!( + "ci shard: GATE_SHARDS is {count}, and xtask/src/shards.rs has {} shards (test-shards in .github/workflows/ci.yml)", + shards::GROUPS.len() + )); + } + if !(1..=count).contains(&shard) { + return Err(format!("ci shard: GATE_SHARD is {shard}, not 1 to {count}")); + } + let checked = shards::run()?; + let mut steps: Vec = Vec::new(); + match &checked[shard - 1] { + shards::Shard::Tests(crates) => { + let names = shards::names(crates); + eprintln!("ci shard {shard}/{count}: the tests of {names}"); + let select = shards::select(crates); + let shown = crates.iter().map(|m| format!("-p {}", m.name)).collect::>().join(" "); + let (s, w) = (select.clone(), shown.clone()); + steps.push(("test", Box::new(move || test_packages(&s, &w)))); + let (s, w) = (select.clone(), shown.clone()); + steps.push(("doctests", Box::new(move || doctest_packages(&s, &w)))); + if crates.iter().any(|m| m.name == "vectorcraft-ui-egui") { + steps.push(("i18n-report", Box::new(move || i18n_report_packages(&select, &shown)))); + } + } + shards::Shard::Checks => { + eprintln!("ci shard {shard}/{count}: the ci steps other than the tests"); + steps.extend(ci_steps().into_iter().filter(|(name, _)| !TEST_STEPS.contains(name))); + } + } + run_steps(&steps) +} + +/// `cargo xtask ci warm`: for each test shard, builds its crates' library and binary tests without +/// running them, then builds what the checks shard builds, so one dependency-cache entry holds the +/// dependencies of every shard with the features that shard builds them with (cargo resolves +/// features over the packages each command selects). The integration tests are left out: they +/// build no dependency that the library tests do not, since both take the crate's dev-dependencies. +fn cmd_ci_warm() -> Result<(), String> { + let checked = shards::run()?; + let mut steps: Vec = Vec::new(); + for shard in checked { + if let shards::Shard::Tests(crates) = shard { + steps.push(( + "build tests", + Box::new(move || { + let mut c = cargo(); + c.arg("test").args(shards::select(&crates)).args(["--lib", "--bins", "--no-run"]); + run(c, &format!("cargo test --lib --bins --no-run ({})", shards::names(&crates))) + }), + )); + } + } + steps.push(( + "clippy", + Box::new(|| { + let mut c = cargo(); + c.args(["clippy", "--workspace", "--all-targets", "--keep-going"]); + run(c, "cargo clippy --workspace --all-targets --keep-going") + }), + )); + steps.push(( + "no-bundled-fonts", + Box::new(|| { + let mut c = cargo(); + c.args(["test", "-p", "vectorcraft-text", "--no-default-features", "--test", "without_bundled_fonts", "--no-run"]); + run(c, "cargo test -p vectorcraft-text --no-default-features --test without_bundled_fonts --no-run")?; + let mut c = cargo(); + c.args(["clippy", "-p", "vectorcraft-ui-egui", "--no-default-features", "--all-targets"]); + run(c, "cargo clippy -p vectorcraft-ui-egui --no-default-features --all-targets")?; + let mut c = cargo(); + c.args(["test", "-p", "vectorcraft-ui-egui", "--no-default-features", "--test", "install_fonts", "--no-run"]); + run(c, "cargo test -p vectorcraft-ui-egui --no-default-features --test install_fonts --no-run") + }), + )); + steps.push(("wasm", Box::new(cmd_wasm))); + run_steps(&steps) +} + +/// Runs `steps` in turn, stopping at the first that fails; the summary names the steps that passed +/// and, after a failure, the one that failed and those skipped. +fn run_steps(steps: &[Step]) -> Result<(), String> { + let mut done = Vec::new(); + for (name, f) in steps { + eprintln!("\n=== ci: {name} ==="); + if let Err(e) = f() { + println!("\nCI summary:"); + for d in &done { + println!(" ok {d}"); + } + println!(" FAIL {name}: {e}"); + for (n, _) in steps.iter().skip(done.len() + 1) { + println!(" skip {n}"); + } + return Err(format!("ci failed at `{name}`")); + } + done.push(*name); + } + println!("\nCI summary: all {} steps passed ({})", done.len(), done.join(", ")); + Ok(()) +} + +/// Every `cargo xtask ci` step, in order. +fn ci_steps() -> Vec { + vec![ ( "fmt", Box::new(|| { @@ -316,25 +457,7 @@ fn cmd_ci() -> Result<(), String> { ("ui-commands", Box::new(|| ui_commands::run(&root(), true))), ("layers", Box::new(cmd_layers)), ("wasm", Box::new(cmd_wasm)), - ]; - let mut done = Vec::new(); - for (name, f) in &steps { - eprintln!("\n=== ci: {name} ==="); - if let Err(e) = f() { - println!("\nCI summary:"); - for d in &done { - println!(" ok {d}"); - } - println!(" FAIL {name}: {e}"); - for (n, _) in steps.iter().skip(done.len() + 1) { - println!(" skip {n}"); - } - return Err(format!("ci failed at `{name}`")); - } - done.push(*name); - } - println!("\nCI summary: all {} steps passed ({})", done.len(), done.join(", ")); - Ok(()) + ] } fn cmd_corpus(download: bool) -> Result<(), String> { @@ -379,7 +502,12 @@ fn cmd_i18n_report() -> Result<(), String> { /// differently and recompiled for about 3.5 minutes. Every other test binary runs with no test /// matching the filter. fn cmd_ci_i18n_report() -> Result<(), String> { + i18n_report_packages(&["--workspace".to_owned()], "--workspace") +} + +/// [`cmd_ci_i18n_report`] for the packages `select` picks (a `ci shard`'s), shown as `shown`. +fn i18n_report_packages(select: &[String], shown: &str) -> Result<(), String> { let mut c = cargo(); - c.args(["test", "--workspace", "--lib", "--bins", "--tests", "--", "i18n::tests::untranslated_report", "--exact", "--nocapture"]); - run(c, "cargo test --workspace --lib --bins --tests -- i18n::tests::untranslated_report --exact --nocapture") + c.arg("test").args(select).args(["--lib", "--bins", "--tests", "--", "i18n::tests::untranslated_report", "--exact", "--nocapture"]); + run(c, &format!("cargo test {shown} --lib --bins --tests -- i18n::tests::untranslated_report --exact --nocapture")) } diff --git a/xtask/src/shards.rs b/xtask/src/shards.rs new file mode 100644 index 0000000000..a885619b15 --- /dev/null +++ b/xtask/src/shards.rs @@ -0,0 +1,294 @@ +//! The gate's shards (`cargo xtask ci shard`, with `GATE_SHARD` of `GATE_SHARDS` set by the shared +//! gate workflow): which workspace crates each shard tests, and the checks that keep the split +//! complete. +//! +//! Each test shard builds and runs the tests of its own crates and what they depend on. The last +//! shard runs the `cargo xtask ci` steps that are not tests. [`GROUPS`] names the crates of the +//! first shards; every other workspace member goes to the [`Group::Rest`] shard, so a new crate is +//! tested without a change here. [`check`] fails when a named crate is not a workspace member or +//! is named twice, when a group is empty, and when a crate's features in its shard differ from +//! its features in `cargo test --workspace`. Cargo resolves features over the packages a command +//! selects, so a feature that only another crate's dev-dependencies turn on is off in a shard +//! without that crate, and the tests behind it do not build. + +use std::collections::{BTreeMap, BTreeSet}; + +use serde_json::Value; + +/// What one shard runs. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum Group { + /// The tests of these workspace crates (package names). + Crates(&'static [&'static str]), + /// The tests of every workspace member no other group names. + Rest, + /// The `cargo xtask ci` steps that are not tests. + Checks, +} + +/// The shards in order; `test-shards` in `.github/workflows/ci.yml` is its length. +pub const GROUPS: &[Group] = &[ + Group::Crates(&["vectorcraft-ui-egui"]), + Group::Crates(&["vectorcraft-engine"]), + Group::Crates(&["vectorcraft", "vectorcraft-web", "vectorcraft-cli", "vectorcraft-mcp", "xtask"]), + Group::Rest, + Group::Checks, +]; + +/// A workspace member, as `cargo metadata` gives it. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Member { + pub name: String, + /// The package id, which `-p` takes where the name would be ambiguous: craft-libs builds + /// against this repo's geom and pathops by git, so the graph holds a second copy of each. + pub id: String, + pub version: String, +} + +/// What one shard runs, with its crates resolved. +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum Shard { + Tests(Vec), + Checks, +} + +/// The workspace members of `cargo metadata --no-deps` output, in its order. +pub fn members(meta: &Value) -> Result, String> { + let ids: BTreeSet<&str> = meta["workspace_members"].as_array().into_iter().flatten().filter_map(Value::as_str).collect(); + let members: Vec = meta["packages"] + .as_array() + .into_iter() + .flatten() + .filter(|p| p["id"].as_str().is_some_and(|id| ids.contains(id))) + .map(|p| { + let field = |key: &str| p[key].as_str().map(str::to_owned).ok_or_else(|| format!("cargo metadata: a workspace package has no `{key}`")); + Ok(Member { name: field("name")?, id: field("id")?, version: field("version")? }) + }) + .collect::>()?; + if members.is_empty() { + return Err("cargo metadata lists no workspace members".into()); + } + Ok(members) +} + +/// Each group of `groups` with its crates: a named crate must be a workspace member and named +/// once, there must be exactly one [`Group::Rest`], and no test shard may be empty. +pub fn assign(groups: &[Group], members: &[Member]) -> Result, String> { + const WHERE: &str = "xtask/src/shards.rs › GROUPS"; + let mut named: BTreeMap<&str, usize> = BTreeMap::new(); + for (i, g) in groups.iter().enumerate() { + if let Group::Crates(names) = g { + if names.is_empty() { + return Err(format!("shard {} names no crates ({WHERE})", i + 1)); + } + for name in *names { + if !members.iter().any(|m| m.name == *name) { + return Err(format!("shard {} names `{name}`, which is not a workspace member ({WHERE})", i + 1)); + } + if let Some(first) = named.insert(name, i) { + return Err(format!("`{name}` is in shard {} and shard {} ({WHERE})", first + 1, i + 1)); + } + } + } + } + let rests = groups.iter().filter(|g| **g == Group::Rest).count(); + if rests != 1 { + return Err(format!("{rests} shards take the remaining crates, not 1 ({WHERE})")); + } + let pick = |f: &dyn Fn(&Member) -> bool| members.iter().filter(|m| f(m)).cloned().collect::>(); + groups + .iter() + .enumerate() + .map(|(i, g)| match g { + Group::Crates(names) => Ok(Shard::Tests(pick(&|m| names.contains(&m.name.as_str())))), + Group::Rest => { + let rest = pick(&|m| !named.contains_key(m.name.as_str())); + if rest.is_empty() { + return Err(format!("shard {} takes the remaining crates, and there are none ({WHERE})", i + 1)); + } + Ok(Shard::Tests(rest)) + } + Group::Checks => Ok(Shard::Checks), + }) + .collect() +} + +/// The features `cargo tree -e normal,dev,build --prefix none -f '{p}|{f}'` shows for each of +/// `members`, by name; a crate the tree holds twice (once for the host, say) has two entries. +/// Other copies of a member's name (craft-libs' git copies of geom and pathops) are not members. +pub fn tree_features(tree: &str, members: &[Member]) -> BTreeMap> { + let mut found: BTreeMap> = BTreeMap::new(); + for line in tree.lines() { + let line = line.trim_end(); + let line = line.strip_suffix(" (*)").unwrap_or(line); + let Some((package, features)) = line.split_once('|') else { continue }; + let Some(m) = + members.iter().find(|m| package.strip_prefix(&format!("{} v{} (", m.name, m.version)).is_some_and(|source| !source.contains("://"))) + else { + continue; + }; + let mut features: Vec<&str> = features.split(',').map(str::trim).filter(|f| !f.is_empty()).collect(); + features.sort_unstable(); + found.entry(m.name.clone()).or_default().insert(features.join(",")); + } + found +} + +/// One line for each crate of `shard` whose features in `alone` (the shard's tree) differ from +/// `workspace` (the whole workspace's tree). +pub fn feature_differences( + shard: usize, + crates: &[Member], + workspace: &BTreeMap>, + alone: &BTreeMap>, +) -> Vec { + let show = |set: Option<&BTreeSet>| match set { + None => "absent".to_owned(), + Some(set) => set.iter().map(|f| format!("[{f}]")).collect::>().join(" "), + }; + crates + .iter() + .filter(|m| workspace.get(&m.name) != alone.get(&m.name)) + .map(|m| { + format!("{}: features {} in shard {shard}, {} with the whole workspace", m.name, show(alone.get(&m.name)), show(workspace.get(&m.name))) + }) + .collect() +} + +/// `cargo tree` with the features of each package, for `select` (`--workspace` or `-p` ids). +fn tree(select: &[String]) -> Result { + let mut c = crate::cargo(); + // Without `--color never`, CARGO_TERM_COLOR=always (as the gate sets it) colors the ` (*)` marks. + c.args(["tree", "--color", "never", "-e", "normal,dev,build", "--prefix", "none", "-f", "{p}|{f}"]).args(select); + let out = c.output().map_err(|e| format!("cargo tree: failed to spawn: {e}"))?; + if !out.status.success() { + return Err(format!("cargo tree {}: exited with {}:\n{}", select.join(" "), out.status, String::from_utf8_lossy(&out.stderr))); + } + Ok(String::from_utf8_lossy(&out.stdout).into_owned()) +} + +/// `-p ` for each crate. +pub fn select(crates: &[Member]) -> Vec { + crates.iter().flat_map(|m| ["-p".to_owned(), m.id.clone()]).collect() +} + +/// The package names of `crates`, for messages. +pub fn names(crates: &[Member]) -> String { + crates.iter().map(|m| m.name.as_str()).collect::>().join(", ") +} + +/// The shards of this workspace, after the checks in [`assign`] and [`feature_differences`]. +pub fn check() -> Result, String> { + let members = members(&crate::metadata()?)?; + let shards = assign(GROUPS, &members)?; + let workspace = tree_features(&tree(&["--workspace".to_owned()])?, &members); + let mut differences = Vec::new(); + for (i, shard) in shards.iter().enumerate() { + if let Shard::Tests(crates) = shard { + let alone = tree_features(&tree(&select(crates))?, &members); + differences.extend(feature_differences(i + 1, crates, &workspace, &alone)); + } + } + if !differences.is_empty() { + return Err(format!( + "{} crate(s) build with other features in their shard than in `cargo test --workspace`, so some of their tests \ + would build differently or not at all (turn the feature on in the crate's own dev-dependencies, or move the crate \ + to the shard of the crate that turns it on):\n {}", + differences.len(), + differences.join("\n ") + )); + } + Ok(shards) +} + +/// `cargo xtask shards`: prints each shard's crates after [`check`], and returns the shards. +pub fn run() -> Result, String> { + let shards = check()?; + for (i, shard) in shards.iter().enumerate() { + match shard { + Shard::Tests(crates) => println!("shard {}/{}: tests of {} crate(s): {}", i + 1, shards.len(), crates.len(), names(crates)), + Shard::Checks => println!("shard {}/{}: the other ci steps", i + 1, shards.len()), + } + } + println!("OK: every workspace member is tested on one shard, with the features `cargo test --workspace` gives it."); + Ok(shards) +} + +#[cfg(test)] +mod tests { + use super::*; + + fn m(name: &str) -> Member { + Member { name: name.into(), id: format!("path+file:///w/{name}#0.1.0"), version: "0.1.0".into() } + } + + fn crates(shard: &Shard) -> Vec<&str> { + match shard { + Shard::Tests(c) => c.iter().map(|m| m.name.as_str()).collect(), + Shard::Checks => Vec::new(), + } + } + + #[test] + fn the_rest_shard_takes_every_crate_no_group_names() { + let ws = [m("a"), m("b"), m("c"), m("d")]; + let shards = assign(&[Group::Crates(&["c"]), Group::Rest, Group::Checks], &ws).unwrap(); + assert_eq!(shards.iter().map(crates).collect::>(), [vec!["c"], vec!["a", "b", "d"], vec![]]); + assert_eq!(shards[2], Shard::Checks); + } + + #[test] + fn a_crate_named_twice_or_unknown_fails() { + let ws = [m("a"), m("b")]; + let twice = assign(&[Group::Crates(&["a"]), Group::Crates(&["a"]), Group::Rest], &ws).unwrap_err(); + assert!(twice.contains("`a` is in shard 1 and shard 2"), "{twice}"); + let unknown = assign(&[Group::Crates(&["z"]), Group::Rest], &ws).unwrap_err(); + assert!(unknown.contains("`z`, which is not a workspace member"), "{unknown}"); + } + + #[test] + fn empty_groups_and_a_missing_or_second_rest_fail() { + let ws = [m("a"), m("b")]; + assert!(assign(&[Group::Crates(&[]), Group::Rest], &ws).unwrap_err().contains("names no crates")); + assert!(assign(&[Group::Crates(&["a", "b"]), Group::Rest], &ws).unwrap_err().contains("there are none")); + assert!(assign(&[Group::Crates(&["a"])], &ws).unwrap_err().contains("0 shards take the remaining crates")); + assert!(assign(&[Group::Rest, Group::Rest], &ws).unwrap_err().contains("2 shards take the remaining crates")); + } + + #[test] + fn every_workspace_member_is_tested_on_exactly_one_shard() { + let ws = members(&crate::metadata().unwrap()).unwrap(); + let shards = assign(GROUPS, &ws).unwrap(); + let mut tested: Vec<&str> = shards.iter().flat_map(crates).collect(); + tested.sort_unstable(); + let mut all: Vec<&str> = ws.iter().map(|m| m.name.as_str()).collect(); + all.sort_unstable(); + assert_eq!(tested, all); + assert_eq!(shards.iter().filter(|s| **s == Shard::Checks).count(), 1); + } + + #[test] + fn a_feature_only_another_shard_turns_on_is_a_difference() { + let ws = [m("lib"), m("geom")]; + let workspace = "\ +lib v0.1.0 (/w/lib)|default,synth +geom v0.1.0 (/w/geom)| +geom v0.18.0 (https://github.com/x/y?rev=1#1)|old +lib v0.1.0 (/w/lib)|default,synth (*) +"; + let alone = "\ +lib v0.1.0 (/w/lib)|default +geom v0.1.0 (/w/geom)| +"; + let workspace = tree_features(workspace, &ws); + assert_eq!(workspace["lib"], BTreeSet::from(["default,synth".to_owned()])); + assert_eq!(workspace["geom"], BTreeSet::from([String::new()])); + let alone = tree_features(alone, &ws); + assert_eq!(feature_differences(4, &ws, &workspace, &alone), ["lib: features [default] in shard 4, [default,synth] with the whole workspace"]); + assert!(feature_differences(4, &ws, &workspace, &workspace).is_empty()); + assert_eq!( + feature_differences(4, &[m("lib")], &workspace, &BTreeMap::new()), + ["lib: features absent in shard 4, [default,synth] with the whole workspace"] + ); + } +} From 291ea9fd00b8de32dd87d6fc3aa2de03e61993f1 Mon Sep 17 00:00:00 2001 From: FredApps <153173854+FredApps@users.noreply.github.com> Date: Fri, 20 Nov 2026 19:41:48 +0700 Subject: [PATCH 49/49] ci: build the gate's test binaries without debug info (#8829) Every gate since 20 Nov 00:38 UTC except one has been stopped mid-link with "The runner has received a shutdown signal" (exit 143), on main and on pull requests. Turn on the shared gate's dev-strip input, as photocraft does, so the ~100 test binaries link without line tables or symbols. Co-authored-by: FredApps Co-authored-by: Claude Opus 5.5 --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b3b6bf5b8..0c38980b72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,12 @@ jobs: # Same craft-fonts commit as release.yml. craft-fonts-ref: b076417b5880bd4154bd22f00695b1d28c6bea83 timeout-minutes: 90 + # The gate's test binaries carry no debug info and no symbols (CARGO_PROFILE_TEST_DEBUG=0, + # CARGO_PROFILE_TEST_STRIP=symbols), as photocraft's do: linking ~100 test binaries with line + # tables ran the hosted runner out of resources, and it stopped mid-link with "received a + # shutdown signal" (exit 143). Panics still name file and line; local builds keep Cargo.toml's + # line tables. + dev-strip: true packages: >- pkg-config libxkbcommon-dev libwayland-dev libx11-dev libxcb1-dev libxcursor-dev libxrandr-dev libxi-dev libfontconfig1-dev libfreetype-dev mesa-vulkan-drivers