mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-24 18:32:23 +00:00
Merge main into fix/live-paint-bucket-journal-replay
# Conflicts: # crates/engine/src/cmd/library.rs # crates/engine/src/cmd/swatchlib.rs # crates/engine/src/cmd/xform.rs
This commit is contained in:
@@ -19,7 +19,7 @@ nothing below L6 depends on a UI toolkit (egui, eframe, winit, rfd). Table: `xta
|
||||
|
||||
| Layer | Crates | Role |
|
||||
|---|---|---|
|
||||
| L0 | `geom`, `color`; `affinity`, `cdr` (standalone, no workspace deps) | curves and transforms (on `kurbo`), colour models, ICC and conversions; the Affinity and `.cdr`/`.cmx` readers |
|
||||
| L0 | `geom`, `color`; `affinity` (standalone, no workspace deps) | curves and transforms (on `kurbo`), colour models, ICC and conversions; the Affinity reader (CDR/CMX moved to `craft-cdr`) |
|
||||
| L1 | `doc` | the document model: artboards, layers, objects, appearance, text, symbols; pure data + serde, structural sharing |
|
||||
| L2 | `pathops`, `brush`, `trace`, `text`, `effects`, `plugins`, `three-d` | booleans/Shape Builder/offset/outline; brushes; Image Trace; fonts, shaping (HarfRust, skrifa), bidi and layout; live effects and the pixel-filter pipeline; sandboxed WebAssembly plug-ins (wasmi); 3D surfaces of revolution, projection and shading (`three-d`, on `geom` only) |
|
||||
| L3 | `render`, `svg`, `pdf`, `format`, `eps`, `cad`, `metafile` | document to pixels (`vello_cpu`, multithreaded); SVG, PDF, native JSON, EPS/PostScript (with its own interpreter), DXF, EMF/WMF readers and writers |
|
||||
|
||||
+5
-1
@@ -330,7 +330,11 @@ other `sv-*` locale resolve to it), Georgian (`ka`, complete; `ka-GE` and `ka_GE
|
||||
|
||||
## Cursors
|
||||
|
||||
`crates/tools/src/cursors.toml` lists every `Cursor` value: when it shows, in plain behaviour terms, and where its hotspot is, so whoever draws the cursors knows what each one is for without reading the tools (CLAUDE.md › Adding a cursor). `cargo xtask cursors` (part of `cargo xtask ci`) warns about a `Cursor` value with no entry, an entry with no `Cursor` value, a repeated id or a missing field; it never fails the build. A cursor not drawn yet borrows another's look (`Cursor::stand_in`).
|
||||
`crates/tools/src/cursors.toml` lists every `Cursor` value: when it shows, in plain behaviour terms, and where its hotspot is, so whoever draws the cursors knows what each one is for without reading the tools (see Adding a cursor below). `cargo xtask cursors` (part of `cargo xtask ci`) warns about a `Cursor` value with no entry, an entry with no `Cursor` value, a repeated id or a missing field; it never fails the build. A cursor not drawn yet borrows another's look (`Cursor::stand_in`).
|
||||
|
||||
### Adding a cursor
|
||||
|
||||
The app decides which cursors exist; whoever draws them works from the list. For a new tool state with a cursor of its own: add the `Cursor` variant (`crates/tools/src/lib.rs`, with a doc comment), return it from the tool's `cursor()` with a tool test, cover it in `cursor_icon` (`crates/ui-egui/src/canvas.rs`), draw it in `crates/ui-egui/src/cursors.rs` or give it a stand-in in `Cursor::stand_in()` until it is drawn, and add its `[[cursor]]` entry to `crates/tools/src/cursors.toml` (when it shows, in plain behaviour terms, and its hotspot). A missing entry only warns (`cargo xtask cursors`): the cursor still works.
|
||||
|
||||
## Vendor names gate
|
||||
|
||||
|
||||
+9
-3
@@ -31,7 +31,11 @@ The **Dimension Tool** is in the Modify section of the toolbar. Its strip offers
|
||||
anchor, guide, grid or pixel snapping places lands on the closest point of a segment, or of a
|
||||
line of a dimension already drawn, within 8 pixels. With Smart Guides and Anchor/Path Labels
|
||||
on, a point on an anchor or a line end shows the "anchor" label, and a point on a segment or
|
||||
line shows the "path" label. These rules apply to the Linear points.
|
||||
line shows the "path" label. These rules apply to the Linear points. A first point picked on
|
||||
an anchor, on a segment or on a corner of preview bounds moves with that art when the art moves
|
||||
before the second click: the rubber band, Shift and the dimension start from where the art puts
|
||||
the point then. When that art is deleted before the second click, the point goes back to where
|
||||
it was picked.
|
||||
With Use Preview Bounds on (Preferences › General), a Linear point can land on a corner of the
|
||||
preview bounds of a path or compound path whose strokes or effects reach past its anchors. The
|
||||
[linear dimensions help](https://helpx.adobe.com/illustrator/desktop/measure-and-align/plot-and-measure/plot-linear-dimensions-of-objects.html)
|
||||
@@ -74,8 +78,10 @@ The **Dimension Tool** is in the Modify section of the toolbar. Its strip offers
|
||||
tolerance of the level of a parallel line of a linear dimension already drawn has its line on
|
||||
that level. The other dimension, and every layer and group it is in, must be visible and
|
||||
unlocked. The tool reads at most 20,000 visible, unlocked layers, groups and objects, from the
|
||||
frontmost back, so in a larger document a dimension past them is not a level. This is
|
||||
VectorCraft's own rule. With
|
||||
frontmost back, so in a larger document a dimension past them is not a level. A line that
|
||||
moves off its level by more than 0.000001 pt across the span of both lines is not parallel. A
|
||||
level that would put the line more than 1,000,000 pt from its points is passed over, and the
|
||||
line goes where the pointer is. This is VectorCraft's own rule. With Smart Guides and
|
||||
Alignment Guides on, a guide runs along the level across both lines while the dimension is
|
||||
placed.
|
||||
- **Angular:** hover a corner where two straight segments meet and drag outwards. Or click two
|
||||
|
||||
@@ -335,8 +335,8 @@ Gradient meshes in the editing data keep each point's own color where a patch's
|
||||
| PICT | open, place (legacy) | yes (versions 1 and 2: shapes, lines, regions, text, bitmaps, pixel maps and QuickTime JPEG images; placed as one group clipped to the picture's frame) | no | `.pct`, `.pic` and `.pict`; a version 2 picture also opens by its content; a two-color pattern fills with its average color; inverted shapes, transfer modes other than a copy and QuickTime images in other formats come back as warnings; a picture cut short keeps what came before it; tests in `crates/metafile/src/tests/pict.rs`, `crates/engine/src/cmd/fileio/tests_pict.rs` and `crates/engine/tests/import_fuzz.rs` |
|
||||
| Pixar PXR | open, place (legacy) | yes (any set of the R, G, B and A channels in 8 or 12 bits, dumped or run-length encoded, in tiles; R alone is gray; alpha matted to black or unassociated) | no | recognized by its magic number; 12-bit samples are clamped to 0.0 to 1.0; null tiles are transparent with A and black without; the offsets aren't read, and the image takes the default resolution; a file cut short, with header values or packets the format doesn't define, or past the pixel allowance is refused with a message; tested on synthetic files only; tests in `crates/engine/src/cmd/fileio/tests_pxrread.rs` and `crates/engine/tests/import_fuzz.rs` |
|
||||
| FreeHand `.fh*` | open (legacy) | no | no | |
|
||||
| `.cdr` drawings | open | yes (versions 1 to 27, the `WL` files of versions 1 and 2 and the ZIP packages of versions 14 on included: pages, layers, guidelines, groups, clipping containers, curves, paths, rectangles, ellipses, arcs, polygons, uniform fills and outlines, from the object's style where it has none of its own; hidden and locked layers, groups and objects; the winding flag as the nonzero fill rule; uniform transparency of version 13 on as opacity and blend mode; text, bitmaps, blends, contours, brush strokes, fountain, pattern, texture and PostScript fills and arrowheads are left out with a warning, and lenses, other transparency and merge modes without a blend mode are not applied, with a warning; versions 1 and 2 open as one page and one layer without groups, arcs or pies; version 3 envelopes are not applied, so the objects and groups under one keep their outlines and matrices, with a warning; encrypted, ZIP64 and split packages are refused) | no | `.cdt` templates open as new untitled documents; File › Place reads both; after an open with a warning, an export or Save As to the drawing's own path needs `acknowledgeLoss: true`; record layouts and their sources in `crates/cdr/PROVENANCE.md`; synthetic test files only; tests in `crates/cdr/tests/it/read.rs`, `crates/engine/src/cmd/fileio/tests_cdr.rs` and `crates/engine/tests/import_fuzz.rs` |
|
||||
| `.cmx` exchange files | | yes (files with 32-bit coordinates: pages, layers, groups, curves, uniform fills and outlines with their width, color, caps, joins and dashes; text, images, rectangles, ellipses, clipping paths, other fills and arrowheads are left out with a warning, and lenses are not applied, with a warning; big-endian files and files with 16-bit coordinates are refused) | no | File › Place reads them too; after an open with a warning, an export or Save As to the file's own path needs `acknowledgeLoss: true`; layouts and their sources in `crates/cdr/PROVENANCE.md` (R53 to R63); synthetic test files only; tests in `crates/cdr/tests/it/cmx.rs`, `crates/engine/src/cmd/fileio/tests_cmx.rs` and `crates/engine/tests/import_fuzz.rs` |
|
||||
| `.cdr` drawings | open | yes (versions 1 to 27, the `WL` files of versions 1 and 2 and the ZIP packages of versions 14 on included: pages, layers, guidelines, groups, clipping containers, curves, paths, rectangles, ellipses, arcs, polygons, uniform fills and outlines, from the object's style where it has none of its own; hidden and locked layers, groups and objects; the winding flag as the nonzero fill rule; uniform transparency of version 13 on as opacity and blend mode; text, bitmaps, blends, contours, brush strokes, fountain, pattern, texture and PostScript fills and arrowheads are left out with a warning, and lenses, other transparency and merge modes without a blend mode are not applied, with a warning; versions 1 and 2 open as one page and one layer without groups, arcs or pies; version 3 envelopes are not applied, so the objects and groups under one keep their outlines and matrices, with a warning; encrypted, ZIP64 and split packages are refused) | no | `.cdt` templates open as new untitled documents; File › Place reads both; after an open with a warning, an export or Save As to the drawing's own path needs `acknowledgeLoss: true`; record layouts and their sources in `craft-cdr` (`storytold/craft-libs@9b28b56bc7`, `crates/cdr/PROVENANCE.md`); synthetic test files only; tests in `craft-cdr` `crates/cdr/tests/it/read.rs`, `crates/engine/src/cmd/fileio/tests_cdr.rs` and `crates/engine/tests/import_fuzz.rs` |
|
||||
| `.cmx` exchange files | | yes (files with 32-bit coordinates: pages, layers, groups, curves, uniform fills and outlines with their width, color, caps, joins and dashes; text, images, rectangles, ellipses, clipping paths, other fills and arrowheads are left out with a warning, and lenses are not applied, with a warning; big-endian files and files with 16-bit coordinates are refused) | no | File › Place reads them too; after an open with a warning, an export or Save As to the file's own path needs `acknowledgeLoss: true`; layouts and their sources in `craft-cdr` (`storytold/craft-libs@9b28b56bc7`, `crates/cdr/PROVENANCE.md`, R53 to R63); synthetic test files only; tests in `craft-cdr` `crates/cdr/tests/it/cmx.rs`, `crates/engine/src/cmd/fileio/tests_cmx.rs` and `crates/engine/tests/import_fuzz.rs` |
|
||||
| Text `.txt` | place, export | place (Text Import Options) | yes | place reads Unicode and ANSI, and Shift JIS, GB2312, Chinese Big 5, Cyrillic, GB18030, Greek, Turkish, Baltic and Central European through the WHATWG Encoding Standard's decoders (VectorCraft's own mapping); `tests/textimport.rs`, `place/text.rs`; fuzzed (`text_import_fuzz.rs`) |
|
||||
| RTF `.rtf` | place | place (area type with fonts, size, bold, italic, underline, strikethrough, caps, superscript and subscript, color, alignment, indents and paragraph spacing) | no | `tests/textimport.rs`, `place/rtf.rs`; fuzzed (`text_import_fuzz.rs`); `\'hh` bytes read as Windows-1252 or Mac Roman only |
|
||||
| Word `.docx` | place | place (area type with the document's styles and its fonts, size, bold, italic, underline, strikethrough, caps, superscript and subscript, color, alignment, indents and paragraph spacing) | no | `tests/textimport.rs`, `place/docx.rs`; fuzzed (`text_import_fuzz.rs`); list numbers, pictures and text boxes are left out |
|
||||
|
||||
+24
-3
File diff suppressed because one or more lines are too long
+218
-61
@@ -957,7 +957,8 @@ link, and `graphicStyle.apply` with `add` unlinks the group. With `appearance.tr
|
||||
target group's paths keeps its look on a move, and a `source` that is the group's only path is an error.
|
||||
`graphicStyle.redefine` gives the style to the paths directly in a series group linked to it, whether or not the group
|
||||
has rows of its own, links them, and clears and unlinks the group; the source and the paths linked to the style whose
|
||||
look was edited keep their look. Read as a source, by `graphicStyle.new`, `graphicStyle.redefine` or
|
||||
look was edited keep their look, and a path in the group linked to another style keeps its look and its link. Read as a
|
||||
source, by `graphicStyle.new`, `graphicStyle.redefine` or
|
||||
`appearance.transfer`, a series group that has no fill, stroke, effect, opacity, blend mode, isolation, knockout or
|
||||
style link of its own gives the look and the style link of the topmost path directly in it, and a move with
|
||||
`appearance.transfer` clears each of those paths; a series group that has one of them is read itself.
|
||||
@@ -1018,9 +1019,8 @@ as it is. When no object has one, `appearance.setItem` and `appearance.removeIte
|
||||
do for a row no object has, and the other commands are an error. The paint, stroke and gradient commands are also an
|
||||
error when the art's row is not the kind of row they edit, and `paint.editGradient`, `paint.setGradientGeom` and the
|
||||
`paint.freeform.*` commands without `stroke` edit the kind of the art's row. `appearance.moveItem`, `effect.move` and
|
||||
`appearance.duplicateItem` with `to` are an error when the art's stack differs from the other objects', and
|
||||
`appearance.duplicateItem` with `to` is also an error when two or more other objects are given, as it is without the
|
||||
art. To change the art, edit the design with `graph.design`.
|
||||
`appearance.duplicateItem` with `to` are an error when the art's stack differs from the other objects'. To change the
|
||||
art, edit the design with `graph.design`.
|
||||
|
||||
The graph also stores a paint or stroke weight that one of these commands changes on the topmost visible fill or stroke
|
||||
of a path directly in a series: a weight set with `stroke.set`, `stroke.weightUp` or `stroke.weightDown`; a gradient
|
||||
@@ -2349,7 +2349,7 @@ The transform, Align, Object Properties and Live Shape Properties commands refus
|
||||
that is not true or false with `` `strokes` must be true or false ``, naming the key, and leave the document and its
|
||||
undo history as they were: the options `copy`, `strokes`, `corners`, `patterns`, `objects` and `typeAreas` in
|
||||
`object.transform`, `object.move`, `object.nudge`, `object.rotate`, `object.scale`, `object.reflect`, `object.shear`,
|
||||
`object.transformAgain` and `object.setBounds`; `anchors` and `releaseOutside` in `object.transform`; `big` in `object.nudge`;
|
||||
`object.transformAgain` and `object.setBounds`; `anchors`, `releaseOutside` and `drawBehind` in `object.transform`; `big` in `object.nudge`;
|
||||
`absolute` in `object.rotate`; `proportional` in `object.setBounds`; `patterns` in `object.align`, `object.distribute`
|
||||
and `object.distributeSpacing`; `visible`, `locked`, `isolate` and `knockoutShape` in `object.setProps`; and
|
||||
`invertPie`, `makeSidesEqual` and `relativeRadii` in `object.setLiveShape`. A null is read as a key left out.
|
||||
@@ -2412,6 +2412,9 @@ and `amount` in `color.harmony`; `angle` in `paint.editGradient` and in the `gra
|
||||
`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 ``.
|
||||
`shape.flare` takes the rings' end point as both `x2` and `y2` or neither: given only one of them, with the other left
|
||||
out or null, it answers `` missing number `y2` `` (or `` missing number `x2` ``), draws nothing and adds no undo step.
|
||||
With neither, `pathLength` and `direction` place the end point.
|
||||
|
||||
The Edit, document, guide and slice commands also check the type of each param and change nothing when one is
|
||||
wrong. A value that is not a number gets `` `dx` must be a number, not "10" ``: `dx` and `dy` in `edit.duplicate`,
|
||||
@@ -2556,10 +2559,11 @@ control character, in the first 8 KiB) or `tooLarge` (over 8 MiB). For a script,
|
||||
- `menuCommands.strings` lists the string literals the script passes to `executeMenuCommand`
|
||||
(`app.executeMenuCommand('…')`), each with a count and its lines, and `menuCommands.dynamic` counts the calls
|
||||
whose argument isn't a string literal.
|
||||
- `outside` lists what the script does outside the document: `filesWritten` (with the open modes used),
|
||||
`filesOpened` (files opened in other apps), `network`, `nativeCode`, `otherApps` (messages to other apps),
|
||||
`environment` (environment variables), `unseenCode` (`eval`, `new Function` and `$.evalFile`) and
|
||||
`preferences` (the reference app's preferences changed).
|
||||
- `outside` lists what the script does outside the document: `filesWritten` (with the open modes used; setting a
|
||||
File object's `length`, `hidden` or `readonly` counts too, on any object that may be a File object; only
|
||||
`new Folder(…)` and the `Folder` places such as `Folder.temp`, other than `Folder.current`, are left out), `filesOpened` (files opened in other apps), `network`,
|
||||
`nativeCode`, `otherApps` (messages to other apps), `environment` (environment variables), `unseenCode` (`eval`,
|
||||
`new Function` and `$.evalFile`) and `preferences` (the reference app's preferences changed).
|
||||
- `problems` lists what would stop the script loading as written (strings, comments, regular expressions,
|
||||
template literals and XML literals that aren't closed, brackets that don't match, syntax newer than ES3 and
|
||||
unknown directives) and notes on its text (bytes that aren't valid UTF-8, mixed line endings, and nesting deeper
|
||||
@@ -2934,9 +2938,19 @@ VectorCraft reads files by these rules of its own:
|
||||
folder gives `null` with `Script folder mask takes too many steps to match`.
|
||||
- A path longer than 32,767 characters throws a `RangeError` (`Script file path exceeds 32,767 characters`) when a
|
||||
`File` or `Folder` is made from it.
|
||||
- `createAlias` returns `false` with `Script files cannot make aliases`, setting `hidden` sets `error` to `Script
|
||||
file hidden setting cannot be changed` and changes nothing, and `execute` opens nothing and returns `false`. In the
|
||||
web build every lookup fails with `Script file access is unavailable on the web`.
|
||||
- On Unix a file is hidden when its name starts with a dot. Setting `hidden` renames the file in its folder with one
|
||||
dot added, or with its leading dots taken off, under the rules for `rename`, and the object takes the new path,
|
||||
where a file it has open stays open; a
|
||||
file already as asked keeps its name, and a name of dots alone or a folder gives `false` with `error` set.
|
||||
`createAlias(target)` makes a symbolic link at the object's path to a file, a path or a `File`, and returns `true`;
|
||||
the link leads to the file's real path. On Windows setting `hidden` sets `error` to `Script file hidden setting
|
||||
cannot be changed`, `createAlias` returns `false` with `Script files cannot make aliases`, and neither changes
|
||||
anything. `execute` opens nothing and returns `false`. In the web build every lookup fails with `Script file access
|
||||
is unavailable on the web`.
|
||||
- `alias` is true for a link and `resolve()` gives the file it leads to, and reading or writing through the link reads
|
||||
or writes that file. `hidden` tells whether the link's own name is hidden, and setting `hidden`, `rename` and
|
||||
`remove` change the link and not the file it leads to, as the help page describes
|
||||
(<https://extendscript.docsforadobe.dev/file-system-access/using-file-and-folder-objects/>).
|
||||
|
||||
The help page's writing members work as it describes
|
||||
(<https://extendscript.docsforadobe.dev/file-system-access/file-object/>,
|
||||
@@ -2980,6 +2994,14 @@ VectorCraft writes files by these rules of its own:
|
||||
been made, apart from the script's own `Folder.userData`, and a folder that holds it cannot be renamed. Anything
|
||||
else gives `false` with
|
||||
`Script file access denied`.
|
||||
- Setting `hidden` needs both the old and the new name to be places the script may write. `createAlias` needs the
|
||||
link's place to be one the script may write where nothing is, not even a link that leads nowhere (`Script file
|
||||
name is already in use`), and the file it leads to to be one the script may read, never a folder (`Script file is
|
||||
not a regular file`) or a file that is not there (`Script file does not exist`). A link is looked up again each
|
||||
time it is used: one that leads out of the script's places afterward is refused like any other path, and writing
|
||||
through a link needs the file it leads to to be a place the script may write. When a folder above the link's place
|
||||
is replaced by a link while the alias is made, the new link is removed again and `createAlias` gives `Script file
|
||||
access denied`.
|
||||
- What a script writes is written when it closes the file or when the run ends, also when the run fails. At the
|
||||
run's end the files left open are written in the order they were opened. A file
|
||||
that `close` could not write stays open, so a later `close` tries again, and is written again when the run ends; a
|
||||
@@ -3885,7 +3907,10 @@ already walks Image Trace. Short agent entry points:
|
||||
art, where it is, snaps the art again after it is edited, and does not count
|
||||
instances in `select.object.notAlignedToPixelGrid`; `alignToPixelGrid` alone with the value the symbol already has
|
||||
adds no undo step),
|
||||
`symbol.place {name?, x?, y?}`, `symbol.placeFromDocument {sourceDocument, name, x?, y?}` (an instance of a symbol
|
||||
`symbol.place {name?, x?, y?}` (on top of the current layer; in Draw Behind directly below the bottommost selected
|
||||
object, beside the compound path that holds it, or at the bottom of the current layer with nothing selected, above
|
||||
a clipping path; `symbol.placeFromDocument` and `symbol.addFromLibrary` with `place` stack the instance the same
|
||||
way), `symbol.placeFromDocument {sourceDocument, name, x?, y?}` (an instance of a symbol
|
||||
of another open document, as a symbol dragged from that document's Symbols panel onto the canvas places it: the
|
||||
symbol, the symbols it nests and the resources they use are added as `edit.dropSelection` adds them, in the same
|
||||
undo step, and a symbol with the same name but other art or Symbol Options is added under a free name; an error
|
||||
@@ -4859,7 +4884,9 @@ already walks Image Trace. Short agent entry points:
|
||||
`tool.setOption {tool: "eyedropper", values: {stop: "livePaintBucket"}}`): the stop
|
||||
stays selected, and the click's `paint.sampleColor {color, stop}` recolors that stop of the bucket's gradient and
|
||||
leaves the selection's paint as it is. Once that stop is no longer selected (a Cmd/Ctrl-click selected another
|
||||
object), the next click ends the pick without sampling and switches back to the bucket.
|
||||
object), the next click ends the pick without sampling and switches back to the bucket. The bucket's colors have no
|
||||
freeform points: `paint.freeform.get`, and `paint.freeform.selectPoint` with an `index`, report an error, and so do
|
||||
the other `paint.freeform` commands without `ids`, `id` or `item`, which then leave the selection's gradient as it is.
|
||||
With the Live Paint Bucket selected and no drag in progress, Left and Right without Shift, Alt or Cmd/Ctrl (which
|
||||
keep their shortcuts) run `paint.setFill {swatch, ids: []}` (or
|
||||
`paint.setStroke` when the Stroke proxy is in front) with the color swatch before or after the active paint in the
|
||||
@@ -5153,7 +5180,7 @@ art", and a loaded file draws the source path, as it does for a solid past its l
|
||||
documentation names the controls and their ranges
|
||||
([3D and Materials panel options](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/create-3d-graphics/3d-materials-panel-options.html)).
|
||||
The settings are saved in the native file; SVG and PDF exports draw the shadow, and `effect.expandAppearance` keeps
|
||||
it as a path. Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic) have no shadow. See [three-d.md](three-d.md#shadows).
|
||||
a hard shadow as a path and turns a blurred one into an image. Extrude & Bevel (Classic), Revolve (Classic) and Rotate (Classic) have no shadow. See [three-d.md](three-d.md#shadows).
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"effect.setParams","params":{"index":0,"item":null,"params":{"shadow":true,"shadowPosition":"below","shadowDistance":10,"shadowBounds":150}}}}
|
||||
@@ -5708,11 +5735,15 @@ fills and strokes above it paint over the members (characters), those below unde
|
||||
`appearance.contents_index`. The `appearance.*`, `effect.*` and `graphicStyle.apply` commands edit the selected
|
||||
objects themselves (a group's own stack; layers through `ids`) or, with `target: "contents"`, the objects inside the
|
||||
groups and layers. In a Live Paint group those are its faces and edges, not its hidden source paths.
|
||||
`appearance.addFill` adds a fill to the faces only, and `appearance.addStroke` adds a stroke to the edges only; a selected group left with only its hidden source paths is returned without a change. A
|
||||
`appearance.addFill` adds a fill to the faces only, and `appearance.addStroke` adds a stroke to the edges only. On a
|
||||
selected group left with only its hidden source paths, either command changes nothing. A
|
||||
fill or stroke command with an `item` and `target: "contents"` (such as `paint.setFill`, `stroke.set`,
|
||||
`paint.invert`, `paint.setGradientGeom` and `object.setOverprint`) changes the faces for a fill row and the edges for
|
||||
a stroke row. The row commands (`appearance.setItem`, `appearance.removeItem` and the others) find their rows on each
|
||||
face and edge as on any other object in the contents.
|
||||
face and edge as on any other object in the contents. `graphicStyle.apply` gives each face only the style's fills and
|
||||
each edge only its strokes, with or without `add`, and links neither to the style. `appearance.clear` leaves a face
|
||||
one empty fill and an edge one empty stroke, and `appearance.reduceToBasic` keeps only a face's fill and only an
|
||||
edge's stroke.
|
||||
`appearance.targetContents` selects a group's members (double-clicking the Contents row).
|
||||
SVG and PDF export bake a group's own fills, strokes and geometry effects into paths; its raster effects stay a
|
||||
filter on the whole group in SVG and become an image of the whole group in PDF.
|
||||
@@ -5808,7 +5839,21 @@ From a document, such as a `.ai` or `.eps` swatch library, it reads the colors,
|
||||
in the document's order and color groups; `swatch.library.add` brings a pattern swatch's pattern, with its tile and
|
||||
art, into the document as a pattern swatch under the library swatch's name and in its color group. A global or spot
|
||||
color the pattern's art links to keeps the library's color: when the document gives its name another color, it comes
|
||||
in under a numbered name ("Ink 2") and the pattern links to that. A document with
|
||||
in under a numbered name ("Ink 2") and the pattern links to that. That numbered name skips the names the library
|
||||
gives its other swatches. A library color whose name the document gives
|
||||
another color is the document's numbered copy of the same color when it has one, so adding the pattern and its color
|
||||
again adds nothing. A pattern the document already holds with its art linked to the document's own color of that name
|
||||
is used as it is. A library tint or gradient whose global or spot color comes in under a numbered name, or is in the
|
||||
document as such a numbered copy, links to that copy, whether the color is picked before or after it, was added
|
||||
earlier or came with a pattern's art. A library global color is not the document's process color of the same name and
|
||||
paint: it comes in numbered. A global or spot color that a library tint or gradient links to and the document lacks
|
||||
comes in with the tint or gradient, under a numbered name when the document gives its name another swatch. The
|
||||
document's tint or gradient of the library one's name is that swatch when it links to the copy of the color that the
|
||||
art of a pattern picked with it takes; a numbered copy that the library also names stands for that library swatch
|
||||
otherwise. When the document's tint or gradient links to a color the document no longer has (deleted without
|
||||
unlinking), that color comes back under its own name. A pattern is found again when it was pasted with Add or Merge for all of its colors; one pasted
|
||||
with Merge for some colors and Add for others is added again as a copy. `added` lists the colors the pattern's art, a
|
||||
tint or a gradient brings too. A document with
|
||||
no swatches, and a `.ai`, `.eps` or PostScript file whose swatches are only the default ones, are refused with
|
||||
"`<file>` has no swatches of its own", unless the document has graph designs: it then loads with no swatches. The
|
||||
Swatch Libraries filter of Other Library… lists `.ai`, `.ait` and `.eps` (`.epsf`) files as well as the library files.
|
||||
@@ -6021,8 +6066,11 @@ swatch, else `Gradient`; `library.use` paints the selection's fill or stroke wit
|
||||
(else the default one, or the pattern swatch `swatch`) with the images, symbols, patterns, swatches, styles and brushes
|
||||
its art uses, and a thumbnail of one swatch's worth of it; `library.use` adds the pattern and its swatch to the document (the
|
||||
same pattern there is reused, and a name the document gives another pattern gets a number) and paints the selection's
|
||||
fill or stroke with it, as one undo step, and returns the pattern's name in the document as `pattern`. `library.get`
|
||||
lists them as `gradients: [{name, gradient}]` and `patterns: [{name, pattern, thumbnail}]`.
|
||||
fill or stroke with it, as one undo step, and returns the pattern's name in the document as `pattern`. A global or spot
|
||||
color the pattern's art links to keeps the item's color, as with `swatch.library.add`: when the document gives its name
|
||||
another color, it comes in under a numbered name ("Ink 2"), or as the document's numbered copy of the same color, and
|
||||
the pattern links to it. A pattern the document holds with its art linked to the document's own color of that name is
|
||||
reused. `library.get` lists them as `gradients: [{name, gradient}]` and `patterns: [{name, pattern, thumbnail}]`.
|
||||
|
||||
Items can be put in user-named groups, which the panel shows as collapsible sections after the ungrouped items (its
|
||||
search field filters every item by name; `library.get` lists them all to filter). `library.createGroup {library?,
|
||||
@@ -6169,6 +6217,9 @@ and `height`, so a new `hSpacing` changes the tile's width. `pattern.options` st
|
||||
`height` that is not a positive number, such as `"width": 0`, and changes nothing. Without a `name`,
|
||||
`object.pattern.edit` edits the pattern that fills or strokes a selected object, and `pattern.options` changes the
|
||||
pattern being edited; each returns an error when there is no such pattern. `pattern.delete` requires `name`.
|
||||
`object.pattern.make`, `object.pattern.replaceArt`, `object.repeat.radial`, `object.repeat.grid` and
|
||||
`object.repeat.mirror` return the error "no such object id N", and change nothing, when an `ids` entry names no object,
|
||||
even when the other entries name objects.
|
||||
|
||||
With `pattern.options {moveTileWithArt: true}` (Move Tile with Art), a move of all of the tile art in pattern editing
|
||||
mode moves the tile by the same offset: `object.move`, `object.nudge`, `object.transform` with a translation, and drags
|
||||
@@ -6224,7 +6275,8 @@ Each Effect › Pathfinder effect (`pathfinder.add` … `pathfinder.softMix`, no
|
||||
in its params: `precision` (a number, 0.001–10 pt), `removeRedundantPoints` and `removeUnpainted` (true or false), which
|
||||
mean what they mean for the panel's operations; the other operations ignore `removeUnpainted`. With `removeUnpainted`
|
||||
on, a compound shape's area counts as filled when the shape has a visible fill of its own, and Divide keeps every piece
|
||||
when the group or compound shape has one. Outline strokes a compound shape's area in the shape's own fill. `effect.apply`
|
||||
when the group or compound shape has one. Outline strokes a compound shape's area in the shape's own fill, and gives
|
||||
the edges no paint when the shape has no fill (the shape's own strokes still draw over the result). `effect.apply`
|
||||
fills the ones `params` leave out from the current Pathfinder Options, and the values join its journal entry. An effect
|
||||
saved without them evaluates with precision 0.01 and both switches off, as before effects kept them. `effect.setParams
|
||||
{index, params: {precision?, removeRedundantPoints?, removeUnpainted?}}` edits them as one undo step; values the
|
||||
@@ -6275,7 +6327,9 @@ Alt+Shift-click samples only the color at the pointer into the active paint defa
|
||||
sets them; a tree names flags under `appearance` (`transparency`, `fill` `{color, transparency, overprint}`, `stroke`
|
||||
`{color, transparency, overprint, weight, cap, join, miter, dash}`), `character` and `paragraph`, and a bool for a
|
||||
branch sets all of it. `paint.sampleColor {color}` puts a sampled color into the active proxy (in a CMYK document an
|
||||
RGB color is stored as CMYK, as `paint.setFill` stores it). Clicking an image samples its pixels: a CMYK image (a
|
||||
RGB color is stored as CMYK, as `paint.setFill` stores it). `paint.sampleColor {color, stop}` recolors that stop of
|
||||
the gradient behind the proxy; with objects in `ids` it recolors that stop in the topmost fill (or stroke) gradient of
|
||||
the first object `paint.editGradient` edits for them, whatever tool is active. Clicking an image samples its pixels: a CMYK image (a
|
||||
four-component JPEG, or an 8- or 16-bit chunky CMYK TIFF) gives its ink amounts as they are, and an RGB image's sRGB
|
||||
pixel is taken into the working RGB space.
|
||||
|
||||
@@ -7158,8 +7212,10 @@ round, such as a rectangle, stays as it is. Closed paths stay closed and open pa
|
||||
reaches the first or last anchor of an open path, the curve there leaves or arrives along the smoothed path within
|
||||
`radius` of that end rather than along the first or last segment, so a jagged end turns with the rest of the path; it
|
||||
keeps the segment's direction when the smoothed path there turns back by 90° or more. Where the stretch ends inside a
|
||||
path, the curve keeps the direction of the part outside the drag. `object.path.smooth` and Simplify keep each end's
|
||||
direction.
|
||||
path, the curve keeps the direction of the part outside the drag. A segment leading out of the stretch that is within
|
||||
`radius` of the drag for no more than 1/64 of `radius` from the stretch's anchor is left as it is, and the stretch ends
|
||||
at that anchor, so a call that reaches an anchor an earlier call added at the edge of its reach does not split the
|
||||
segment beyond it again (the 1/64 share is VectorCraft's own value). `object.path.smooth` and Simplify keep each end's direction.
|
||||
|
||||
`path.smoothRegion` keeps an anchor as a corner where the path turns by more than 57.5° (an angle inside the corner
|
||||
under 122.5°) at the anchor and also over `radius` and over twice `radius` on either side of it (on a closed path that the drag reaches all the
|
||||
@@ -7267,8 +7323,10 @@ it touches and, with Measurement Labels on, its radius by the pointer, followed
|
||||
radius. A click draws the circle, and a press dragged 2 screen points or more, or canceled with Escape, draws nothing;
|
||||
Shift held at the press puts the circle on the other side of the path. On a straight segment, at a cusp, at a corner
|
||||
anchor, or where the circle would reach past the canvas, the pointer shows "Straight segment", "Cusp", "Corner" or
|
||||
"Circle too large", and a click draws nothing. The pointer passes over the circles the tool drew until another tool
|
||||
is chosen or an edit, Undo or Redo is made outside the tool.
|
||||
"Circle too large", and a click draws nothing. The pointer passes over the circles the tool drew until Deselect or a
|
||||
selection made outside the tool leaves none of them selected, another tool is chosen, another document becomes
|
||||
active, or an edit, Undo or Redo is made outside the tool. Selecting one of them again does not put it back out of
|
||||
reach.
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"shape.curvatureCircle","params":{"id":12,"segment":0,"t":0.5}}}
|
||||
@@ -7325,6 +7383,21 @@ arc size of 180°, its 15° steps, the side an arc bulges to, what C and `[` `]`
|
||||
path are VectorCraft's own rules. The tool keeps `action` and `turn` with the preferences
|
||||
(`tool.setOption {tool: "quickPen", key, value}`).
|
||||
|
||||
While an arc is drawn, by a drag or as the piece the next click adds, the tool shows a protractor around the arc's
|
||||
center: a tick across the arc's circle every 15° from where the arc starts, a longer tick every 90°, and one where the
|
||||
arc ends. The piece the next click adds shows its protractor only while Enable Rubber Band for the Pen tool shows
|
||||
that piece. With Smart Guides on, the end of a continuous arc snaps onto the nearest tick of its protractor, on the same
|
||||
circle, when that tick lies within the Smart Guides snapping tolerance of the pointer, no other Smart Guide snaps the
|
||||
point, and neither Snap to Grid nor Snap to Pixel snaps drawn points. A sharp-corner arc, and a continuous arc that
|
||||
starts a path and so has no direction to follow, sweep the arc size, so their ends do not snap to a tick. Alt tapped
|
||||
during a press moves the piece's end for the new action at once: off the tick when a continuous arc becomes a
|
||||
sharp-corner arc, and onto it when the piece becomes a continuous arc. After a snap
|
||||
setting (Smart Guides, Snap to Point, Snap to Grid, Snap to Pixel or a snapping tolerance) changes under a still
|
||||
pointer, the hover's preview, its protractor, its distance label and its Smart Guides are hidden until the pointer
|
||||
moves. When the view, the document or the selection changes, the canvas hovers the still pointer again. Shift does not constrain Quick Pen points, so it
|
||||
does not change the tick snapping. The
|
||||
protractor, its 15° step and the tick snapping are VectorCraft's own behavior.
|
||||
|
||||
Selecting the tool shows its toolbar on the canvas: Straight Line, Continuous Arc and Sharp Corner Arc set `action`,
|
||||
Flip Arc flips the last sharp-corner arc as C does (`tool.quickPen.flipArc {}`, which first finishes any pending tool edit,
|
||||
which can change the document, then returns false and changes nothing more when the Quick Pen tool is not active
|
||||
@@ -7560,7 +7633,7 @@ and the weed box of Weed Box and Lines (`addon.cutting.weed`) read the image whe
|
||||
corners make a parallelogram, the image is placed by its transform as before. Otherwise the native file saves them in
|
||||
the image's `image_quad` field (top left, top right, bottom right and bottom left of its pixels, in page
|
||||
coordinates); files without the field open as before. The canvas, printing and every export except DXF, WMF and HP-GL
|
||||
(an HP-GL plot leaves images out) draw a distorted image as a mesh of affine image pieces, clipped by the corners; no warped copy of the pixels is stored. In
|
||||
(an HP-GL plot leaves images out) draw a distorted image as a mesh of affine image pieces, clipped by the corners; no warped copy of the pixels is stored. The `.ai` writers write the nearest parallelogram instead at their nesting limit (below). In
|
||||
printing and exports the mesh takes as many cells as it needs for the pieces to stay within 0.05 pt of the exact
|
||||
perspective at the points it checks, with cells at least 2 pt long on the corners' longest side, and each piece reaches
|
||||
0.5 pt into its neighbors. The canvas cuts the mesh for the zoom, by the view's largest stretch: within a quarter of a
|
||||
@@ -7568,24 +7641,34 @@ screen pixel at the points it checks, with cells at least 4 pixels long, and eac
|
||||
neighbors. Either way the mesh takes no more than 64 by 64 cells, and no more cells across than the image has pixels on
|
||||
its longer side (or 8, if that is more). A stronger perspective, or a smaller image, is drawn with the cells it is
|
||||
allowed. In EMF each piece stores only the pixels inside its clip, with a pixel more on each side. DXF and WMF cannot
|
||||
clip, so they write the image as the parallelogram nearest its corners and warn. Corners that would fold the image over
|
||||
clip, so they write the image as the parallelogram nearest its corners and warn. The editing data a `.ai` file carries
|
||||
writes an image nested 8 deep in opacity masks, symbols, live objects and pattern tiles the same way, and a legacy
|
||||
`.ai` (version 7) does so for an image nested 8 deep in symbols and live objects; each warns that the image was
|
||||
written as the nearest parallelogram. Ordinary groups and layers do not count toward that depth. Neither writer
|
||||
writes an image nested deeper. Corners that would fold the image over
|
||||
itself, put three corners on one line, join two corners, cross the warp's horizon or lie too close together for a
|
||||
perspective map are an error, and nothing changes. A transform that squeezes the corners past what a perspective map
|
||||
can place leaves the image at the parallelogram nearest them. A file whose `image_quad` holds other than four points,
|
||||
or breaks these rules, opens with the image placed by its transform. A drag is one undo step, and a distort that leaves
|
||||
can place leaves the image at the parallelogram nearest them. A file whose `image_quad` is not a list, holds other than four points
|
||||
(an entry that is not a point included), or breaks these rules, opens with the image placed by its transform. A drag is one undo step, and a distort that leaves
|
||||
the corners where they are records none. Image info (`image.info`) gives a distorted image's resolution at its middle, and Link
|
||||
Info (`links.info`) gives its scale and rotation there.
|
||||
|
||||
Crop Image (`object.cropImage`), Image Trace (`imageTrace.make`, `imageTrace.makeAndExpand`), Relink (`links.relink`),
|
||||
Embed (`links.embed`), Unembed (`links.unembed`), Create Object Mosaic (`object.createObjectMosaic`) and Place with
|
||||
Replace (`file.place` with `replace`) of anything but a text file refuse a distorted image with an error that names the
|
||||
distortion; Place with Replace does not refuse a clipping group that holds a distorted image of a DCS file's plates. Relink and Unembed refuse a named or selected distorted image before they search a folder or write a file.
|
||||
Create Gradient Mesh (`object.mesh.create`) converts the other objects it is given and lists each distorted image it
|
||||
leaves as it is in `skipped`, with its `id` and the error as `reason`; with nothing else to convert, it returns that
|
||||
error. Update Links (`links.update`) puts a changed file's pixels between a distorted
|
||||
image's corners, without applying its Placement Options. Mask (`object.maskImage`) draws its clipping path through the
|
||||
image's corners. Rasterize (`object.rasterize`) draws the image between its corners and makes a plain image of the
|
||||
result. These rules are VectorCraft's own.
|
||||
Crop Image (`object.cropImage`), Image Trace (`imageTrace.make`, `imageTrace.makeAndExpand`), Create Object Mosaic
|
||||
(`object.createObjectMosaic`) and Place with Replace (`file.place` with `replace`) of anything but a text file refuse a
|
||||
distorted image with an error that names the distortion; Place with Replace does not refuse a clipping group that holds
|
||||
a distorted image of a DCS file's plates. Create Gradient Mesh (`object.mesh.create`) converts the other objects it is
|
||||
given and lists each distorted image it leaves as it is in `skipped`, with its `id` and the error as `reason`; with
|
||||
nothing else to convert, it returns that error. Update Links (`links.update`) and Relink
|
||||
(`links.relink`) put the file's pixels between a distorted image's corners, without applying its Placement Options or
|
||||
Relink's `preserve`. When `preserve` is given, Relink adds a `warnings` entry naming those images; without it, Relink
|
||||
adds none for them. The clipping path a PSD, PSB or DCS
|
||||
file names is drawn through the corners: the clip group of the old file's clipping path gets the new file's clipping
|
||||
path, or becomes a plain group when the new file names none. Embed (`links.embed`) and Unembed (`links.unembed`) keep
|
||||
the corners, each in one undo step. Unembed of a distorted image from a PSD or PSB file, written as stored (PNG, or
|
||||
TIFF for a CMYK file), keeps the clip group of that file's clipping path, and so do Relink and Update Links to the
|
||||
file it wrote; a path that converts the image writes no clipping path, and the clip group becomes a plain group. Mask
|
||||
(`object.maskImage`) draws its clipping path through the image's corners. Rasterize (`object.rasterize`) draws the
|
||||
image between its corners and makes a plain image of the result. These rules are VectorCraft's own.
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"object.distort","params":{"corners":[[40,0],[60,0],[100,100],[0,100]]}}}
|
||||
@@ -9138,8 +9221,14 @@ undo step. When a matched layer, or a layer around it, is hidden or locked, the
|
||||
Drawing modes (`view.drawMode`) apply
|
||||
too: in Draw Inside, `edit.paste`, `edit.pasteInPlace` and `edit.pasteOnAllArtboards` put the objects inside the
|
||||
object drawn into (its clip group, made on the first paste), whatever Paste Remembers Layers says; in Draw Behind,
|
||||
`edit.pasteInPlace` and `edit.pasteOnAllArtboards` put them just below the selection. `edit.pasteInFront` and
|
||||
`edit.pasteInBack` ignore the drawing mode. When the object drawn into is the one isolation mode isolates (`object.isolate`,
|
||||
`edit.pasteInPlace` and `edit.pasteOnAllArtboards` put them just below the selection, and a placed symbol instance
|
||||
(`symbol.place`) goes just below the selection too. `edit.pasteInFront` and
|
||||
`edit.pasteInBack` ignore the drawing mode. In Draw Behind, an Alt-drag (Option-drag on macOS) of whole objects with
|
||||
the Selection or Direct Selection tool puts each copy directly below its own original, in the original's group or layer,
|
||||
and selects the copies: the tools send `object.transform` with `copy` and `drawBehind: true`. The copy of the clipping
|
||||
path of a clip group or a clipping layer goes directly above it, so the clipping path stays the bottom object. Without `drawBehind`, and
|
||||
in Draw Normal and Draw Inside, the copies go directly above; `object.move` and the transform dialogs' Copy,
|
||||
`edit.duplicate` and `object.transformAgain` put them above in every drawing mode. When the object drawn into is the one isolation mode isolates (`object.isolate`,
|
||||
or a double-click on it with the Selection tool), art drawn or pasted inside it takes isolation mode into its clip group,
|
||||
so the new art can be picked and isn't dimmed; `edit.undo` or `edit.redo` that removes the isolated object ends
|
||||
isolation mode.
|
||||
@@ -9885,7 +9974,8 @@ file is missing stays linked: relink it first); `links.unembed {id, path}` write
|
||||
(another extension converts it) and links to it, and without `path` returns `{name, dataBase64}`. An image from a PSD
|
||||
or PSB file written as stored (PNG, or TIFF for a CMYK file), with `path` or `folder`, keeps the clip group of the
|
||||
clipping path that file names, and the file written keeps the path: Open, Place, Relink and Update Links read the file
|
||||
with its clip group.
|
||||
with its clip group. A clipping mask released, edited or made in the document stays as it is, whatever format the
|
||||
image is written in.
|
||||
`ids` of one image works as `id` does. `links.unembed {ids?, folder}` writes each embedded image of `ids` (or of
|
||||
`id`; default: the selected embedded images) to a new
|
||||
file in `folder`, in the format it is stored in (as PNG when that format is not one of VectorCraft's raster file formats), and links each image to its file, keeping its bounds, in one undo
|
||||
@@ -10542,8 +10632,9 @@ ignored. Deleting every opaque color is an error, and the settings, preview and
|
||||
entry of transparent pixels cannot be deleted. `colorTable.customPalette: ["#rrggbb"…]` is a fixed palette (a Custom
|
||||
table) used instead of the reduction's own, at most `colors` entries with the transparent one included, so a color it
|
||||
lacks is not made again. Its colors in `transparent` all become the transparent entry and take one of the `colors`
|
||||
slots together (when no pixel is transparent and no pixel takes one of them, that slot goes to its next color); its
|
||||
other colors fill the remaining slots in order. The dialog's Delete Color sets it to the table's colors on the first deletion. Both lists hold
|
||||
slots together (with transparent pixels they share those pixels' slot; when no pixel is transparent and no pixel takes
|
||||
one of them, that slot goes to its next color), and the preview's `mappedToTransparent` lists each of them a pixel
|
||||
took; its other colors fill the remaining slots, its shifted colors first, then its locked ones, then the rest in order. The dialog's Delete Color sets it to the table's colors on the first deletion. Both lists hold
|
||||
at most 256 colors, and `#rrggbbaa` is refused. A `reduction` change without `colorTable` in the same params clears
|
||||
both lists. JPEG and PNG-24 have no color table and do not read them. Presets and `webExport.settings` keep them. In
|
||||
the dialog a click selects one color, Shift-click selects the colors between it and the last one clicked, and
|
||||
@@ -10858,8 +10949,8 @@ clipping mask into one layer and discards hidden layers that require merging; th
|
||||
imports one image, and Import Hidden Layers brings hidden layers in. `document.open` does the same, with
|
||||
`layers: false` for the single image and `hiddenLayers: true` for the hidden layers. The page also merges
|
||||
adjustment layers, layers with a knockout option, and layers that hold transparent pixels in some blend modes with
|
||||
the layers below them. `document.open` does not apply adjustments, applies only shallow knockouts inside groups, and
|
||||
otherwise merges a layer by its blend mode alone, as the rules below say.
|
||||
the layers below them. `document.open` applies only Invert, Threshold and Posterize adjustments, applies only
|
||||
shallow knockouts inside groups, and otherwise merges a layer by its blend mode alone, as the rules below say.
|
||||
|
||||
The rest are VectorCraft's own rules:
|
||||
|
||||
@@ -10895,10 +10986,28 @@ The rest are VectorCraft's own rules:
|
||||
stores. A solid color fill layer that stores no pixels and has no vector mask comes in as an image of its color
|
||||
(RGB, CMYK, Grayscale, Lab or HSB) over the canvas. One whose shape is a vector mask isn't drawn, and the layers
|
||||
clipped to it are left out.
|
||||
- Adjustment layers, fill layers that store no pixels and whose fill isn't read, layer effects that are switched on,
|
||||
the other knockouts (top-level layers, clipped layers, layers that others are clipped to, Pass Through groups with
|
||||
layers in other modes, other Knockout values, and merges that need more memory than allowed) and vector masks are
|
||||
not applied; the `warnings` count them.
|
||||
- An Invert, Threshold or Posterize adjustment layer (`nvrt`, `thrs` and `post` in the PSD file format
|
||||
specification) is merged with the visible layers below it in its group, which it changes. Clipped to a layer, it
|
||||
changes only that layer and the layers clipped to it. Each color channel is taken as an 8-bit sRGB value: Invert
|
||||
turns `v` into `255 − v`; Threshold makes a pixel white when its luminance (Rec. 709 weights on linear sRGB,
|
||||
encoded back to 0..255) is above the level (1 to 255) and black otherwise; Posterize maps each channel to the
|
||||
nearest of its 2 to 255 evenly spaced levels, the higher one on a tie. The adjusted color is composited over the
|
||||
color below in the layer's blend mode, at its opacity times its fill opacity, through its layer mask, and
|
||||
transparency is kept. A hidden one is left out. One with nothing visible below it in its group that draws (a layer
|
||||
that stores no pixels, other than a solid color fill drawn over the canvas, a layer whose pixels are all
|
||||
transparent, or one at 0 opacity or 0 fill with nothing clipped to it doesn't, nor does a group of only such
|
||||
layers, nor a layer or group whose layer mask hides all of it, for a layer a mask of 0 over each of its pixels that
|
||||
isn't fully transparent, for a group the same over its layers' pixels, or a mask of 0 everywhere when it holds an
|
||||
adjustment layer or a fill that stores no pixels, and for a layer with layers clipped to it the same as for the
|
||||
layer) changes nothing, and so does one at 0 opacity or 0 fill; in a Pass Through group it changes what is below the group only when the group is merged, and is otherwise not
|
||||
applied. One whose layer mask needs more memory than allowed beside the canvases it would change is not applied,
|
||||
and a clip, or a merge for another layer, that it is part of goes on without it.
|
||||
- Other adjustment layers, Invert, Threshold and Posterize layers that others are clipped to, that are clipped to
|
||||
another adjustment layer, whose data can't be read (a level out of range, too short, or two adjustment blocks on
|
||||
one layer) or whose merge, its layer mask included, needs more memory than allowed, fill layers that store no pixels and whose fill isn't
|
||||
read, layer effects that are switched on, the other knockouts (top-level layers, clipped layers, layers that others
|
||||
are clipped to, Pass Through groups with layers in other modes, other Knockout values, and merges that need more
|
||||
memory than allowed) and vector masks are not applied; the `warnings` count them.
|
||||
- Layer channels may be raw, PackBits or zipped (with or without prediction) at 8, 16 and 32 bits.
|
||||
- A file without layers opens as its merged image. A file whose layers can't be read opens as its merged image
|
||||
with a warning, and when the merged image can't be read either, the file is refused with an error.
|
||||
@@ -11428,6 +11537,47 @@ hidden state and stay live on the group; none of them is copied onto the glyph p
|
||||
glyph.
|
||||
`object.expand` outlines type with this command, so Fill and Stroke expand those paths' gradients, patterns and strokes.
|
||||
|
||||
`type.retype` (Type › Retype) turns outlined glyphs back into point text. By default a shape must be exactly a glyph of
|
||||
an available font. With `tolerance` (0 to 0.05), a shape of at most 8 contours that is no glyph exactly becomes the
|
||||
glyph it is closest to when its leftover distance from that glyph, relative to the shape's outline spread (the root
|
||||
mean square distance of its sampled outline points from their center), is at most the
|
||||
tolerance: an outline simplified, a curve split in two, or contours in another order, start or direction. The tolerance
|
||||
and this measure are VectorCraft's own. A near-matched glyph may differ from its line by the tolerance in size, turn
|
||||
and place; an exact glyph keeps the exact limits unless the line's first glyph, whose size and turn the line takes, is
|
||||
a near match. The line also splits before a near-matched glyph, or a glyph of a line whose first glyph is one, that
|
||||
the type would draw further from its shape than the tolerance by the same measure (its own leftover distance together
|
||||
with the change of size and turn) or with its center further away than its origin may be. Each entry of `fonts` in the result has a `score`, from 1 when every glyph of the line is exact down to 0
|
||||
at a leftover distance of 0.05. A compound path that holds several
|
||||
glyphs, such as a word made into one compound path, is split into groups of contours (a contour with the contours
|
||||
inside it) in path order, and runs of up to three groups are matched, the longest first among those after which the
|
||||
remaining groups can still all be matched, so an i's stem and dot become one i. A group whose contours run the other
|
||||
way round, as Make Compound Path leaves some of them, still matches exactly. Exact matches of the whole shape come
|
||||
first, then exact matches of its groups, then near matches of the whole shape, then near matches of its groups. The
|
||||
compound becomes type only when every one of its glyphs does; otherwise it stays as it is and is reported once in
|
||||
`unmatched` when another shape of the selection becomes type, and the command returns an error when no shape does. A
|
||||
glyph also has to paint the area the shape paints under the shape's fill rule: a compound filled by the nonzero rule
|
||||
whose inner contour runs the same way as its outer one paints its center, so a ring glyph does not replace it. A shape with a counter narrower than three times the
|
||||
outline tolerance across in some direction, turned or not, cannot be checked this way and stays an outline: at `tolerance` 0.05, a
|
||||
counter 10 units wide in a 100 by 100 shape, or a 60 by 10 one turned 45 degrees. So does a shape whose outline is too large to check. The glyphs of a compound path that splits into several are set one beside
|
||||
another, so a split whose parts overlap where the shape's fill rule leaves the overlap unpainted (two o's on each
|
||||
other under the even-odd rule) stays an outline. A split whose parts overlap at all also stays an outline when the
|
||||
compound has an opacity below 100%, a blend mode other than Normal, a gradient or pattern fill or a stroke, since the
|
||||
glyphs may become separate objects that paint the overlap twice. When the split with the longest runs fails that check, the split with the
|
||||
shortest runs is checked, then the other complete splits in order, up to 32 splits per shape for exact matches and 32
|
||||
for near matches; when none passes, the shape stays an outline. Glyphs fused into one contour are not split, and a compound path of more than 256 groups, 512 contours
|
||||
or 65,536 path elements is matched whole only. One command groups at most 16,384 contours, in selection order; the shapes after them are
|
||||
matched whole only. Near matching compares a shape with at most the 256 glyphs closest to it in proportion, in at
|
||||
most 50 million point comparisons per shape and 2 billion per command, ranking a glyph by proportion counting as one
|
||||
comparison per contour and one more; past them, the glyphs not yet ranked or compared are left out. It looks glyphs up for at most 1,024 distinct shapes and runs per command: every selected shape first, in
|
||||
selection order, then the runs of groups of the compound paths. Glyphs close only to the shapes and runs past that
|
||||
limit are not looked up. At most 262,144 glyphs are drawn to check whether they could near match, and at most 32,768
|
||||
are indexed for it, each face taking an equal share of both; of a face's glyphs, those closest to the selected shapes
|
||||
in proportion are indexed.
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"type.retype","params":{"tolerance":0.02}}}
|
||||
```
|
||||
|
||||
`type.createOutlines` (Type › Create Outlines) and `effect.expandAppearance` (when it outlines type, as Expand
|
||||
Appearance describes) take an outlined frame of threaded text out of its thread with the text it shows, and the other
|
||||
frames keep the text they hold. When the thread's last frame is outlined, the text it has no room for, which its
|
||||
@@ -12584,7 +12734,7 @@ on an open path that are not drawn because they fall before the path's start can
|
||||
## Retype tracking
|
||||
|
||||
`type.retype {fonts?}` turns selected outlined text back into point text when its shapes are glyphs of a font the app
|
||||
has. A line of three or more glyphs gets the spacing that most of its gaps share as its tracking, in 1/1000 em. Retype
|
||||
has. A line of three or more exactly matched glyphs (none a near match, see `tolerance`) gets the spacing that most of its gaps share as its tracking, in 1/1000 em. Retype
|
||||
tries the value rounded to a whole number first when it is within 0.05 of one, then the value as measured. The font's
|
||||
advances and pair kerning are left out of the measure, and word spaces are counted after the tracking. The tracking is
|
||||
kept when the tracked type draws the whole line in place, or more of it from its start than untracked type does. When
|
||||
@@ -12604,7 +12754,7 @@ tracking their own gaps give. These rules are VectorCraft's own. Each entry of t
|
||||
|
||||
## Retype several lines
|
||||
|
||||
`type.retype` joins lines that follow each other in paint order, with the same group, paint, font, size, turn and
|
||||
`type.retype` joins lines that follow each other in paint order (lines split from one compound path do), with the same group, paint, font, size, turn and
|
||||
tracking (an untracked line of one or two glyphs takes the tracking of the others), into one type object when each
|
||||
line's baseline is the same distance below the one before (between 0.25 and 3 times the size) and the lines line up at their starts, ends or centers. The object is area type with Convert To Area
|
||||
Type's frame, its lines separated by line breaks, with left, right or center alignment, checked in that order. Its
|
||||
@@ -12626,7 +12776,8 @@ the result's `texts` list holds an object's lines joined by `\n`, and each entry
|
||||
|
||||
`type.retypeFonts {count?}` lists the fonts whose glyphs match the selected outlined text. It compares each selected path
|
||||
and compound path, inside groups too, with the glyphs of up to 96 loaded fonts, those of the document's live type
|
||||
first, by the matching `type.retype` uses, and it counts only exact matches. When two versions of a font are loaded,
|
||||
first, by the matching `type.retype` uses, and it counts only exact matches of whole shapes: it does not split a
|
||||
compound path into glyphs or take near matches. When two versions of a font are loaded,
|
||||
only the version its family and style name gives is compared, which is the version that choosing the font sets. The
|
||||
fonts rank by how many shapes each matches, then by the mean distance left after fitting, then by family and style
|
||||
name. `count` is a whole number from 1 to 96 (default 10); any other value is an error. The reply is
|
||||
@@ -13218,7 +13369,8 @@ session and refuses `--connect`. In Safe Mode no plug-in loads or
|
||||
runs: `plugin.install`, `plugin.run`, `plugin.reload` and exporters return an error, and a live-effect plug-in draws its
|
||||
object's geometry unchanged while the object keeps the effect: `effect.list` gives that effect `skipped: true`, and the
|
||||
Appearance panel shows "(Safe Mode)" after its name and the plug-in's id in its tooltip. `effect.expandAppearance` returns an
|
||||
error and changes nothing when an object it would expand holds such an effect, in it or in a symbol it places. `vectorcraft` rejects an option it does not know (such as
|
||||
error and changes nothing when an object it would expand holds such an effect, in it or in a symbol it places. That includes a
|
||||
plain symbol instance in a group or layer with a raster effect, since the group's image draws the symbol's art. `vectorcraft` rejects an option it does not know (such as
|
||||
`--safe-mod`) instead of opening it as a file; `--` before a file name that starts with `-` opens it. The web build keeps
|
||||
no installed plug-ins from one page load to the next and has no launch marker, so it never offers the choice. `plugin.safeMode` returns `{active, source, disabled,
|
||||
pendingItem}`; a command does not turn Safe Mode on or off. `plugin.setEnabled {id | file, enabled}` turns a plug-in on or
|
||||
@@ -14197,8 +14349,11 @@ away); its click on a gradient mesh's line picks the line's two
|
||||
ends, and a click inside a patch picks the four points around it. The picked points show filled. Dragging one of them
|
||||
moves them all as one undo step (`object.mesh.movePoints`), a click on one of several picked points picks it alone,
|
||||
and the arrow keys nudge them by the keyboard increment. The active tool lists them in its options
|
||||
(`tool.setOption {}` returns them as `meshPoints: [{id, index}…]`). Switching to the Eyedropper keeps them picked, its
|
||||
options list them too, and the Mesh tool, Direct Selection or a Lasso chosen next picks them again. While a selected, editable mesh has
|
||||
(`tool.setOption {}` returns them as `meshPoints: [{id, index}…]`). Switching between the Mesh tool, Direct Selection,
|
||||
the Lasso, the Polygonal Lasso and the Eyedropper keeps them picked, and so does a Cmd/Ctrl-click with the selection
|
||||
tool one of them lends; any other tool, Group Selection included, drops them. A plain Lasso click away from the art
|
||||
(`select.none`) unpicks them. The Eyedropper's options list them too.
|
||||
While a selected, editable mesh has
|
||||
points picked, an Eyedropper click or Shift-click on an image or other art samples the color under the pointer into
|
||||
those points alone as `paint.sampleColor {color, stroke: false, ids}` with the meshes that have points picked: one undo
|
||||
step, none when the color is unchanged. Other selected objects keep their paint. A click on one of those meshes, and
|
||||
@@ -14499,11 +14654,13 @@ Tools:
|
||||
outside it with a point on it (within a millionth of its radius); it never crosses the first segment, and it
|
||||
touches the two segments at different points. The circle is a new ellipse with the current paint, drawn through
|
||||
three of its points with `shape.circleThroughPoints` so that Align New Objects to Pixel Grid leaves it in place, one
|
||||
undo step. A circle too small or too large for its three points to give it back in floating point counts as no
|
||||
circle. Shift pressed or let go during a click counts at the release. With no circle the note shows, a click draws
|
||||
undo step. A circle too small or too large for its three points to give it back in floating point, or one that
|
||||
would reach past the canvas (4,000,000 pt from the origin), counts as no circle. Shift pressed or let go during a click counts at the release. With no circle the note shows, a click draws
|
||||
nothing and the first segment stays picked; it also stays when drawing the circle fails or the press on the second
|
||||
segment is canceled (a canceled touch). Escape, an edit, Undo or Redo outside the tool, or another document forgets
|
||||
the first segment.
|
||||
segment is canceled (a canceled touch). Escape, an edit, Undo or Redo outside the tool, another document, or a
|
||||
change to the first segment that makes no undo step (a live preview, or one that was canceled) forgets the first
|
||||
segment. The circle is looked for again whenever either segment no longer has the shape it was found on, so a
|
||||
canceled preview does not leave a circle worked out on the previewed paths.
|
||||
Option (`tool.setOption`, or a double-click on the tool): `radius` (pt, 0.01 to 1000000, 36). `tool.setOption`
|
||||
gives an error for a value outside that range or one that is not a number, and for any other option.
|
||||
- **Trim at Crossings Tool** (`trimAtCrossings`): removes stretches of paths between the places where they are crossed,
|
||||
|
||||
+26
-11
@@ -34,7 +34,7 @@ in `crates/engine/src/cmd/plugin.rs`).
|
||||
| `plugin.inspect` | as `plugin.install`: `{"path"}` or `{"dataBase64", "name"?}` | Validates a module without installing it; returns the `plugin.list` entry it would have, plus `needsApproval` (true when installing it needs a person's approval), `needsReplace` (true when `plugin.install` needs `replace: true`), and the `commandAllowlist` ids no command has (`unknownCommands`) and those no plug-in may call (`refusedCommands`). |
|
||||
| `plugin.remove` | `{"id"}` | Uninstalls, and deletes it from the `Plug-ins` folder with its [settings and cache](#settings-and-cache). |
|
||||
| `plugin.clearCache` | `{"id"?}` | Deletes every entry in the [cache](#settings-and-cache) of plug-in `id`, or of every installed plug-in; settings stay. Returns `{"cleared": [id], "bytesFreed"}`. |
|
||||
| `plugin.reload` | `{"path"?: "folder"}` (default: the preference folder) | Installs every `*.wasm` in a folder; a bad module is reported and skipped, and so are a heavy filter and a plug-in whose permissions the user hasn't granted (nobody was asked). |
|
||||
| `plugin.reload` | `{"path"?: "folder"}` (default: the preference folder) | Installs every `*.wasm` in a folder, the first 1,000 by file name; a bad module is reported and skipped, and so are an entry that is not a regular file, a heavy filter and a plug-in whose permissions the user hasn't granted (nobody was asked). Returns `{"folder", "loaded", "failed": [{file, error}], "leftOut"}`; `leftOut` counts the `*.wasm` files past the first 1,000, which were not tried. |
|
||||
|
||||
Live effects are applied like any effect: `effect.apply {"effect": "plugin.<id>", "params": {…}}`, edited with
|
||||
`effect.setParams`, listed by `effect.list` (menu `Effect › Plug-ins`) and baked by Object › Expand Appearance.
|
||||
@@ -108,7 +108,10 @@ replaced by a module without it.
|
||||
**Preference folder.** Edit › Preferences › Plug-ins & Scratch Disks › *Additional Plug-ins Folder*: when set, every
|
||||
`*.wasm` in that folder (not recursive) is installed at startup and whenever the preference changes (desktop builds;
|
||||
the web build installs from bytes). On the desktop, Choose… beside the field picks the folder; the dialog refuses a
|
||||
picked or typed folder whose contents can't be listed, and `prefs.set` refuses such a folder too.
|
||||
picked or typed folder whose contents can't be listed, and `prefs.set` refuses such a folder too. A folder load reads at
|
||||
most 1,000 `.wasm` files, the first ones by file name (VectorCraft's own limit); its report counts the files left out
|
||||
(`leftOut`). An entry that is not a regular file, such as a subfolder or a named pipe with a `.wasm` name, is listed in
|
||||
the report and skipped, and the load does not wait on a named pipe.
|
||||
|
||||
Plug-ins are installed **per process**, not per document. Documents store a live effect as an ordinary effect record
|
||||
(`{"id": "plugin.<id>", "params": {…}}`): while the plug-in is installed it is drawn, exported and expanded; without it
|
||||
@@ -126,14 +129,14 @@ defaults):
|
||||
| Module size | 32 MiB | rejected |
|
||||
| Linear memory | 512 MiB per instance (input and parameters: at most half) | `memory.grow` returns -1; oversized input or initial memory fails |
|
||||
| Output | 64 MiB of JSON | `Limit("output size")` |
|
||||
| Instructions (fuel) | 50 M per call + 4,000 per input byte for `vc_run`; an object filter with the [Large instruction budget](#instruction-budget-preference) 250 M + 4,000 per byte; a [heavy filter](#heavy-filters) 1 G + 4,000 per byte; an export or import 10 G + 4,000 per byte | `Limit("instruction budget")` |
|
||||
| Wall clock | 60 s per filter run, 5 s per live-effect run, 300 s per heavy filter run, export or import (checked every 20 M instructions; the web build reads the page's `performance.now()`) | `Limit("time budget")` |
|
||||
| Instructions (fuel) | 50 M per call + 4,000 per input byte for `vc_run`; an object filter with the [Large instruction budget](#instruction-budget-preference) 250 M + 4,000 per byte; a [heavy filter](#heavy-filters) 1 G + 4,000 per byte; an export or import 10 G + 4,000 per byte; [storage calls](#settings-and-cache) take one more for every 64 bytes they move | `Limit("instruction budget")` |
|
||||
| Wall clock | 60 s per filter run, 5 s per live-effect run, 300 s per heavy filter run, export or import (checked every 20 M instructions and after each [storage call](#settings-and-cache); the web build reads the page's `performance.now()`) | `Limit("time budget")` |
|
||||
| Import input | 128 MiB of the file (`vectorcraft_plugins::import::MAX_INPUT_BYTES`) | the file doesn't open; a larger file named by `path` is not read past that |
|
||||
| Call depth | 1,024 frames | trap |
|
||||
| Module shape | wasmi's strict limits (≤ 10,000 functions, 1 memory, …) | rejected |
|
||||
|
||||
An export runs where the export runs: with Background Export on, on the export's worker, whose Cancel stops the
|
||||
plug-in between two of those 20 M-instruction slices; nothing is written then. An import stops the same way when the
|
||||
plug-in between two of those 20 M-instruction slices or after a storage call; nothing is written then. An import stops the same way when the
|
||||
open it runs in is cancelled, and nothing opens then.
|
||||
|
||||
### Instruction budget preference
|
||||
@@ -148,7 +151,7 @@ and MCP alike:
|
||||
|
||||
A [heavy filter](#heavy-filters) keeps its 1 G and 300 s with either choice. Live effects, exporters and importers keep
|
||||
their own budgets. A change applies to the next run of every installed filter, without installing it again. Cancel and
|
||||
the time budget stop a run between two 20 M-instruction slices with either choice. `prefs.set {key:
|
||||
the time budget stop a run between two 20 M-instruction slices, or after a storage call, with either choice. `prefs.set {key:
|
||||
"pluginInstructionBudget", value}` takes `normal` or `large` (or the labels Normal and Large) and refuses any other
|
||||
value; a saved preferences file with another value reads as Normal.
|
||||
|
||||
@@ -353,10 +356,13 @@ each time it is drawn, and a paint linked to a global swatch is drawn in that sw
|
||||
|
||||
## ABI v1
|
||||
|
||||
A plug-in is a core WebAssembly module (MVP + the usual post-MVP features: bulk memory, sign extension, multi-value,
|
||||
saturating conversions; no SIMD, no memory64) with these exports and no imports other than the [host
|
||||
imports](#host-imports-api-level-2) of API level 2. Integers are `i32` unless noted; pointers are offsets into the
|
||||
module's memory.
|
||||
A plug-in is a core WebAssembly module (MVP + these post-MVP features: mutable globals, sign extension, saturating
|
||||
conversions, multi-value, bulk memory, reference types, tail calls and extended constant expressions) with one memory,
|
||||
these exports and no imports other than the [host imports](#host-imports-api-level-2) of API level 2. Before wasmi reads
|
||||
a module, the host validates it with only these features on, and refuses a module that uses any other feature. The error
|
||||
names the feature for SIMD, relaxed SIMD, memory64, multi-memory, custom page sizes, wide arithmetic, threads,
|
||||
exceptions, function references and garbage collection. Integers are `i32` unless noted;
|
||||
pointers are offsets into the module's memory.
|
||||
|
||||
| Export | Signature | Meaning |
|
||||
|---|---|---|
|
||||
@@ -422,6 +428,14 @@ its 10,000 storage calls or its 1 GiB of storage reads and writes. Each call cou
|
||||
settings call counts the whole settings file when it reads the file, and a set or delete also counts the whole file
|
||||
when it writes the file; a cache call counts the entry it reads or writes. A read counts them even when the value
|
||||
doesn't fit and nothing is copied. A call that would pass the 1 GiB returns `-7` before it reads or writes anything.
|
||||
The bytes the calls count also cost the run one instruction of its budget for every 64 bytes (VectorCraft's own
|
||||
value), counted over the whole run, so the 1 GiB costs about 16.8 M instructions. A get also pays at that rate for the
|
||||
bytes it copies into the module's memory that it didn't count, such as a value answered from memory. A call stops
|
||||
before a read or write of a file that the run's instructions can't pay for, and the run ends with
|
||||
`Limit("instruction budget")`; a set or delete may already have read the settings file then. A call takes
|
||||
instructions beyond the current 20 M-instruction slice only before Cancel and the time budget; after either, a read or
|
||||
write that needs them doesn't happen. After every storage call the run checks its time budget and Cancel, and stops
|
||||
if either has come. A read or write that would pass the 1 GiB still returns `-7`, whatever the instructions left.
|
||||
|
||||
The app keeps the settings in memory after the first call and reads `settings.json` again only when the file's size
|
||||
or modified time differs from the last read or write. A get answered from memory reads no file and counts no bytes. A
|
||||
@@ -681,7 +695,8 @@ every attribute:
|
||||
`"unknown"`, read from the image itself. An image whose corners Perspective Distort or Free Distort moved to a shape
|
||||
that is not a parallelogram also has `corners`, its pixel rectangle's corners on the page (top left, top right,
|
||||
bottom right, bottom left), and its `transform` is then the affine placement nearest them, the one that matches the
|
||||
perspective at the middle of its pixels. An embedded image whose pixels take at most 1 MiB in base64 (443 × 443
|
||||
perspective at the middle of its pixels. Corners that make a parallelogram are described by `transform` alone. An
|
||||
embedded image whose pixels take at most 1 MiB in base64 (443 × 443
|
||||
pixels fit) has them in `pixelsBase64`: straight RGBA, 8 bits a channel, row by row from the top, and
|
||||
`pixelsOmitted: false`. A CMYK image's pixels are its inks through the working CMYK profile, as sRGB. The pixels of
|
||||
all the images in one input take at most 16 MiB in base64, and an image the host starts to decode takes its size
|
||||
|
||||
+10
-2
File diff suppressed because one or more lines are too long
+48
-20
File diff suppressed because one or more lines are too long
+12
-9
@@ -689,15 +689,18 @@ out, perspective). No Adobe software, assets, presets or bevel shapes were used.
|
||||
meet, again on the merged outline, which can have more points (bars crossing in a grid trace every hole between
|
||||
them); past it, the shape is too complex for the effect.
|
||||
- The faces drawn, exported and made by **Object › Expand Appearance** keep the shape's curves: the caps of
|
||||
Extrude & Bevel, the flat face of Rotate, and the edges of the walls and bevels where they meet a cap are cubic
|
||||
curves, with smooth anchors where the art's are smooth, while visibility and depth are worked out on the
|
||||
sampled points. Without perspective and bevel each curve maps exactly. With perspective, a curve is split into
|
||||
cubics until each lies within 0.001 pt of the projected outline. A face inset or outset by a bevel follows its
|
||||
sampled outline within the sampling tolerance above, one curve for each sampled edge through its two sampled
|
||||
points, so the cap and the walls next to it draw the edge they share as the same curves. The edges between two bevel steps or two wall slices, a
|
||||
piece of curve that does not fit after 8 halvings, an edge of a twisted wall cut into pieces, and the curves
|
||||
past 1,048,576 for one solid stay straight. The tolerances and limits are VectorCraft's own values. Inflate's
|
||||
faces are polygons.
|
||||
Extrude & Bevel, the flat face of Rotate, and every edge of the walls and bevels along the art's curves (at a
|
||||
cap, between two bevel steps and between two wall slices) are cubic curves, with smooth anchors where the
|
||||
art's are smooth, while visibility and depth are worked out on the sampled points. Without perspective and
|
||||
bevel each curve maps exactly. With perspective, a curve is split into cubics until each lies within 0.001 pt
|
||||
of the projected outline. A face inset or outset by a bevel follows its sampled outline within the sampling
|
||||
tolerance above, one curve for each sampled edge through its two sampled points, so two faces that meet draw
|
||||
the edge they share as the same curves. A twist cuts a wall's edge into pieces at points of the art's curve,
|
||||
so each piece follows the same curve as the cap it meets. Inflate keeps the curves of its flat back, of its
|
||||
side walls and of its front and puffed back where they meet the outline, within the sampling tolerance there;
|
||||
the inside of a puffed surface stays flat facets. A piece of curve that does not fit after 8 halvings, the
|
||||
curves past 1,048,576 for one solid, and the cells' edges left once Inflate has looked at 4,194,304 edges of
|
||||
the outline to find them, stay straight. The tolerances and limits are VectorCraft's own values.
|
||||
- Inflate also limits the work of filling its grid, which grows with the outline's points times the grid cells its
|
||||
outline crosses. An outline of tens of thousands of points that crosses nearly every cell (a comb of 4,000 teeth
|
||||
across the shape) is refused because the 3D surface is too complex; a closed path of 65,536 points round a
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ against Illustrator's public documentation; **estimated** unless noted.
|
||||
| Alt + numeric-keypad codes while typing (Windows: `Alt+0176` → °) | partial | #5108: on Windows the character Windows posts when Alt comes up after keypad digits is typed at the caret like any other, in the typing's undo step, and the keypad digits typed with Alt run no shortcut. With NumLock off the keypad keys (Insert, End, arrows, Clear, Home, Page Up/Down without the extended-key flag) count as digits too and don't move the caret (`windows_alt_codes` unit tests; neither NumLock on nor off has been tried on a Windows machine yet). `type.insert {code}` (Windows Alt+0 code, Windows-1252 for 128–159) and `{unicode}` (hex code point) insert a character by its code (`menucmds::insert_a_character_by_its_code`). macOS and Linux have no such system convention and egui reports a keypad digit as the top-row digit, so there it does nothing; a floating panel window doesn't receive the character |
|
||||
| Caret: the arrows and Delete step over whole clusters (Thai consonant with its marks, combining accents, emoji); Backspace removes one character | done | in text with right-to-left characters the arrows move in visual order and stop on both sides of a character drawn with no width, such as a zero width non-joiner |
|
||||
| Touch Type tool | done | moves, scales and rotates one character through its kerning, baseline shift, scales and rotation (`text.touchType`); a character with a preceding logical character on the same line can move along the line in either reading direction; the first logical character moves only up and down. Positive `dx` follows reading order. These direction rules are VectorCraft's choices. |
|
||||
| Retype (identify fonts in outlines/images) | partial | Phase 1 (#4934): Type › Retype (`type.retype`) turns outlined glyphs back into type when each shape is exactly a glyph of a loaded font, a font the document uses or a family named in `fonts` (the same up to uniform scale, rotation and translation): one object per line unless lines stack into one object as described below, in that font and size, at the same baseline and turn, with the first glyph's fill and stroke, in one undo step; shapes that match no font stay as they are and are reported. Evenly spaced glyphs keep their spacing as tracking (gaps one space wide stay word spaces when type draws them), and lines stacked at one leading and lined up at their starts, ends or centers become one area type object with that leading and alignment (VectorCraft's own rules, checked against the layout). Window › Retype shows the Retype panel, which lists the fonts whose glyphs exactly match at least one selected outlined shape, comparing up to 96 loaded fonts with those of the document's live type first, ranked by how many shapes each matches, with samples, and sets a listed font on selected live type (`retype.find`, `type.retypeFonts`). Missing (phase 2): near or fuzzy matches (another version of the font, simplified outlines, glyphs merged into one path), opening the panel from the Type menu, the context menu and the Properties panel's Quick Actions, filtering the list by font source and favorites, installed fonts not yet loaded, text in images. Public behaviour: [identify fonts](https://helpx.adobe.com/illustrator/desktop/design-with-text/fonts-and-scripts/identify-fonts-using-retype.html), [apply to live text](https://helpx.adobe.com/illustrator/desktop/design-with-text/fonts-and-scripts/apply-retype-suggested-fonts-to-live-text.html) |
|
||||
| Retype (identify fonts in outlines/images) | partial | Phase 1 (#4934): Type › Retype (`type.retype`) turns outlined glyphs back into type when each shape is exactly a glyph of a loaded font, a font the document uses or a family named in `fonts` (the same up to uniform scale, rotation and translation): one object per line unless lines stack into one object as described below, in that font and size, at the same baseline and turn, with the first glyph's fill and stroke, in one undo step; shapes that match no font stay as they are and are reported. Near matches: with `tolerance` (0 to 0.05), shapes of up to 8 contours whose leftover distance from a glyph, relative to the shape's outline spread (the root mean square distance of its sampled outline points from their center), is at most the tolerance (simplified outlines, curves split in two, contours in another order or direction) match too, and each line reports a `score`; a compound path holding several glyphs is split into them and becomes type only when all of them match. A line of three or more exactly matched glyphs keeps the spacing most of its gaps share as tracking (gaps one space wide stay word spaces when type draws them). A line of two glyphs that untracked type does not draw in place takes the tracking of the nearest tracked line in the same font, size and turn, and keeps it only when type at that tracking draws both glyphs in place; a line of one or two glyphs that joins tracked lines in one object takes their tracking. Other lines are set untracked, each glyph at its own position, and lines stacked at one leading and lined up at their starts, ends or centers become one area type object with that leading and alignment (VectorCraft's own rules, checked against the layout). Window › Retype shows the Retype panel, which lists the fonts whose glyphs exactly match at least one selected outlined shape, comparing up to 96 loaded fonts with those of the document's live type first, ranked by how many shapes each matches, with samples, and sets a listed font on selected live type (`retype.find`, `type.retypeFonts`). Missing (phase 2): glyphs fused into one contour, near matches and compound paths of several glyphs in the panel's list, opening the panel from the Type menu, the context menu and the Properties panel's Quick Actions, filtering the list by font source and favorites, installed fonts not yet loaded, text in images. Public behaviour: [identify fonts](https://helpx.adobe.com/illustrator/desktop/design-with-text/fonts-and-scripts/identify-fonts-using-retype.html), [apply to live text](https://helpx.adobe.com/illustrator/desktop/design-with-text/fonts-and-scripts/apply-retype-suggested-fonts-to-live-text.html) |
|
||||
| Snap to Glyph | done | View › Snap to Glyph (`view.snapToGlyph`): with Smart Guides on, new point type and drawing tools snap to live-text baselines and glyph bounds, the corners of each glyph's box included, turning with rotated type (#5112; `guides::tests::a_drawn_point_lands_on_a_corner_of_a_glyphs_bounds`, `Targets::for_drawing`, `tools::text_tests::snap_to_glyph_lines_up_new_point_type_with_a_baseline`). With Alignment Guides on as well, and Snap to Grid and Snap to Pixel off, both ends of a Measure or Measure & Inspect drag snap to those guides and show them during the drag (`Targets::for_measure`, `xform::measure::tests::its_ends_land_on_glyph_guides_with_snap_to_glyph`). That the Measure tools take the guides is VectorCraft's choice; they leave out Anchor Point, which [the help page](https://helpx.adobe.com/illustrator/desktop/design-with-text/special-characters-glyphs/snap-to-glyph.html) limits to the Pen tool and objects moved with the Selection tool. Character panel menu › Show Snap to Glyph Options: Baseline, x-height, Glyph Bounds, Proximity Guides, Angular Guides and Anchor Point each turn their guides on or off (`view.snapToGlyph.options`, all on by default; #4232), after a Snap to Glyph checkbox for View › Snap to Glyph; showing them scrolls the panel to them (#5273) |
|
||||
| Thai, Lao, Khmer, Myanmar: shaping (marks, reordering), lines broken between words, word-by-word caret and double-click | done | words found by ICU4X's line segmenter: dictionaries on the desktop, LSTM models on the web |
|
||||
| Middle Eastern: bidirectional layout, Paragraph Direction | done | 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 still needs ActualText support (#6165); separately styled or differently rotated clusters and external viewer search/copy remain outside this export-only evidence. |
|
||||
|
||||
+13
-3
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user