- Fit and the end of the path use how far a tile reaches along the path: an upright tile on a vertical path ends 15 px
past its centre for the 40 x 30 probe, not 20.
- Fit stretches the steps only as far as every tile still ends at or before the path's end, so shrinking tiles (Scale
progression below 100 %) no longer reach past it.
- Tiles out of reach of the painted area are skipped (a run at a steady size in one jump) and keep their number and
place, so spacing, progression and mirroring stay as on the whole path: a path starting far off the canvas no longer
spends the tile limit there and paints nothing.
- A path that needs more than the 100,000-tile limit over the area is refused with a message, rather than filled part
of the way and reported as done.
- The per-tile colour drift is worked out once per tile, not per pixel.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The range of dilation steps came from the painted rect, so a small selection dropped enlarged copies that still cover
it (a translucent tile's centre pixel changed), and type 6 numbered its copies from the largest step, so the same copy
drifted to another colour when the range changed. The range now comes from the canvas (with the area), and dilated
copies take their own step as the number for the colour drift; the drawing order stays as it was.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A long subpath far off the canvas took nearly all the tiles (and swamped the visible line's share of the arc length),
so the visible line got none. The path's pieces are now clipped to the area grown by Max distance and the largest
tile's reach before the tiles are spread over them; without a path nothing changes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each turn of the spiral now offers only the tiles within reach of the
pixel, found by the law of cosines over the turn's radius band, and the
turns are walked lazily from the outside in. Past the try limit the
topmost tile whose centre lies within half the tile's shorter side,
which covers the pixel however it is turned, stands in, so a covered
pixel is never left transparent.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Edit > Fill > Pattern > Script > Place Along Path lays the pattern tile
along the path selected in the Paths panel: tiles centred on the path,
the first on the start point, turned with the path, a step of the tile's
shorter side plus Spacing apart, placed while they end before the path
does, every other tile mirrored with Alternate patterns. The dialog has
the 10 controls with their check boxes and greying rules; without a
selected path the fill is refused with "No path selected" and the dialog
does not open. Path sampling by arc length lives in the vector crate.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fill > Pattern > Script > Symmetry Fill repeats the pattern tile about the
canvas centre (the selection's centre with one) by one of 33 symmetry
types: line and point reflection, 4-fold rotation, translation, glide
reflection, four dilations, the seven frieze groups and the 17 wallpaper
groups. Type 1 matches the measured two mirrored tiles; the factory P6M
fills the area with 6-fold turned and mirrored copies.
The scripted-pattern module gets one render dispatch that edit.fill and
the dialog preview share; the script dialog gets the Symmetry type list
and the translation rows.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A tile that covers a pixel but is transparent there counted toward the
1024-layer cap, so with a mostly clear pattern at the largest overlap the
cap ran out before the tiles that show at that pixel were reached and the
pixel stayed empty. Only visible samples count now; a separate, larger
visit cap keeps the work per pixel bounded. Applies to Brick Fill and
Cross Weave alike.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Edit > Fill > Pattern > Script > Cross Weave weaves the pattern tile in a
basket weave: square cells of the mean tile side plus Spacing alternate
between a flat and an upright tile like a checkerboard, leaving a 5 x 5
transparent hole at every 35 px grid point for a 40 x 30 tile, each tile
turned half way or not at random (repeatable by seed). edit.fill and the
dialog preview both lay scripts out through one render() in
scripted_pattern.rs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fill > Pattern > Script > Spiral lays the pattern tile along a spiral
around the canvas centre: rings one tile height plus Ring spacing apart,
tiles one tile width plus Pattern spacing apart along the curve, turned
with the curve unless Keep pattern upright is on. The script dialog gets
check box rows, and one render entry point serves the engine and the
preview for every script.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Random Fill scatters the pattern tile at random places, sizes (between
the two scale factors) and, with Rotate pattern on, angles over the fill
area, or within Max distance of the selected path. edit.fill takes the
Paths panel selection as `path`; the script dialog greys Max distance
from path without one.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The tile extent now uses the pattern scale rounded to f32, as Placement maps
with, so a pixel on a scaled tile's edge is found and painted.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each row's covering tiles are now worked out from the turned tile rectangle
around the pixel, so no covering tile is skipped behind far-away candidates;
the work limit counts only tiles composited into the pixel. Without a colour
or brightness drift a tile keeps its colour unclamped (float patterns past 1).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fill > Pattern gets a Script check box and list (Brick Fill, Cross Weave, Place
Along Path, Random Fill, Spiral, Symmetry Fill). OK with Script on opens the
script's dialog: live preview, Preset (Default / Custom), a field and slider
per value, OK / Reset / Cancel. edit.fill takes `script` and the script's
values; Brick Fill lays the pattern out in rows with every second row shifted.
The other five scripts answer "not supported yet".
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Only Softer with Source Edge was measured. The issue's rules keep today's
behaviour for unmeasured cases, so the square root now applies to that
case alone.
Fixes#14926. The shared effect-noise law (#15188, #15197) leaves 244 of the
issue's 1620 band pixels without glow at Noise 50; the reference application
shows 343. Inner glows now feed the law the square root of Noise, which keeps
Noise 0 and Noise 100 unchanged and gives 342 px at Noise 50. Outer Glow and
both shadows keep the shared law.
An Anti-aliased Satin with the Gaussian or Ring contour takes both of its
shifted copies from the shape a third of a pixel towards the top-left
(satin_aa_shift), the offset the Inner and Drop Shadow measured: the whole
pattern moves up, its Distance stays. Linear, unmeasured contours and
Sizes whose blur is the identity keep today's map bit-for-bit. The GPU
satin builder takes the same offset on the same gate.
The Drop Shadow now takes the same third-of-a-pixel source offset the
Inner Shadow takes since #14934, through the same aa_shift gate (Gaussian
contour, no dilating Spread, a blur wider than the identity), on the CPU
(shadow_map) and the GPU map program (B::shadow). On the issue's document
the edges land within 2 levels of the measured profiles; the flag off
keeps every map bit-for-bit.
Blend Text Colors Using Gamma was a 1.0 to 2.2 slider where 1.0 meant off, so turning it off and on lost a custom value. ColorSettings now keeps the field's value (blend_text_gamma, 1.00 to 3.00, two decimals) and the box (blend_text_gamma_on) apart; text_gamma() is what the compositor blends in (1 while the box is off), and the compositor takes up to 3.00. edit.colorSettings still takes a bool for blendTextGamma (the box alone) or a number in range (the value, and the box checked), plus blendTextGammaOn. The dialog shows the checkbox with the field beside it: typing a value checks the box, focusing does not, an out-of-range value alerts "A number between 1.00 and 3.00 is required. Closest value inserted." and an emptied field puts its value back. Settings saved as one number still load: 1 as the box off with 1.45, any other value as the box on with that value (#14243).
Past +110 the curve mixed the slider's own roll-off with the fixed +150
fit. The power roll-offs come closer to white than that fit past about
input 220, so the mix fell there as the slider neared +150: input 200
gave 253.55 at +134 and 253.32 at +150.
The ease now starts at +109.5, the last Hermite roll-off, which stays at
or below the +150 fit everywhere, and mixes from the roll-off held at or
below the fit. Both parts of the mix then rise with the slider, and the
curve reaches the +150 fit itself at +150, so the measured ramps are
unchanged.
The new test steps the slider one unit at a time from ±100 to ±150 and
checks every 8-bit input; it fails on the previous curve.
The Range 1 % fix from #15311 hardened an outer Softer glow only at
Size 10 / Range 1 %. Other small Ranges and other Sizes still reached
one pixel too far (Range 2: 96, 223 for 125; Size 20 at Range 1:
48, 175, 239 for 93, 201).
An outer Softer Edge glow with Spread 0 and the Linear contour now maps
coverage v through (v - floor) / (levels * (1 - floor)): the Range
rounded to a whole 8-bit level, less the tent's outermost tap when the
blur's box ends in half taps (even Sizes). That gives every measured
pixel of #15871 and #14958 (Range 1, 2, 25, 50, 100 at Size 10; Range 1
at Sizes 5 and 20) within 1 level. The GPU reads the same table through
glow_paint_lut. Inner glows keep today's table.
The PR snapped shapes with a per-edge heuristic (pixel_align.rs, dash-cap tie
rules, a PSD coordinate-frame field threaded through engine, format and caches),
defaulted the option to off, and renamed the existing Rectangle/Triangle
"Align Edges" checkbox to "Snap Bounding Box" next to a second checkbox.
The reference application fits the whole shape at render time: the bounds of
what it paints (fill, or the stroke's outer edge) get a whole-pixel left/top
(a half rounds up) and a whole width/height, and the path is translated and
scaled into that box. Fill and stroke take one transform; curves stay
antialiased; inner edges of several subpaths are not snapped.
- photocraft_vector::align_edges implements that rule; CompiledShape applies it,
so caches, the compositor, previews and extents agree; the fill/stroke split
under layer effects starts from the whole shape's transform.
- Removed pixel_align.rs, the rasterizer helpers it needed, the document-space
drag preview and psd_coordinate_frame (rounding the bounds absorbs the PSD
quantization it was for).
- One Align Edges checkbox (ToolOptions::align_edges, stored and scripted as
useAlignedRendering, older align_edges still read) on every shape tool and the
Pen, on by default and after Reset Tool; it snaps the drag and sets the layer.
- PSD sn2P: written as 1 when on and left out when off, as the reference saves it.
- Dropped the dead path.set param, moved the control-protocol paragraph,
rewrote docs/pixel-aligned-strokes.md, reverted the unrelated raw, font,
Cargo and test-harness changes.
- Tests reproduce the measured cases (rectangles at .25/.4/.5/.6/.75, ellipse
extremes and curve symmetry, 1/2/3 px strokes, rotated rect, Pen triangle,
two subpaths, toggle off, stored path unchanged, one checkbox, Reset Tool).
Co-Authored-By: superplay2021 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Edit > Define Pattern composites the area in the document's pixel format, which stores an Indexed Color document expanded to RGB. Nothing on Pattern said where the tile came from, so a pattern taken from an Indexed image was indistinguishable from an RGB one, and a tool that cares about the difference had nothing to read.
The new field names the source mode. The pixels, the id and what the pattern library lists stay as they were. A pattern read from a file records no source: a .pat or PSD block says what its pixels are, not which document they came from. The library index and .pcraft carry the field, so a defined pattern keeps its source across a restart or a save; files written before it read as no source.
Main's engine split step 7 moved the paint modules to crates/engine-paint and
the pattern mode tests to the engine crate's tests/it:
- cmd/fill_cmds.rs was deleted from engine-core (git saw no rename): Edit >
Fill's pattern tile is built in PatternSpace::of_pixels(doc) in
crates/engine-paint/src/cmd/fill_cmds.rs.
- cmd/paint_cmds.rs followed its rename.
- pattern_mode_tests.rs is crates/engine/tests/it/paint_in_pattern_mode.rs:
the tests this branch added start from the facade's Session::new(), which
installs the commands, like the two that moved.
# Conflicts:
# crates/engine-core/src/cmd/fill_cmds.rs