Commit Graph
10321 Commits
Author SHA1 Message Date
dotCooCoo ecb2fbe609 Revolve: the search for holes looks only at contours near each point
Mesh export tested the middle of every segment against every closed contour's bounds, so a profile of thousands of separate contours took hundreds of millions of comparisons before the work limit counted any. The closed contours now go in a grid over their bounds, a point is tested only against the contours of its cell, and placing a contour in a cell and each candidate looked at count toward the limit.
2026-11-09 18:12:27 -08:00
dotCooCoo d8d73495bb Revolve: a group member's blending mode applies to its surface
A member of a group with Revolve drew its surface in Normal mode whatever its own blending mode or that of a group it is in. Each mode now applies once, to the member's surface or to the surfaces of the group that has it, nested as the groups are. Expand Appearance keeps every face of a blended member.
2026-11-09 18:05:17 -08:00
dotCooCoo cddebdf7f6 3D: a group's fill or stroke takes no 3D effect
Revolve, Extrude & Bevel, Inflate and Rotate on a group or layer draw only as the group's own effect. On the group's fill or stroke they drew nothing, yet effect.apply and effect.setParams accepted them. Both now refuse that placement.
2026-11-09 17:51:22 -08:00
dotCooCoo 32ddc21045 Merge main into fix/issue-3617 2026-11-09 17:39:37 -08:00
dotCooCoo bb142cc063 Revolve: the fills and strokes of one object share the paint-copy budget
Each fill or stroke with its own Revolve counted the copies of its paint from zero, so an object with several of them could draw past the 256 MiB budget. They now share one count, and past it the source path draws, as for the members of a group.

effect.apply and effect.setParams on a fill or stroke now check the Revolve in that item's paint, after the item's geometry effects before it, together with the object's other items that carry a Revolve. Before, they checked the object's top fill.

docs/revolve.md marks the axis position, type handling and member paint as VectorCraft's own rules, and docs/mcp.md says how the budget is counted.
2026-11-09 17:19:13 -08:00
BFlat bca98461c4 Merge pull request #6366 from dotCooCoo/fix/issue-5632
Part of #5632: Convert to Grayscale stores an image with one gray channel
2026-11-10 07:50:43 +07:00
BFlat c7c6c12ca8 Merge pull request #6364 from dotCooCoo/feat/command-param-schemas
Commands: the View commands check their params against machine-readable schemas
2026-11-10 07:42:57 +07:00
BFlat e64a5f1996 Merge pull request #6290 from addibble/type-3d-redraw
Canvas: a 3D effect changed on type or a group redraws where its solid was
2026-11-10 07:27:46 +07:00
dotCooCoo 7ff3d25697 Part of #5632: Convert to Grayscale stores an image with one gray channel
Edit Colors > Convert to Grayscale wrote the new image as an RGBA PNG, so
a PDF wrote it as DeviceRGB, in a CMYK document too. The image is now
stored as a gray PNG, with alpha only when some pixel is not opaque. Adjust
Colors with mode gray and convert does the same.

An RGB image whose pixels are already neutral now converts, and an image
already stored as gray with no visible change is left as it is.
2026-11-09 16:15:12 -08:00
dotCooCoo b07c808093 Revolve: type, groups and layers revolve, and the profile and face limits are higher
Type sweeps as its glyph outlines and stays editable. On a group or layer every visible member sweeps about one axis on the edge of the members' bounds together, each in its own paint.

A surface now takes up to 16,384 profile points and 163,840 faces. Curves take fewer samples, down to 4, when a surface passes those limits, and the command reports the failure below that, after the geometry effects before the Revolve and with the cumulative size of its paint copies counted. Mesh export turns the walls of holes toward them. Expand Appearance works on type with Extrude as well as Revolve.

Fixes #3617
2026-11-09 16:09:03 -08:00
dotCooCoo cf8b6cb3b8 Docs: the params text equals the text the schema writes
The params literals are kept in the source, and a test checks that each equals the text its schema writes.
2026-11-09 16:06:46 -08:00
Drew Dibble b242f5acf5 Fit to Artwork Bounds: a change in place is measured again; the fix's evidence names EPS export
A new test changes the document in place (Arc::make_mut, with no other
holder and no change of revision) and checks the answer is measured
again: keyed on the document's address alone, it would keep the old
answer. The kept answer's doc says what it holds after the measure,
and that the fonts set the bounds of all type. Should measuring ever
ask again while it runs, it is measured without being kept, rather
than borrowed twice.

The stack overflow fixed in d5d04f868 also hit EPS export, and the
parity rows now say so. Two test docs are corrected: the fill-only
clipping is an older bug on main, and the outline-view difference runs
both ways on a few dozen hairline pixels.
2026-11-09 16:50:36 -07:00
Drew Dibble a9a061c8a9 Merge main into type-3d-redraw
# Conflicts:
#	docs/target-app-parity.md
2026-11-09 16:36:25 -07:00
dotCooCoo 27c9fc8dd2 Merge main into feat/command-param-schemas 2026-11-09 15:16:23 -08:00
BFlat 25cfa9d3cf Merge pull request #6355 from dotCooCoo/fix/issue-6125
Fix #6125: raster exports keep a Screen glow on the bare page
2026-11-10 06:05:32 +07:00
dotCooCoo d186d73c42 Commands: a schema with no required parameter allows null params
The engine reads null params as {}, but engine.commands listed every
schema with the root type "object", so a client that validated a call
against the schema refused one the engine accepts. A schema with no
required parameter now has the root type ["object", "null"]. A schema
with a required parameter keeps "object", because the engine refuses
null params for it as a missing parameter. Nested objects are unchanged.
2026-11-09 14:56:42 -08:00
dotCooCoo 93f75def04 Merge main into feat/command-param-schemas 2026-11-09 14:38:20 -08:00
dotCooCoo 4ec99c7cd9 Commands: view.transparencyGrid lists session as what it writes
The grid is view state of each open document, with no undo step, so its schema's x-writes is session rather than the default document. A test pins x-writes for all six View commands, and the level 1 schema hash is updated.
2026-11-09 14:37:28 -08:00
BFlat 8591637999 Merge pull request #6359 from ruchirguitar/g2-effect-gallery-preview
G2: Effect Gallery thumbnails and an in-dialog preview
2026-11-10 05:33:33 +07:00
BFlat 39c1f0283f Merge pull request #6360 from dotCooCoo/fix/touchpad-ctrl-zoom
Canvas: Cmd/Ctrl-wheel input finer than a whole notch zooms; only whole notches scroll sideways
2026-11-10 05:28:23 +07:00
dotCooCoo 2e6ba25598 Commands: parameter schemas cover every route, bound hostile values and translate their errors
Check a new call's params against the schema in execute_spec, after the
key check and before the parser, and check every command.batch step
before the first one runs. menucmds::run_raw and the two other direct
runs go through the same check. Saved steps keep keys the schema does
not name and have the values it names checked.

Limit nesting to 16 levels, cut error text and paths to a fixed length,
and copy nothing before it has passed. Treat a whole number written
with a fraction as an integer. Check declared defaults and duplicate
names once at first use.

Give the five schema errors rows in the 22 complete-message catalogs.
2026-11-09 14:19:22 -08:00
Drew Dibble 59cc303912 Canvas redraw: the stack overflow fix's evidence, and two tests' known differences
- The parity rows say what the fix covers: a 3D effect on a fill or
  stroke that builds nothing overflowed the stack with no effect of the
  object's own too, on the canvas, in Object › Rasterize and in raster
  exports.
- The builds-nothing test says the fill-only difference (a raster
  effect clipped to the path, cutting Roughen's spikes, when drawn
  without the 3D effect) is an older bug, not the design.
- The traced-shape test says why its area is bounded rather than drawn
  again: a partial render in outline view differs from the whole by one
  in alpha on 37 pixels, older than the test and unrelated to the edit.
- A doc comment rewrapped.
2026-11-09 15:13:42 -07:00
Drew Dibble 78b31831c2 Artboards: Fit to Artwork Bounds' kept answer kept by the document, with the plug-ins and fonts it reads
The answer whether Fit to Artwork Bounds has art to fit moves from a
function-local thread_local to DocState, beside any_empty_artboards, and
drops with the document. It is kept for that version of the document
(held weakly, as any_empty_artboards holds its own) and the artboards
asked about, and measured again when the installed plug-ins, whose
effects draw art, or the installed fonts, which set type drawn by its
effects' art, change: their generations are an explicit input of the
measure. A change of the selection or the view keeps it.

The test counts the measures, as the Delete Empty Artboards check's
does: a later frame, select.set and a view change keep the answer; an
edit, other artboards, and each generation measure again. Taking any
part out of the key fails it.
2026-11-09 15:13:41 -07:00
dotCooCoo 5eb6b62632 Flatten: blend modes do not read the white under the art
Flatten Transparency composited each region over white, so a blend mode
on the bare page read that white. Raster renders now draw their
background under the finished art, and the flattened color no longer
matched them: a Color Burn object on the bare page flattened to white
and rendered in its own color. The region now composites the art alone
and puts the white under it.

- Tests that relied on the white under the art now draw art under the
  style (`every_builtin_style_paints_visibly_on_a_rectangle`) or compare
  only whole-pixel pans with a fresh render
  (`a_coarser_glow_kept_whole_draws_after_a_pan_as_made_again`).
- New tests cover every blend mode on white and blue backgrounds, a
  thumbnail and the ink planes with a Screen glow, and
  `over_background` at background and pixel alpha 0, 128 and 255.
2026-11-09 14:13:08 -08:00
dotCooCoo 39d538dadf Canvas: Cmd/Ctrl-wheel input finer than a whole notch zooms
With Scroll Sideways with Cmd/Ctrl + Wheel on, wheel() turned all
Cmd/Ctrl wheel motion into a sideways scroll unless it arrived as a
pinch event. A wheel turn now zooms about the pointer once it holds an
event from a trackpad source, point deltas from an unnamed source in the
desktop app, or line deltas that are not whole notches. Whole notches
keep scrolling sideways, and the option's default is unchanged. The same
rule applies with Zoom with Mouse Wheel on. egui-winit reports a wheel
source only on macOS, so the delta decides elsewhere.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-09 13:48:07 -08:00
ruchirguitarandCursor e1b73f38bc G2: Effect Gallery thumbnails and an in-dialog preview
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-10 03:12:54 +05:30
dotCooCoo 1796c77765 Merge main into feat/command-param-schemas 2026-11-09 13:31:22 -08:00
BFlat e6680d6979 Merge pull request #6327 from thisisgomaa/fix/pdf-import-actualtext
PDF import: preserve authored text in ActualText spans
2026-11-10 04:23:23 +07:00
Drew Dibble 758a31890d Artboards: Fit to Artwork Bounds' kept answer follows the document's version and the plug-ins
fit_has_art kept its answer for the document's uid and revision, which
don't follow every change of what it measures: a document's tab coming
to the front replaces it with its composite fonts synced, and a plug-in
installed or removed changes what its effects draw, with no revision
moving either time. The answer is now kept for that document Arc, held
weakly as DocState::any_empty_artboards keeps its own, and the artboards
asked about, until the plug-ins' revision moves. A selection or view
change keeps it.

The test replaces the document with art on an artboard, its revision as
it was, and asks again: kept by revision, the answer was stale.
2026-11-09 14:18:05 -07:00
Drew Dibble bd9f6a04ef Canvas redraw: review follow-ups to the strengthened tests
- A 3D effect that builds nothing: af754bcb2 said the object draws exactly
  as without it under a Drop Shadow or Gaussian Blur. That holds only for
  a stroked object. With only a fill, the raster effect draws from the
  art made for the object, where without the 3D effect it is clipped to
  the path, so Roughen's spikes differ: the earlier wording was right.
  The test keeps the stroked cases exact and restores fill-only cases
  with a Drop Shadow and a Gaussian Blur, which differ in under 4% of
  the pixels and nowhere inside the path. Its reach check compares with
  the object drawn without its raster effect, since Roughen alone
  reaches past the path.
- The Vector Halftone test's bounds are a consistency check, and only
  holding no art tests the branch: its doc no longer says no solid is
  built (the free measure's halftone arm builds one). The overprint
  test's area check is labeled likewise.
- Recoloring a traced shape bounds the area the renderer that drew the
  trace object measures too, inflated by half the stroke and a pixel.
- The let-go test pins the nothing-to-draw branch: no frame, whole or
  part, began since the measure.
- The parity doc's feature row names the stack overflow fix and its
  test; a group test's doc says what its fixture holds.
2026-11-09 14:18:05 -07:00
dotCooCoo faea85f772 Fix #6125: raster exports keep a Screen glow on the bare page
A raster export filled its background into the page before the art, so
blend modes read it as art underneath: an Outer Glow in Screen mode, the
default, turned white on a white background and was missing from PNG and
JPEG files while the canvas showed it. Blending against nothing also
differed from the canvas for Difference and the other modes.

The background now goes under the finished art, in frames and in object
thumbnails. A blend mode reads only the art below it. A white object
under a Difference object still inverts.

Page Isolated Blending no longer changes a raster export on a bare page.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-09 13:02:28 -08:00
BFlat a90d7bcec1 Merge pull request #6346 from slafebre/fix/6140-extrude-refusal-reason
3D effect dialogs say why a selection is refused and turn OK off (#6140)
2026-11-10 03:47:25 +07:00
Ahmed Gomaa 323b3385bc Merge remote-tracking branch 'upstream/main' into fix/pdf-import-actualtext 2026-11-09 22:42:50 +02:00
dotCooCoo f688129ef2 Merge main into feat/command-param-schemas 2026-11-09 12:34:02 -08:00
Drew Dibble 2fcaaedb2d Merge main into type-3d-redraw 2026-11-09 13:20:30 -07:00
Drew Dibble d0b26c0772 Canvas redraw: the let-go test receives the worker's job; the fit cache's key documented
Review follow-ups:
- The test that art measured for an edit not drawn on this thread is let
  go first checks that measuring the edit through the canvas's renderer
  holds art, so a measure that held nothing can't pass it. Its worker is
  a test channel whose job the test receives, in place of a real thread's
  pending job, which a finished frame could clear. Taking out either
  let_go_of_measured fails it.
- fit_has_art's comment says why its one kept answer can't be stale: a
  document's uid is never reused in the process and its revision only
  moves forward.
2026-11-09 13:19:55 -07:00
BFlat 9394a43e58 Merge pull request #6347 from jmverges/fix/6314-pdf-separation-images
PDF import: Separation images keep their ink (#6314)
2026-11-10 03:18:58 +07:00
Drew Dibble af754bcb23 Canvas redraw: the renderer's measure tests check what their names say
Review follow-ups:
- The tests that a group with effects of its own is measured once a pass
  plant its kept bounds after the first artboard and read them back over
  the next two, so a measure made again fails. Its solid is built by the
  free measure, which the renderer's three_d_built doesn't count.
- The budget test checks that every object, past the budget too, is
  measured as the free measure does and draws as a new renderer draws it.
- A 3D effect that builds nothing draws the object exactly as without it,
  with a Drop Shadow or Gaussian Blur too, which reach past the path. The
  doc comment said those differ past the path; they don't.
- The brush widened in view first checks that the wider brush draws
  otherwise.
- Recoloring a traced shape changes no more than the shape, its stroke
  and a pixel's anti-aliasing.
2026-11-09 13:13:17 -07:00
Drew Dibble 049f8c3963 Canvas redraw: tests for edits measured under overprint, with Vector Halftone, and to the instance symbol editing came from
Review follow-up: these three branches of what a renderer measures had no
test. Under Overprint Preview a renderer measures an edit as changed()
does and holds none of the 3D art it made for it; a 3D effect with
Vector Halftone is measured by the free measure, with no solid built and
no art held; and on screen in symbol editing mode, an edit to the
instance it was entered from changes nothing. Each test fails with its
branch taken out.
2026-11-09 13:10:41 -07:00
Ahmed Gomaa 09d5322283 Merge remote-tracking branch 'upstream/main' into fix/pdf-import-actualtext 2026-11-09 21:59:07 +02:00
Sven Lafebre 619cd7aa0c A 3D dialog's Preview-off try waits for another interaction to end (#6140)
begin_interaction joins an interaction already in progress, so the
try replaced that interaction's preview and then cancelled it.
2026-11-09 20:58:11 +01:00
BFlat 2318ba0457 Merge pull request #6341 from Hassan1305/feat-4936-auto-spell-check
Part of #4936: Auto Spell Check underlines the unknown words of the type
2026-11-10 02:31:29 +07:00
Sven Lafebre 05ada26dc1 3D effect dialogs say why a selection is refused and turn OK off (#6140)
The 3D effects refuse objects they can't build from, such as clipping
groups and blends under Extrude & Bevel. The preview failed, OK stayed
on and only repeated the error in a status-bar line that gets cut off,
so the dialog looked broken.

The dialog now shows the command's reason under Preview and turns OK
and Enter off while it holds. With Preview off, it tries the values
once when they change and rolls back, so the reason still appears.
2026-11-09 20:31:11 +01:00
HassanKhan f8ca2c09cb Merge remote-tracking branch 'upstream/main' into feat-4936-auto-spell-check
# Conflicts:
#	docs/gaps.md
#	docs/roadmap.md
#	docs/target-app-parity.md
#	docs/type-parity.md
2026-11-09 23:50:29 +05:00
Ahmed Gomaa 8692b090d0 PDF import tests: ActualText geometry fixtures embed Source Sans 3
Three geometry fixtures used unembedded Helvetica, so the reader fell
back to Source Sans 3 widths where Helvetica is not installed (CI) and
fitted the line length instead of placing glyphs exactly; the following
"C" then landed about 3 pt off its untagged comparison. Embed the
bundled Source Sans 3 with matching explicit widths. Every assertion and
the 0.05 pt tolerance are unchanged.
2026-11-09 20:49:36 +02:00
Ahmed Gomaa 9fda083329 Merge remote-tracking branch 'upstream/main' into fix/pdf-import-actualtext 2026-11-09 20:49:32 +02:00
HassanKhan ff1079b3ce Auto Spell Check: underline the unknown words of the type on the canvas (part of #4936) 2026-11-09 23:41:41 +05:00
jmvergesandClaude Opus 5.5 ca59598cd7 PDF import: Separation images keep their ink (#6314)
An image in a Separation color space opened as an RGB image: its spot ink
was lost (no plate in Separations Preview), and Fill and Recolor Artwork
didn't reach its color.

It now opens as a grayscale image of its tints (white where it lays no
ink, black at 100 %, its Decode array applied; 1 to 16 bits a sample, or
one gray channel from its JPEG, CCITT, JBIG2 or JPEG 2000 decoder),
colorized by its ink at 100 %: the spot swatch, a process plate's CMYK
color, or Registration. Its mask becomes its opacity mask, as a CMYK
image's does. The ink is found by the image's color space among those the
file defines, once per image. The ink None, an ink whose color can't be
told, images inside an alpha soft mask, inline images and DeviceN images
open as before; samples that can't be read open in RGB with a warning, and
the ink gets no swatch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 18:39:46 +00:00
BFlat 9dc4c33529 Merge pull request #6330 from thisisgomaa/fix/pdf-export-mark-text
PDF export: letters with marks are written once in the text layer
2026-11-10 01:29:17 +07:00
BFlat 9cf3a4e5b6 Merge pull request #6334 from JonRC/fix/eps-missing-fonts-of-the-document
EPS import names the missing fonts of the document's type (#6326 follow-up)
2026-11-10 00:49:58 +07:00