Commit Graph
2156 Commits
Author SHA1 Message Date
dotCooCoo 584b9706cc Gradient: Perceptual PDF help counts stops as written, CMYK documents included
The method help of paint.editGradient and docs/mcp.md said a Perceptual
gradient with spot stops becomes an image in PDF unless every other stop
is paper white, CMYK or gray. PDF export checks each stop's color as it is
written: a CMYK document, or an export that converts colors to a CMYK
destination profile, writes RGB and Lab stops in CMYK, so the gradient
becomes a DeviceN shading. Both texts now say so, and a test covers the
CMYK document and CMYK destination cases.
2026-11-05 01:31:24 +07:00
dotCooCoo 7f449cc3c8 UI-1628: Keep drawing cursor during mid-drag Cmd+Space 2026-11-05 01:08:26 +07:00
d8abyte-dkandClaude Opus 5.5 ad93abd484 Plug-ins: compound guides aren't filter inputs; colors follow the working RGB space
A compound path a filter made a guide was still given to later filters, which
could change or delete it; compound paths of guide paths are now left out as
guide paths are. Hex colors and the color button's choice are display sRGB and
are now converted into the working RGB space, so they show as given whatever
the working profile; a color default is kept as written and read when used.

Follow-up to #5630.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 00:42:23 +07:00
dotCooCoo fae49d31fd Glyphs: the default glyph can be chosen back under a substituting feature
Follows #5442.

- text.setGlyphAlternate keeps the default glyph as a choice when a
  feature of the character's style (salt, a stylistic set) draws another
  glyph for it, so the default glyph is drawn. A character that is not
  laid out (overflowing text) is shaped alone in its style to decide.
  gid: null reports the glyph the style draws.
- The Glyphs panel's alternates grid shows the default glyph first when
  the font does not list it, so a chosen alternate can be put back.
- A test for a chosen character that starts a longer grapheme (f with a
  combining acute), which is not split from its mark.
- The alternates tests in the engine hold the shared font lock while
  they add fonts to the global font database.
2026-11-04 23:58:54 +07:00
dotCooCoo 2395a390b5 Control bar: the inline X, Y, W and H fields show only when they fit
The bar decided to show the inline fields against a fixed 440-point
width, smaller than the room the fields take, so just above that width
the H field ran past the bar's right margin and was clipped. The bar
now adds up the room from the values that draw the fields: the label
widths in the current language, the four 80-point fields, the W/H link
and the item spacing ahead of each. With less room it shows the
Transform link alone, as before.
2026-11-04 23:45:02 +07:00
Alex cd50091212 Canvas: Space during a tool's drag keeps the tool's cursor
Space pressed after a tool's press has begun (Pencil, a brush, a shape, a
selection drag) switched the cursor to the hand but panned nothing: the pan
starts only with Space down at the press. It is ignored now, so the cursor keeps
the tool's own.

Test: space_during_a_pencil_drag_keeps_the_pencil_cursor (fails without the fix:
Grab instead of the pencil's crosshair).
2026-11-04 23:24:59 +07:00
dotCooCoo 40569eb267 Docs: the byte-offset rule names only commands that take a range
The type.size.* commands, type.resetTracking and type.resetHorizontalScale
do not take `id`, `start` or `end`, so they refuse those keys as unknown
parameters. The list in docs/mcp.md now leaves them out.
2026-11-04 23:24:54 +07:00
ruchirguitarandClaude Opus 5.5 471cf3b81b Select by Artboards dialog: double-click a row to fit its artboard (#5549)
A double-click makes the row's artboard active and fits it in the
window (view.goToArtboard, as the Artboards panel does), keeping the
dialog open and the artboards chosen before it. Parity docs record the
Selection Tools add-on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 22:57:59 +07:00
ruchirguitarandClaude Opus 5.5 7e016a0bcc Select by Artboards: select objects overlapping, inside or outside several artboards (#5525)
addon.select.byArtboards {artboards, relation} in a new Selection Tools
add-on. Overlapping is All on Active Artboard's test, now one shared
helper (select::on_artboard); Fully inside is within one artboard, edges
included; Fully outside is on none. Objects are those Select All takes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 22:57:57 +07:00
dotCooCoo a07ca35c47 Geometry: the nearest point on a long path skips segments whose box is farther than the best found
PathData::nearest, which the Direct Selection cursor runs to find the
segment under the pointer, projected the pointer onto every segment of
the path.

It now projects the pointer first onto a segment at the anchor nearest
to it, then skips each segment whose control-point box lies farther
away than that distance or the nearest point found so far. Each box is
measured once and the search allocates no memory. The result is the
same, including which of equal distances wins. A segment is never
skipped when the pointer or one of its control points is past 1e100 or
not finite.

Over a segment of an open path of 200,000 anchors, the cursor takes
51 ms instead of 59 ms in a release build (anchor_bench). The progress
line in docs/target-app-parity.md gives the timing.

Tests compare nearest with every segment projected over 400 random
paths, each probed at 30 points on a coarse grid (ties included), and
on open, closed, compound, one-anchor, empty, huge and non-finite
paths.
2026-11-04 22:57:47 +07:00
dotCooCoo 0c3bf975d2 Type: Tate-chu-yoko Settings refuses a value that is not a length
OK in Tate-chu-yoko Settings read an Up/Down or Left/Right that is not a
length as 0 and applied it. It now returns "Up/Down must be a number" or
"Left/Right must be a number" and keeps the dialog open, and a blank
field leaves its value alone.
2026-11-04 22:57:43 +07:00
dotCooCoo 88b5170622 Glyphs panel: alternates for the current text selection
Squashed from #5442 onto main.
2026-11-04 22:29:53 +07:00
dotCooCoo 0990bfb244 .ai save: the editing copy keeps transparency, clipping and opacity masks
The editing copy of the art that a PDF-compatible .ai carries now holds:

- Transparency: `mode opacity isolate knockout shape Xy` (the blending
  mode's number, Knockout Group 0 off, 1 on, 2 neutral), written when it
  changes: in a path's paint after its colors, before a guide, and after
  a group's end followed by `0 0 Xd` and `6 () XW`. A group without
  transparency of its own ends `9 () XW`, and a group's name comes
  before its state block. A layer's transparency follows its art: `Xy`,
  `0 0 Xd`, `7 () XW`, `LB`.
- Clipping groups as `q`, the art, the clipping path or compound path last
  with `h` (or `H`) and `W` before its painting operator, `Q`, as section
  5.6.2 of the version 7 specification shows them
  (http://mercator.elte.hu/~saman/hu/okt/AI7FileFormat.pdf). A clipping
  layer whose clipping object is a path or compound path sets the last
  `Lb` flag and writes its clipping path last.
- Opacity masks as an `AI9_Mask` entry in the object's dictionary: the
  mask's art between `X=` and `X+`, and Clipping, Inverted, Disabled and
  Linked.

Before, clipping groups were written as their art cut to the clipping
path, and transparency and opacity masks were left out. Still left out,
with a warning: the opacity and blending mode of single fills and
strokes, opacity masks on layers (disabled ones too), and opacity masks
nested more than 8 deep. A clipping group or layer whose clipping object
isn't a path or compound path is written as a group of the art cut to
that object, in a layer that doesn't clip, and so are the clipping
groups inside that art. A clipping path's paint that a plain fill and
line can't draw is written as paths inside the clipping, fills under the
art and strokes over it, each side in a group of its own when it has
several, with the clipping path's transparency, lock and hidden state;
the clipping path's opacity mask stays on the clipping path, with a
warning. A clipping group without members is an empty group, and an
empty clipping layer is an empty layer.

Each of these is written in the form VectorCraft's .ai reader reads, and
the tests read the written data back through that reader.

Reading .ai editing data: an `Xy` after a layer's last group or compound
path, followed by the layer's `7 () XW`, is the layer's (a following
`6 () XW` keeps it the group's); groups, compound paths and layers keep
Opacity & Mask Define Knockout Shape.

The `.ai` option `editingData` and docs/file-format-parity.md describe
what the copy now holds.
2026-11-04 22:29:43 +07:00
d8abyte-dkandClaude Opus 5.5 b9594b233c Plug-ins: color parameters, and filters that make guides and lock
A `color` parameter shows a color button that opens the color picker in plug-in
dialogs and the Appearance panel's effect editor; its default and values may be
a color object or a hex string, and the plug-in gets a color object. A filter's
returned objects may set `guide` and `locked`; objects it locked or made guides
are left out of the selection after the run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 22:29:38 +07:00
Don Omondi 609528220b Fix #5160: a slow first frame is waited for, not blamed on the graphics adapter
Squashed from #5635 onto main.
2026-11-04 22:29:32 +07:00
dotCooCoo 3c80b314e1 Select: All on Same Layers takes the layers of objects that can be selected
Select > Object > All on Same Layers took the layer of every selected
object, including one that select.set had kept while it is hidden or
locked, on a template layer, on a locked artboard, or outside the
isolated group. That object's layer then decided which art was
selected. The command now takes the layers only of the selected
objects that the Select commands could select. When the selection
holds no such object, it clears the selection.
2026-11-04 22:29:22 +07:00
dotCooCoo 75ba71618a Docs: type-parity lists manual tate-chu-yoko once
The CJK table had an older manual tate-chu-yoko row that still said the
Up/Down and Left/Right settings remain, next to the current row that
lists Tate-chu-yoko Settings as done. The ruby row also said manual
tate-chu-yoko is missing, and a separate row marked ruby as missing.

Remove the older tate-chu-yoko row and the "ruby missing" row, and
leave the ruby row about ruby only.
2026-11-04 22:29:11 +07:00
Don Omondi ef5a4d967a Fix #5502: Export As PNG exports the active artboard, not always the first
File > Export > Export As PNG... opened PNG Options with no artboard
chosen, and a single-image export without one writes the first
artboard, whichever was in use. With no artboard choice given, it now
takes the active artboard, or each artboard the Artboard tool has
selected (one file each). A choice the caller gives is kept.
2026-11-04 21:59:04 +07:00
dotCooCoo 204b57e046 Docs: American spelling in the PDF shading notes 2026-11-04 21:58:59 +07:00
dotCooCoo eb03e8943f Gradient: PDF shading notes name linear and radial gradients and DeviceN
The PDF writer writes a spot gradient as a Separation or DeviceN shading
only when it is linear or radial; freeform gradients and dithered fills
are written as images in process colors.

- `paint.editGradient`'s method help and the Method paragraph in
  docs/mcp.md limit the Perceptual exception to linear and radial
  gradients.
- The Linked gradient stops paragraph in docs/mcp.md no longer says the
  writer has no DeviceN: a gradient mixing spot inks with other spot,
  CMYK or gray inks exports as a DeviceN shading, and only a mix with RGB
  or Lab colors is written in process colors, with a warning.
2026-11-04 21:58:59 +07:00
dotCooCoo ebbbf29f1e Gradient: Perceptual spot ink mixes stay continuous from red to blue
Mixed in display RGB, red and blue darken past blue's lightness and come
back. The weight search for a Perceptual DeviceN shading then found a
red-side weight for stops near the blue stop, and the inks jumped there.
When the display RGB mix's lightness turns back between two stops, the
inks are mixed at each stop's mix position instead.
2026-11-04 21:58:48 +07:00
FractalEncryptandDevin 985ef69cb7 New Document: units belong to the chosen preset, not the whole tab
Choosing units in Preset Details restyled every preset card in the Recent
and Saved tabs, so switching between inches and millimetres rewrote all the
user's templates at once. The pane's options apply to the selected preset
(helpx, "Create and save custom document presets"), so only the chosen card
follows the chosen units now; the others keep the units their document or
preset was made in, and clicking one brings its units back. The built-in
category tabs still show the chosen units (#2078).

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-04 21:38:01 +07:00
Don Omondi 0143e0f706 Fix #5483: a large font library no longer keeps the window from opening
The menu bar builds Type > Font in every frame, the first included, and
its family list waited for the scan of every installed font. When that
scan took longer than the 20 s first-frame watchdog (thousands of fonts
on a slow disk, or each file checked by antivirus), the app took the
graphics adapter for hung and started again without it, until none was
left and no window ever showed.

The menu now lists the fonts already loaded until the scan ends, then
all of them (FontDb::menu_family_list_now, installed_fonts_ready).
2026-11-04 21:37:48 +07:00
dotCooCoo be52e4e8af Tabs: setting the stops a paragraph already has records no undo step
text.tabs.set and text.tabs.clear return without an edit when every
targeted paragraph already holds the stops. A Ctrl-drag that the 0 pt
bound keeps from moving, or a drag released where it started, no longer
adds an undo step that changes nothing. When one targeted paragraph
holds other stops, the command still sets them all.
2026-11-04 20:51:10 +07:00
dotCooCoo 88aeee8f8e Shape Builder Tool Options: a highlight color with an alpha part is refused
OK in Shape Builder Tool Options sent highlightColor to tool.setOption,
which keeps only #rrggbb, so #ff000080 was applied as #ff0000 with no
error. OK now gives the same error as the Live Paint tool options for a
hex color with an alpha part (#rrggbbaa or #rgba), the dialog stays open
and the tool's options do not change. The tool.options params text,
docs/mcp.md and the progress doc say so.
2026-11-04 20:51:03 +07:00
dotCooCoo 64c9bfa720 Actions: a paced playback ends when a step comes due in another document
Step by Step and Pause For remember the document that was active after each step. When the next step is due and a different document is active (another one was made active, or that one was closed), the playback ends with a status and the rest of the steps do not run. A step that makes another document active itself does not end the playback.
2026-11-04 20:12:14 +07:00
dotCooCoo f5f3ca4286 Actions: Step by Step draws the first step, and recorded batches play as their steps
Step by Step holds the frame after Play, so the first step's result is drawn before the
second step runs, also when the panel's Play button runs after the canvas drew.

An action step recorded as command.batch (an action played while recording, including one
playing at Step by Step or Pause For, or a panel operation that runs as one batch) now plays
as its own steps in Play and Batch..., instead of failing with "batches cannot nest".
2026-11-04 20:12:13 +07:00
dotCooCoo 9d8be643f4 Actions: Playback Options plays actions accelerated, step by step or with a pause between steps
The Actions panel menu's Playback Options... sets how actions play (ui.action.playbackOptions {speed?, seconds?}). Accelerated, the default, plays every step at once as one undo step, as before. Step by Step plays one step per frame so the canvas draws each step's result, and Pause For waits 1 to 60 seconds between steps; each paced step is its own undo step. Stop Playing/Recording ends a paced playback, and another action does not play while one is paced. The setting is kept with the UI preferences. Batch... plays at full speed.
2026-11-04 20:12:13 +07:00
Don Omondi 33b57fb581 Batch Trace Folder: move to Object › Plug-ins as an add-on
Batch Trace Folder replaces a script, so it is now a Document Tools
add-on command, addon.document.batchTraceFolder, under Object ›
Plug-ins › Document Tools (as Export All Open Documents is), and no
longer in Object › Image Trace. Behaviour, caps and the refusal of a
folder too big to list in full are unchanged; the tests move with it.

The status messages have @msgplural rows in every catalog, as does the
menu label. When some images trace and some don't, the status is one
counted message ("Traced {n} images; not traced: {failed}") so it
translates as a whole.
2026-11-04 20:12:07 +07:00
Don Omondi 7790c37eb3 Batch Trace Folder: refuse a folder too big to list in full
list_dir cuts its listing before sorting, so a cut listing could skip any image. The batch now
stops with an error instead of tracing part of the folder.
2026-11-04 20:12:06 +07:00
Don Omondi 7c04fd8973 Fix #4921: Image Trace > Batch Trace Folder
imageTrace.batchFolder opens each image in a folder, traces it with a
preset (optionally expanded), saves it into a destination folder under
its own name (vectorcraft, svg, pdf, ai or eps; taken names numbered so
nothing is replaced) and closes it again whether it traced or not; the
active document stays active. Object > Image Trace > Batch Trace Folder
asks for both folders. Not on the web.
2026-11-04 20:12:05 +07:00
Don Omondi ed634a78f4 Guide clipboard: Paste after a guides-only Copy takes the guides, not older system clipboard content
A Copy of ruler guides alone left the system clipboard as it was, so the
next Paste took whatever another app had copied before instead of the
guides. The guides-only Copy now empties the system clipboard (on the
web, empty text through egui with Copy As SVG on), as any Copy replaces
what the clipboard held, and drops an earlier Copy's formats not written
yet. What another app copies afterwards still pastes.
2026-11-04 20:12:01 +07:00
Don Omondi f3faa115c6 Fix #3226: copy and paste ruler guides
Edit > Copy and Cut put the selected ruler guides on the clipboard,
with the selected objects or on their own. Pasting puts them on the
layer new art goes to, selected, in the same undo step: with objects
they move as the objects do; alone they keep their places, while Paste
in Place / in Front / in Back put them on the active artboard as they
lay on theirs, and Paste on All Artboards on every artboard.
2026-11-04 20:11:59 +07:00
dotCooCoo ac0ca081bb Commands: a color param with an alpha part is refused instead of losing its alpha
Squashed from #5603 onto main.
2026-11-04 20:08:42 +07:00
Don Omondi 2b10694f99 Fix #3759: vertical alignment buttons for area type in the Properties and Control panels
Squashed from #5100 onto main.
2026-11-04 20:08:06 +07:00
Don Omondi 1348f827d0 Area Type Options: applying to several frames keeps each frame's own options
text.areaOptions given for several area type frames (ids, or a selection of
several) copied the first frame's options onto all of them, so setting one
option (say the vertical alignment) also replaced the others' columns, gutter,
inset and fit. Each frame now takes only the options given over its own, and
fit resolves against each frame's own setting, so fitMinPercent alone changes
only frames that already shrink text to fit. Options that change nothing add
no undo step and keep redo.
2026-11-04 20:07:58 +07:00
dotCooCoo 9275b902a9 PDF/.ai import: a file whose type all comes from its text document opens without its PDF part
A PDF-compatible .ai (or a PDF saved with the editing data) now opens
from its layers without its PDF part being imported, and without being
compared with its page, when:

- its text document makes the type of every text object, hidden ones
  included, at least one text object shows, and none is drawn by the
  appearance of the layer or group it is in;
- its layers hold no unread object, no placed file with a second
  placement and no live envelope with drawn art to fall back on, and
  no image too large to read;
- it declares no large canvas, and its artboards are its pages' trim
  boxes one for one, in points or in the first page's UserUnit.

A file whose layers draw differently from its page then opens from its
layers instead of its PDF part. The bleed comes from the pages' bleed
boxes. The check runs only when no pages are picked, layers and the
editing data are on, the crop box is asked for and type comes in as
text. Files saved without PDF compatibility, files whose PDF part
draws only type or nothing, and files whose PDF part's content can't
be read take the same path when they qualify: their bleed comes from
the pages' bleed boxes, pages in units larger than a point draw them
at their size in points, and the note that the PDF part couldn't be
read is not given, since its content is not read.

Files that don't qualify open as before, and the editing data decoded
and read for the check is reused after the PDF part is imported
(layered_ai_from).

When a file whose PDF part can't be read is scaled up to its size in
points, its text wraps are now laid out again at that size, and the
default graphic styles of a file without graphic styles of its own are
no longer scaled. The same applies on the new path.
2026-11-04 19:41:56 +07:00
dotCooCoo 5626a1614c Gradient: method help names the PDF Separation and DeviceN shadings
The `method` text of `paint.editGradient` and the Method paragraph in
docs/mcp.md said SVG and PDF exports draw a Perceptual gradient as an
image. PDF writes an eligible one natively: tints of one spot ink as a
Separation shading in that ink, and spot inks mixed with other spot,
CMYK or gray inks as a DeviceN shading. Gradients without spot stops,
with RGB or Lab stops, dithered fills and curves with too many stops
still become images there. Both texts now say so.
2026-11-04 19:41:38 +07:00
dotCooCoo a3aae55ceb Docs: list PDF spot gradients written as images in process colors
PDF export writes a dithered gradient fill with spot stops, and a
Perceptual spot gradient with RGB or Lab stops other than white or more
than 4,096 stops on its curve, as an image in process colors. Add these
cases to the M3 roadmap rows and the color area's remaining work, and
correct the evidence line that said every Perceptual spot gradient
becomes an image.
2026-11-04 19:19:07 +07:00
dotCooCoo af14fe3d59 Align Text Tweaker ranges to character boundaries 2026-11-04 18:56:40 +07:00
dotCooCoo 30f903bf60 Navigator: Panel Options sets the view box color and draws dashed lines as solid
The Navigator panel menu's Panel Options… is enabled and opens a dialog with
the view box color (a preset or a custom color; Light Red, today's color, is
the default) and Draw Dashed Lines as Solid Lines, off by default, which draws
dashed strokes without their dashes in the panel's thumbnail only. The
options are kept with the UI state, and ui.navigatorPanelOptions sets them.

RenderOptions::solid_dashes draws dashed strokes as solid lines, including
type strokes and the silhouettes of stroke effects.
2026-11-04 18:29:28 +07:00
dotCooCoo a403e75802 Validate character style numeric dimensions
Squashed from #5540 onto main.
2026-11-04 18:29:25 +07:00
dotCooCoo d79f5ccb75 Layers: a layer or gap color with an alpha part is refused instead of losing its alpha
layer.setProps, layer.new, layer.newSublayer and livePaint.gapOptions read
an 8-digit hex color such as #ff000080 as #ff0000 and set it without its
alpha. They now refuse it with the error a bad color already gets, and
change nothing. #rgba was already refused. #rrggbb, #rgb, a preset index
and a preset name are read as before.
2026-11-04 18:29:17 +07:00
dotCooCoo 12508e6c60 Dialogs: a color with an alpha part is refused instead of losing its alpha
`Color::from_hex` reads `#rrggbbaa` and keeps only its first six digits, so
a `color` set to `#ff000080` through `ui.dialog.set` was applied as
`#ff0000` without an error by Tile Edge Color, Live Paint Selection Tool
Options, Live Paint Bucket Options and Gap Options.

- A new `checked` next to `resolve` in `dialogs/tile_edge_color.rs` gives
  the existing "is not a colour" error for an 8-digit hex color, and
  otherwise reads the color as `resolve` does. `resolve` is unchanged, so
  the swatches the dialogs draw with it show such a color by its RGB as
  before.
- Each of the four dialogs' OK checks the color with `checked` first, and
  leaves the dialog open with nothing changed. Tile Edge Color and Gap
  Options already refused `#rgba`, which `from_hex` does not read. Live
  Paint Selection and Live Paint Bucket used to ignore a color they could
  not read, such as `#f008`, and apply their other fields; their OK now
  refuses it.
- With Preview on, Gap Options sends no color for a `#rrggbbaa` value, so
  the groups keep their own color, and the previewed gaps draw in black.

Docs: the params text, docs/mcp.md, docs/control-protocol.md and
docs/target-app-parity.md.
2026-11-04 18:29:13 +07:00
dotCooCoo f65cd179f8 Docs: re-wrap the select.same paragraph in docs/mcp.md 2026-11-04 18:29:09 +07:00
dotCooCoo 8762242dfe Select: describe which object Same Symbol Instance compares with
The params text of select.same.symbolInstance, docs/mcp.md and
docs/target-app-parity.md now say that the object compared with can be
of any kind (a group member selected on its own, or an object that is
not a symbol instance, which leaves the selection empty), and that new
art on a locked artboard is not passed over while it stays selected.
A test covers the three cases.
2026-11-04 18:29:09 +07:00
dotCooCoo c24c06ef7f Direct Selection: a marquee over a long path tests its segments without building a path for each
The marquee's segment test built a two-anchor path for every segment and ran
hit::intersects_rect on it. It now skips a segment whose anchors and handles
all lie past one side of the marquee, and tests the rest directly with the same
bounds and edge checks, so it selects the same segments.

A marquee over 10,000 anchors, press to release (anchor_bench, median of 7):
one open path of 200,000 anchors 84.9 ms -> 24.1 ms, 2,000 closed paths of 50
anchors 27.5 ms -> 13.5 ms, one closed path of 50,000 anchors 14.6 ms -> 8.5 ms.
2026-11-04 18:28:47 +07:00
dotCooCoo f0f19077df Document Color Mode: convert reusable paints and restore them with Undo
Squashed from #4517 onto main.
2026-11-04 16:55:43 +07:00
dotCooCoo 3fbdf72231 Docs: the long-stroke line names the strokes of path objects 2026-11-04 16:55:30 +07:00
dotCooCoo 676cc0ee8e Render: a long stroke is outlined only near the view after an edit
The renderer outlined the whole stroke of an edited path on every frame,
so dragging one anchor of a path with many anchors re-outlined every
segment. A stroke line of more than 1,024 elements without dashes or a
width profile is now outlined only for the segments within the stroke's
reach of the view, inflated by the view's own size on each side. The
cached outline keeps that region, and a frame outside it outlines the
stroke again. Closed subpaths that a wide stroke crosses over stay whole,
and a cut closed subpath is walked from a removed segment so no cut lands
where it starts and ends. The pixels are the same.

At 1600 x 1200, the frame after one anchor moves takes 28 to 30 ms
instead of 103 ms on an open path of 200,000 anchors, and 10 ms instead
of 30 ms on a closed path of 50,000 anchors (the new anchor_bench
example: cargo run --release -p vectorcraft-engine --example anchor_bench).
2026-11-04 16:55:30 +07:00