Commit Graph
1663 Commits
Author SHA1 Message Date
Taha-Mahmoodi e2828bc064 Dialogs: keep dialog open on invalid Enter commit and prevent lock nesting in numeric widget 2026-10-30 16:55:55 +07:00
Taha-Mahmoodi 5da8c8e495 Numeric: clamp committed values in point units, schedule rejection highlight repaint, and update roadmap/area evidence 2026-10-30 16:55:55 +07:00
Taha-Mahmoodi 418f1bffc3 Fix #4638: clamp bounded effect length inputs on commit and reject invalid input visibly
In effect dialogs (like Color Halftone), length fields with defined bounds
(e.g. Max Radius 4..127 pt) were previously checked only after num_field
returned, leaving the field's temporary buffer holding the un-clamped string
(e.g. '0.5 px'). Subsequently entering invalid text caused the field to
fall back to that sub-minimum buffer.

- Added num_field_within to pass effect parameter bounds directly to unit_field.
- When committed, clamp the parsed value within bounds and update the field
  buffer to the formatted clamped value so the UI reflects what is applied.
- When invalid text is committed, clear the invalid buffer and trigger a
  one-frame border highlight so invalid input is rejected visibly.
2026-10-30 16:55:55 +07:00
bflatastic 354b0a48f2 Docs: restore the Color Effects add-on section's spacing and code block 2026-10-30 16:02:27 +07:00
bflatastic 1ca3db1b51 Add-ons: Smart Pen — draw and edit paths with one tool, panel
A built-in add-on under Object › Plug-ins › Smart Pen:
- The Smart Pen Tool draws and edits Bézier paths without switching
  tools: a click adds the next segment straight or curved (a panel
  toggle; Tab flips the segment being placed or the last one), a drag
  makes a smooth point (Alt breaks the handle, Shift snaps to 45°, Space
  moves the point), a curve after a straight segment joins it tangent.
- On existing paths it selects and moves points, removes a point keeping
  the shape (Alt-click), toggles smooth/corner (double-click), drags
  handles, reshapes a segment by dragging it and inserts a point on it
  (Alt-click); it closes, continues and joins open paths.
- The Smart Pen panel: next segment straight or curved, remove points
  keeping shape, make smooth, make corner, retract handles, close or
  join.

The tool stays out of both toolbars as shipped; the All Tools drawer
lists it under the add-on's heading. Commands are addon.pen.*; the
existing Pen tool, commands and menus are unchanged.
2026-10-30 16:02:27 +07:00
bflatastic dc7f147608 Add-ons: Path Precision Tools — anchor eraser brush, extend path, measure, anchor inspector, crossings
A built-in add-on under Object › Plug-ins › Path Precision Tools:
- Anchor Eraser Brush: painting over selected paths removes the anchors
  under the brush that the outline can do without within a tolerance,
  refitting the handles beside them (Alt ignores the tolerance, Cmd/Ctrl
  deletes without refitting, pen pressure can scale the brush); one undo
  step per stroke.
- Extend Path tool: dragging an end of an open path carries it on
  straight, by stretching its last curve or along the circle it curves
  on, or shortens it back along itself.
- Measure & Inspect tool: drag to measure distance and angle; hover a
  path to read segment and path length, area, curvature, tangent and
  anchor angles and handles, in the document's units.
- Anchor Inspector panel: the selected anchor's position and handles as
  numbers, with Make Smooth (auto-smooth rule), Make Corner, Equalize
  Handles, Remove Points Keep Shape, Add Points and three ways to close.
- Add Points at Crossings and Split at Crossings.

The tools stay out of both toolbars as shipped; the All Tools drawer
lists them under the add-on's heading. Commands are addon.pathtools.*;
the existing commands, tools and menus are unchanged.
2026-10-30 15:20:38 +07:00
bflatastic 427752ce65 Add-ons: Color Effects — live exposure, desaturate and invert, apply as filter, panel
A built-in add-on in Effect › Color Effects and Object › Plug-ins › Color Effects:
- Exposure (stops of linear light, offset and gamma), Desaturate and
  Invert Colors as live colour adjustments, evaluated in stack order with
  those of Effect › Color Adjustments.
- addon.color.filter applies any colour adjustment to the colours
  themselves, through the Edit Colors pass, as one undo step.
- A panel picks an adjustment and its values, then adds it as a live
  effect or applies it as a filter.

The add-on lives in its own modules (effects, engine and ui-egui addons
folders) and leaves the existing effects, commands and menus as they
were.
2026-10-30 14:14:33 +07:00
bflatastic ac85b529fe Add-ons: Artwork Cleanup — simplify keeping shape, health check, deep ungroup, rejoin
A built-in add-on under Object › Plug-ins › Artwork Cleanup:
- Simplify Anchors (Keep Shape) removes anchors while the outline stays
  within a tolerance, optionally keeping sharp corners.
- Document Health Check finds and fixes 16 kinds of problems in the
  selection or the document (stray points, duplicate and collinear
  anchors, tiny handles, nearly closed paths, needless groups, compound
  paths and clipping groups, unpainted and invisible objects, duplicate
  objects, art off every artboard, empty artboards…), with Show, Fix
  Selected and Fix All, each fix one undo step.
- Deep Ungroup and Rejoin Path Pieces.

The add-on lives in its own modules (pathops, engine and ui-egui
addons folders) and leaves the existing commands, tools and menus as
they were.
2026-10-30 13:11:20 +07:00
bflatastic 433dc7d91a Docs: spinner arrows repeat while held (#4267) 2026-10-30 11:04:29 +07:00
bflatastic 53d3ff72b2 Docs: the Control bar's symbol Replace menu (#4121) 2026-10-30 11:04:25 +07:00
bflatastic cdc8cb88c9 Docs: the Color Mixer popover's menu (#4249) 2026-10-30 11:04:21 +07:00
bflatastic eeb6a2dcfc Touch: a second finger cancels a tool gesture the first one started; the pinch pans and zooms (#4198) 2026-10-30 11:04:18 +07:00
Don Omondi b8886d3da4 .ai import: try a placed file at its box's corner when the layers differ
A placed (linked) file is put where its matrix takes the canvas point of
art space's origin (the centre of %AI3_TemplateBox). In many files the
matrix takes the corner of the box the file is written with instead, so
the image landed far off its artboard, the layers differed from the
page, and the file came in as its PDF part.

The reader keeps that second placement for each placed file where the
two differ. When the layers don't draw as the page, they are compared
again with those files at their box's corner, and used if that draws
as the page. Files whose layers already match keep their placement.
2026-10-30 09:46:56 +07:00
bflatastic beb0ae6515 SVG export: rectangles, circles, ellipses, lines and straight paths as SVG shape elements (#4652) 2026-10-30 09:45:59 +07:00
Don Omondi 380a3cfcff .ai import: a placed file on %_ lines no longer drops the layers
A placed (linked) file written as an object's editable copy, on %_
lines after its drawn look, has its %AI5_BeginPlace and %AI5_EndPlace
markers on those lines too. The lexer dropped comments after %_ that
don't start a section, so the placed file never began, the ~ that ends
it was an operator the reader didn't know, and the whole file came in
as its PDF part. The lexer now returns those two markers from %_ lines,
and the preview reader skips the %_ its header line starts with.
2026-10-30 09:01:24 +07:00
Don Omondi 43db0c00bc PDF export: gradient meshes as smooth Type 6 patch shadings
PDF export (and the PDF-compatible .ai it writes) cut each gradient mesh
patch into 8 x 8 flat-coloured quads. Viewers showed colour bands and
hairline seams between them, and files with many meshes became very
large and slow to write.

An opaque mesh is now written as one Type 6 (Coons patch) shading
(ISO 32000-1, 8.7.4.5.7) filling its outline, through the PDF writer's
MeshGradient: each patch blends its corner colours bilinearly, as the
canvas draws it. Colours go through page_color as other fills do, and a
mesh mixing RGB with other models goes through RGB. A mesh with
see-through points, an invalid one, or one past the coordinate range
keeps the quads.
2026-10-30 08:15:20 +07:00
Don Omondi 87cb19c589 .ai import: a file whose PDF part is an empty page opens from its editing data
Squashed from #4651 onto main.
2026-10-30 08:15:16 +07:00
Don Omondi 0f1b70f8b1 .ai import: a PDF part cropped to the art no longer hides the layers
A PDF-compatible .ai whose PDF part's pages are cropped to its art (each
page the box of all the art, the editing data's bounding box) rather
than to its artboards came in as that PDF part: the editing data's
artboard wasn't the page's size, so its layers were refused. With
several artboards every page held all the art, so the document had a
copy of everything per page.

When the artboard isn't the page's size but the editing data's bounding
box is, the layers are compared with the page on that box and keep
their artboards. The comparison of their art with the page still
decides whether they are used.
2026-10-30 08:15:04 +07:00
bflatastic 494de9dfa2 Guides: a ruler guide shows while dragged with Real-time Drawing off (#4646)
With Preferences > Performance > Real-time Drawing and Editing off, tool
previews are deferred to the release, so a guide dragged out of a ruler
(guide.add) or moved with a selection tool (guide.move) showed only its
position label until the button was released. Guide previews now always
apply as the guide is dragged: the guide is all such a drag shows.

#4646's units and guides lost on reopen don't reproduce for a native
file: a new millimetre document's ruler guides and units survive Save,
Close and Open in .vectorcraft, PDF, .ai and EPS (new regression test,
and live in the app with Background Save). An SVG saved without Preserve
Editing reopens in pixels with no guides, as the reporter saw.
2026-10-30 08:13:49 +07:00
bflatastic 8fcc58d134 Docs: a Direct Selection marquee selects the segments it crosses (#4654) 2026-10-30 07:13:52 +07:00
bflatastic 23ba6ae4c1 Path: Average & Join with a corner or smooth choice, Cmd+Alt+Shift+J (G1) 2026-10-30 06:37:12 +07:00
Don Omondi 2e3a4ec604 Fix #3911: EMF export writes a pattern fill as one shape per part of its tile
A pattern fill was written to EMF as every tile's art, each tile in a clip
of its own, with the brush made again for each part: a rotated two-colour
stripe fill of a 360 x 260 pt rectangle took 473 fills, 246 clips and
122 KB.

When the tiles can't overlap (a grid or brick tiling whose art stays in its
tile), each tile's clip is left out where what it clips lies inside it
already (a convex clip holding every control point of the fills), and the
n-th fill of every tile becomes one path. The picture is the same: the
tiles don't overlap, and the fill's own clip still trims them. That fill
is now 2 fills and 1 clip, 61 KB; unrotated, 99 KB becomes 33 KB.

Tiles that overlap, hex tilings, and tiles holding strokes, images or
clips that cut are written as before, their parts off the page left out.
2026-10-30 05:52:37 +07:00
BFlat 640131a053 Merge pull request #4640 from mockydevs/fix/ai-editing-data-by-memory-3510
Fix #3510: editing data past 512 MiB opens with its layers where memory allows
2026-10-30 05:35:05 +07:00
bflatastic bcd6f65369 Preferences: audit which options act (G12)
Every Preferences dialog option is read by shipped code, by its field or
its key, except five, each waiting on a subsystem of its own: Open
Documents As Tabs (documents in floating windows, G7), Units > East Asian
Type, Hyphenation > Default Language, Scratch Disks, and the legacy vector
clipboard. Highlight Alternate Glyphs, Real-time Drawing and the Devices
options, still listed as stored-only, act. Docs only.
2026-10-30 05:18:12 +07:00
Don Omondi 68ad249efd Fix #3510: editing data past 512 MiB opens with its layers where memory allows
A layered .ai or Illustrator EPS whose editing data (embedded rasters,
mostly) unpacks past 512 MiB opened as its PDF part or printed page, in
one layer, with "it decompresses to more than 512 MB" (#4628 on 0.17.0
hit the older 256 MiB limit the same way).

The limit is now an eighth of installed memory, from 512 MiB (what every
64-bit build read before) to 2 GiB: 1 GiB on an 8 GiB machine, 2 GiB on
16 GiB or more. Reading takes about as much memory again as the data
(1.1 GB of data with 24 embedded 4096 x 4096 images peaked 1.1 GB above
the start), so the ceiling keeps a small file that unpacks without end
from taking a large machine's memory. 32-bit and web builds keep 256 MiB.
vectorcraft_render::installed_memory exposes the reading the image cache
already sizes itself from.
2026-10-30 05:07:58 +07:00
Don Omondi 9095cdf926 Fix #4625: UI settings survive a relaunch and a second window
Two ways the next launch came back with settings from before:

- The workspace, panels, toolbars and other settings kept only in the UI
  state were written only on quitting (Preferences OK already saved at
  once, #1747). A session ended any other way lost them. The app now
  saves within 2 seconds of a change, and only when something changed.
- Each launch is its own process, so two windows are common (opening a
  second file from the file manager). A window wrote back the whole
  state it started from when it quit, so the one quitting last put back
  the settings it read at its start, even with nothing changed in it.
  A window now saves only what it changed since it last read or saved,
  merged into the file as it is: each UI field, and each engine
  preference on its own. A setting both windows changed takes the last
  save.

The status line, open dialog and other fields a start resets neither
trigger a save nor replace another window's.
2026-10-30 04:47:12 +07:00
Don Omondi 1c43827df1 docs: record #4469 in the UI history without touching the status line
Keeps this branch's doc change apart from the other open UI-parity edit, so
the two merge in either order.
2026-10-30 04:47:08 +07:00
Don Omondi 4fe7e0ae6b Fix #4469: Direct Selection's task bar offers the path's anchor actions
With the Direct Selection tool active (after the bar's Edit Path, or
switching to it) and a path selected whole, the Contextual Task Bar kept
the Selection tool's Edit Path, Offset Path and Simplify: its anchor
actions showed only for anchors picked out one by one.

The public overview lists, for a path the Direct Selection tool selects,
Simplify and the anchor actions. A path selected whole now offers Corner
and Smooth (path.convertAnchors converts every anchor of a fully
selected path), Connect for an open path, and Simplify. Remove Anchor
Points and Cut Path need anchors picked out and still wait for them.
Edit Path, which only switches to the tool already in use, is left out,
for compound paths too.
2026-10-30 04:47:08 +07:00
Don Omondi 6fe71df1cf Fix #4233: Direct Selection drags art onto Asset Export and the other panels
Art dragged off the canvas reached the panels (Asset Export, Graphic
Styles, Swatches, Symbols) only from the Selection tool: drag_art_out
checked for that tool by id. With the Direct Selection or Group
Selection tool the move stayed on the canvas, so nothing dropped.

Those tools now hand over a move too when every selected object is
selected whole (a press on its fill). A drag of anchor points or
segments, which they also call Move, stays a reshape and isn't handed
to the panels.
2026-10-30 04:47:04 +07:00
bflatastic f1211e7c89 Separations Preview: hidden plates leave raster images too (#4153) 2026-10-30 04:25:27 +07:00
bflatastic d56bbb49ff Gradient Mesh: select several mesh points; move, color and opacity reach them all (#4207, #4208, #4170) 2026-10-30 03:37:43 +07:00
bflatastic 5d4b4b9b35 Type: Character panel › Show Snap to Glyph Options (#4232) 2026-10-30 02:41:25 +07:00
wjrichardsandClaude Opus 5.5 1f6effa0cf Docs: G10 says plainly that Copy and Paste with other apps still don't work in the GNOME Flatpak
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 02:19:33 +07:00
wjrichardsandClaude Opus 5.5 c988af83b5 Linux clipboard: stop the retry storm
The Flatpak on GNOME has no X11 (fallback-x11 on a Wayland session) and GNOME offers
no data-control protocol, so arboard::Clipboard::new() failed every time. The handle
was kept only on success, so the background Paste check reconnected to the compositor
and logged a warning every 250 ms: 267k warnings in 18 h, the 16 MB log full in 3 h.

- A clipboard that can't be opened is tried again after 1 s, doubling to a minute.
  A Copy or Paste of the user's retries at most once a second.
- The outage is logged once (WARN) and its end once (INFO), across the UI's and the
  background check's handles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 02:19:33 +07:00
bflatastic 513b02233f Align: Align to Glyph Bounds for point and area type (#4231) 2026-10-30 02:01:58 +07:00
bflatastic c0bd20b6a2 Docs: cut the progress docs' status lines back to their latest change
Merges kept prepending each side's whole summary as "previously: …", so
target-app-parity.md's status line had grown to 66 MB (839 copies of its
Target clause), gaps.md's and ui-parity.md's to over 1 MB. Each status
line now names its latest change only, as the progress-docs standard has
it; the revision histories keep the earlier ones.
2026-10-30 01:46:33 +07:00
bflatastic e7f1f05ab4 Docs: Eraser pressure in the parity docs (#3961) 2026-10-30 01:13:27 +07:00
bflatastic 71fbdf5ff0 Eraser: Size follows the pen pressure too (#3961)
Eraser Tool Options' Size takes Fixed or Pressure and a Variation as the
Blob Brush's does: the tool records the pen, and path.eraseRegion outlines
the squashed drag at the pen's widths, stretched back to the tip's angle
and roundness. The pressure parsing and outline move to draw2's common
helpers, shared by both commands.
2026-10-30 01:13:20 +07:00
bflatastic 4a89ba84f8 Docs: Blob Brush pressure in the parity docs (#4590) 2026-10-30 01:13:20 +07:00
bflatastic c65286666c Blob Brush: Size follows the pen pressure (#4590)
Blob Brush Tool Options' Size takes Fixed or Pressure and a Variation, as
the brush options' Size does: with Pressure the brush is Size − Variation
wide where the pen presses lightest and Size + Variation where it presses
hardest. The tool records the pen pressure of each point and shows each
step of the drag as wide as the pen pressed there; path.blob takes
[x, y, pressure] points with sizeMode and sizeVariation and outlines the
stroke with that width profile. A stroke without pressure keeps the Size,
and Fixed with no variation stays the default.

https://helpx.adobe.com/illustrator/desktop/paint-and-fill/learn-painting-basics/blob-brush-options-and-best-practices.html
2026-10-30 01:13:13 +07:00
Taha-Mahmoodi 887328db03 Fix #4420: import attached recolor adjustment layers as color overlays
In Affinity Designer, Recolor Adjustment layers (RcRA) can be attached to
vector groups/shapes via AdCh. Lightness 1.0 recolors target elements to
white. Import visible RcRA layers as ColorOverlay effects and apply them
during node appearance evaluation.
2026-10-30 00:15:58 +07:00
bflatastic 5165b6eb1d Pathfinder: live compound shapes (Make, Shape Mode, Release, Expand Compound Shape)
Squashed from #4621 onto main.
2026-10-30 00:15:58 +07:00
dotCooCoo 1538733954 Images: a fill color colorizes grayscale and 1-bit images
Squashed from #4431 onto main.
2026-10-30 00:15:57 +07:00
dotCooCoo 567060393e Recolor Artwork and swatch libraries: parameters of the wrong form are errors
Squashed from #4492 onto main.
2026-10-30 00:15:56 +07:00
dotCooCoo d5cbeb6cc7 Direct Selection: a marquee selects area type's frame anchors
Squashed from #4435 onto main.
2026-10-30 00:15:56 +07:00
dotCooCoo f32699bea7 File formats: PCX (.pcx) files open and place
A new reader, written from the ZSoft PCX Technical Reference Manual, decodes
the run-length encoded scan lines of 1-bit images in the header palette's
first two colors (black and white when the version has no palette or the two
colors are the same), 1-bit images in two to four planes and 4-bit images
with the header's palette (the EGA colors for versions 0 and 3), 2-bit CGA
images in the colors that the header's CGA background and palette settings
pick, 8-bit images with the 256-color palette after the image data (gray
levels without one) and 24-bit images in three planes. The image is stored as PNG at the resolution of the header's HDpi and
VDpi fields.

Open and Place list PCX, and pasting a copied .pcx file and Glass's Load
Texture… read it by its header. A file of another depth or plane count, one
cut short and one whose pixels as RGBA pass the pixel allowance are refused
with a message before its pixels are decoded. The desktop packaging does not
associate .pcx files, and no export writes them.

Docs: docs/file-format-parity.md, docs/target-app-parity.md, docs/mcp.md,
docs/releasing.md.
2026-10-30 00:15:56 +07:00
dotCooCoo c3cd065ef3 Character and Paragraph Styles: Alt-click on New asks for the new style's name
Squashed from #4402 onto main.
2026-10-30 00:15:55 +07:00
dotCooCoo 0ee5fc0a9e Type: Cmd/Ctrl+Shift+U underlines, and Cmd/Ctrl+Alt+Shift+C and H toggle the line composer and hyphenation
Squashed from #4383 onto main.
2026-10-30 00:15:55 +07:00
dotCooCoo 316d28407f Window: Cmd+F6 and Cmd+Shift+F6 go to the next and previous document
Squashed from #4377 onto main.
2026-10-30 00:15:55 +07:00
VoiceLessQ ac3982c68a Windows: keep OpenGL for a GPU without Direct3D 12 and for a named adapter (#4150)
Follow-up to #4600, from its review. A start left OpenGL out whenever
Direct3D 12 listed an adapter, and WARP, its software adapter, is
always listed. So a GPU without a Direct3D 12 driver, which drew
through OpenGL before, now drew on the CPU. An adapter that
WGPU_ADAPTER_NAME named was left out too when it was an OpenGL one.

OpenGL is now listed when Direct3D 12 lists no hardware adapter and
when WGPU_ADAPTER_NAME is set. The Direct3D 12 check takes the shader
compiler the window does (WGPU_DX12_COMPILER, else FXC).
2026-10-29 23:14:58 +07:00