The cell-clipped dots split every elliptical arc at 45 degrees, and the
quadrants were joined with a zero-length line where they met on an axis.
A round dot that stays inside its cell had 8 curves and 3 extra anchors
instead of 4 curves, and the halftone's SVG export grew to about twice
its size.
- Arcs are split at 90 degrees, one curve per quarter turn.
- Quadrants and spot corners that meet at the same point are joined
without a line, so the join adds no anchor.
Tests: an unclipped Circle and Ellipse dot is 4 curves and no line, and
no dot shape repeats an anchor where its quadrants or corners meet.
Parse tests in the color crate looped over every id or label and parsed
it back. Blend modes, policies, harmony rules, recolor methods and WCAG
categories parse by looking the text up in that same table, so those
loops could not fail. They now parse representative ids, labels and
spellings, and the edge cases: "Color" next to "Color Burn", empty
text, and a label where only ids parse.
- default_swatches_parse read swatch.rs as text. It now checks the
built swatches: no two solid swatches share a color (a bad hex
literal falls back to black), and the Sunset and Ocean stops equal
the swatches their literals name.
- loads_system_cmyk_icc ran only on macOS and returned early without
the system profile. loads_icc_files_and_refuses_bad_ones runs on every
native target: a missing file is an I/O error naming the path, a file
that is not a profile is refused, and a built-in profile's bytes are
refused for their name.
- the_other_libraries_keep_classic_mixing_and_centered_midpoints is
removed: those libraries are built with Gradient::new's defaults.
- pixel_timings and bench_catalog_lookup are removed. They were ignored
and only printed timings.
- Checks over lists that can be empty now also check the count:
reverse and move keep every stop, a conic draws its 4 wedges, each
harmony gives at least two colors, the fit leaves patches out, the
wireframe draws edges, a flat warp keeps its anchors, a gradient
stroke has slices, and fitted dashes on a curve are drawn.
- the_effects_are_colour_adjustments_in_their_own_menu checks one
add-on effect and one effect outside it instead of every entry.
* fix(effects): draw dark dots in RGB Color Halftone
(cherry picked from commit 2dbe91af9f)
* Cover dark-on-light RGB halftone polarity
Updated halftone tests to clarify behavior regarding pixel brightness and dot sizes.
(cherry picked from commit babd60e332)
* effects: bound Color Halftone dots at full coverage
(cherry picked from commit 8fb0bf55607762df6e3acc2ed7ed37a643fea022)
* effects: describe Color Halftone ink coverage
(cherry picked from commit 0dbf12514095b6e12cb4414055d8ac47ee1fbcdc)
* Document the change to saved RGB halftones
* Test the bounded edge overlap of full halftone dots
---------
Co-authored-by: Mex <[email protected]>
Co-authored-by: dotCooCoo <[email protected]>
Circle, Ellipse and Diamond dots were sized by their own area and drew
past their cell once they reached its sides. In dark tones neighbors of
different sizes overlapped into notches and slivers where the dots
joined, and even full black left white specks at the cell corners.
These dots are now clipped to their cell and sized so the clipped dot
covers the tone. Neighbors meet along the shared side, and full tone
fills the whole cell. Light tones, where the dot stays inside its cell,
draw as before.
The Normal-mode test compares the default output with blurMode=normal,
so a fault both share passes it. Three checks now stand on their own:
- A 6-pixel row at radius 2 checks exact averages that a radius-1
search gives differently (105 and 115 at the ends instead of 110).
- A step from gray 100 to 200 at radius 12 checks that the pixels next
to the step read the box-blurred copy at threshold 50 and keep their
gray at threshold 30, that pixels far from the step keep theirs, and
that medium quality takes in less of the other gray than low.
- A one-column gray-200 stripe at radius 12 checks that a neighbour
whose own value is past the threshold stays out even when its
blurred value is within it.
- A 5 x 5 image at radius 2 checks that a pixel two columns away counts
and one two columns and two rows away (outside the disc) does not.
- A 7 x 7 image with default settings checks that the default radius
of 3 reaches a pixel three columns away.
- The radius-1 threshold test gives its last two pixels the same color
with alpha 255 and 128, so it fails if alpha is left out.
Seven render, brush and effects tests accepted results well away from
the value the code is meant to give:
- The two linear gradient tests now expect the value at the pixel
center (126 of 255, red 126 and blue 129) within 2 levels, instead of
12 or 20 around 128.
- The trimmed bristle strand test bounds the width ratio on both sides.
- The calligraphic roundness test expects the 0.1 pt hairline within
1e-6 pt.
- Pucker & Bloat expects the corner anchor at (12.5, 12.5) and
(-12.5, -12.5), not only the sign of the move.
- Exposure's offset and gamma checks expect the sRGB value within 1e-5.
- Smart Blur's checksums of earlier output are replaced by a 4 pixel row
whose averages are worked out by hand.
Each new assertion fails when the code it covers is changed (the
gradient stops shifted, the pressure, roundness, pucker, offset or gamma
factor changed, or the blur threshold widened).
quadrant() had local closures that repeated ellipse_arc() and segment().
It now calls those helpers, as elliptical_quadrant() does. The geometry
is unchanged.
Several tests returned early when the code under test gave back nothing,
so the regression they guard against passed. Each of those guards now
checks only what the host provides (an installed face, the bundled
fonts), and the output itself is asserted:
- PDF live text: the lam-alef face is no longer picked by whether its
type imports (#6072); Insert Kashidas asserts the kashida and the
imported type.
- Effects and Expand Appearance on type assert the outlines and the
drawn type when the default face is installed.
- The OpenType panel's Stylistic Sets test asserts sets with the
bundled fonts.
- Thumbnail worker tests assert that the worker starts; the memory
peak test asserts a reading.
- The json2 test checks the interpreter's Date, replace and RegExp on
every run, before looking for json2.js.
- Devanagari arrow keys and the Arabic narrow-area wrap assert the
layout they set up.
Below 50% the Elliptical dot was an ellipse clipped to the cell's
diamond, so from 40% horizontal neighbors met at a single point and at
50% the dot reached the vertical neighbors too. The dot is now an
ellipse as wide as its cell at 40%; past that it is clipped to the
cell's side, which makes a bridge to the next dot, and to a middle-tone
cut line through the quadrant's center, which keeps the short side
apart until 60%. Areas still match the tone.
Object > Vector Halftone and the live Vector Halftone effect get two
dot shapes that follow the classic spot functions. Euclidean dots are
round in the highlights, meet corner to corner at 50% as a checkerboard
and turn into round holes in the shadows. Elliptical dots are long,
join into chains along their length at 40% and on every side at 60%,
then turn into long holes. Each dot is a vector path whose area is the
cell's tone. The existing Ellipse shape is unchanged.
The two Extrude & Bevel tests of the faces an object's solids keep together built members
and strokes from 16,384-corner polygons until they passed MAX_OBJECT_FACES. They took
230 s and 23.5 s on CI. The solids code now reads the limit through object_face_limit(),
which tests can lower on their own thread (OBJECT_FACE_LIMIT), and both tests build
64-corner polygons against a limit of exactly three members' or three strokes' faces. The
limit is now met exactly, so the tests also check that a solid at the limit still draws.
Outside the crate's own tests, object_face_limit() is MAX_OBJECT_FACES.
The smoothing test of every pair of gray levels ran the filter on 262,144 one-pixel-pair
images, and each pass along a column started two threads. It now puts every pair in one
2-pixel-wide image and one 2-pixel-high image, so it checks the same 65,536 pairs in four
passes.
The test counter in RingFinder::reach now counts one entry per read in the compaction loop. docs/three-d.md says that past the limit a face that can go next still goes, and the first face left by depth goes next only when none can.
MAX_LOCAL_CHECKS's doc comment said pairs not reached keep their depth order; an uncompared pair adds no constraint, and past the step limit the first face left by depth goes next only when no face can. a_list_longer_than_the_room_left_is_not_read now asserts how many list entries are read at each room size, and fails when an over-long list is counted as read.
object.distort gave type and symbol instances the warp's affine
approximation at their center, so their corners missed the handles.
They now keep their art and are drawn through the warp, composed after
any projection they had, as type and symbols on the Perspective Grid
are. Corners that would fold the box, cross the warp's horizon or lie
too close together for a perspective map are refused with an error that
names the object.
Images in the art of a symbol drawn through a projection now have their
corners placed by it, and their linked masks are projected with them.
Before, they stayed flat while the rest of the art moved.
When a live-effect plug-in returned a piece whose effects list a raster
effect before a Transform effect that makes copies, the Transform effect
copied the bare geometry and the raster effect was drawn once around all
of the copies. dress_piece applied the piece's geometry effects to its
geometry alone and kept every raster effect on the group around them.
dress_piece now builds such a piece through copied_raster_art, as an
object's copies are built: each copy carries its own raster effects,
moved, turned, reflected and scaled with it. copied_raster_art takes an
optional budget and completion flag, so the piece still keeps to the room
it is given and is refused when its copies or its geometry effects would
stop short. The piece's fills and strokes keep their own effects for
their own stage.
A round or projecting cap draws a dot for a subpath that never leaves
its first point: a closed lone anchor, or a line or curve back to the
same point. StrokeLayer::hits ruled the click out by the box of the
segments, which leaves out a closed lone anchor, and then measured
only segments with length, so a click on the dot missed. The fast
path for a plain centered stroke in hit_leaf also returned no hit for
a path whose only subpath is a closed lone anchor.
hits now measures each such subpath as the dot the stroke draws: a
disc for a round cap and an axis-aligned square for a projecting cap,
as wide as the stroke's body, on undashed strokes without a width
profile, which are the strokes that draw a dot. Inside and outside
strokes keep to their side of a closed path. Butt caps draw no dot
and still miss. The fast path hands a click near a closed lone anchor
to the full check.
Hover, Select Behind, Direct Selection and the Eyedropper go through
the same hit test, and a marquee over the anchor already selects it.
A geometry effect is given the object's box as its reference, for
example the center a Transform effect scales and rotates about. Drawing,
the preview bounds, Expand Appearance's first step, shape art, the
outline check of the .ai reader and a stroke's effects before a Transform
that makes the stroke a path of its own measured that box with kurbo's
bounding_box, which counts only segments. A lone anchor was left out, and
a path of one anchor measured a box at the origin, so it scaled about
(0, 0). PathData::bounds, which the selection's box, Align, Transform
Each and every later effect in the stack use, holds lone anchors.
- geom: anchored_curve_bounds measures a BezPath as PathData::bounds
measures the path it stands for.
- render, effects and the .ai reader give geometry effects that box.
Gradient reference boxes and clip regions are unchanged.
Eight tests in effects, brush, tools and trace bounded their run time
with Instant::elapsed. Each now counts the work the bounded code does
and asserts that count instead:
- effects: the subpaths Offset Path offsets after Transform copies
move behind it (1 for the rectangle, 5 for five leaves)
- brush: the calls a misbehaving bend map gets, at most what the
fitting depth and the chord count allow
- tools: the points Liquify's simplify measures (five per anchor) and
the anchors it moves (one each), and the objects the eyedropper's
hit tests may visit (within the work limit)
- trace: the named logo colors compared with those kept (ten per
color), the lookups that drop repeated swatches (one each) and the
swatch colors compared with the picture's colors (each distinct
swatch once per color)
Each count fails when the bounded step is removed or made to repeat.
PathData::bounds now counts a subpath of one anchor, so three places
that measure what a path paints measured a point nothing paints:
- .ai import: the box arrowheads are placed against measured a visible
fill by the path's geometric box. A filled path with a head and one
stray anchor no longer fit the drawn look, so its style was not read.
The fill now measures PathData::drawn_bounds(false).
- Type copies a Transform effect moves: the ink box of the glyph
outlines now counts a contour of one anchor only where a round or
projecting character stroke cap draws it as a dot.
- .ai envelopes: a piece of type outlines made only of contours of zero
length kept them and counted their point. It now counts nothing, as
the rule for such contours says.
Tests: a filled line with a head and a stray anchor still fits a look
of the line and its head; a dot-only piece beside a stroked square adds
nothing to the square's box. Both fail without the change.
Use the grouped picker in the effect dialogs and Appearance editor. Validate new automation requests while preserving earlier spellings, recorded steps, and untouched stored modes.
Outline joined crossings closer together than the art-size tolerance
multiplied by precision / 0.01. Scale Strokes & Effects scales the art and
the precision together, so scaling both by 10 made that distance 100 times
larger, and crossings that were apart could become one junction.
The distance is now precision / 10000, or the tolerance for the art's
size when that is larger. At the 0.01 pt default it is 0.000001 pt as
before, and scaling the art and the precision together gives the same
pieces at the new size. The params text of object.pathfinder.options and
of the Pathfinder effects, docs/mcp.md and the Pathfinder Options line in
docs/target-app-parity.md describe the new rule.
A Curves effect a painted live-effect plug-in returns is refused when its
`points` string holds a token that is not an `x,y` pair of numbers, or
when any point in the string or the `[[x, y], …]` array lies outside 0
to 255. Before, an unreadable string passed and the effect drew the
default curve, and an out-of-range point was clamped.
A returned Curves effect's `points` is now also taken as [[x, y], ...],
the form the effect draws, each entry a pair of numbers. A returned
Transform effect's `copies` and `reference` must be whole numbers; 1.5
copies drew one copy before.
A returned effect's `color` given as [r, g, b] now needs each of the
first three components from 0 to 1, and a color object needs its
components from 0 to 1 (a Lab color's lightness from 0 to 100), as the
effects document them. [2, -1, 0] was taken before.
An effect record a painted live effect returns now has each parameter
that `effect.list` documents as a list of choices checked against that
list, so Roughen's `points` takes only "smooth" or "corner".
A Drop Shadow's, Inner Glow's or Outer Glow's `mode` must name a blend
mode. An unknown name was drawn as Normal before. A `color` is taken
as [r, g, b] or a color object as well as "#rrggbb", as `effect.apply`
takes it; the check of its default's type refused those forms before.
Pucker & Bloat's `amount` and Temperature/Tint's `temperature` and
`tint` are documented as `lo..hi` ranges, so a returned value outside
-200..200 or -100..100 is refused. The effects already clamp to these
ranges.
- A parameter documented right after a comma (Paint Daubs' `sharpness`) has its
documented range checked, in returned effects and in distance and pixel
ranges.
- A returned Free Distort's `corners` must be four [x, y] pairs of finite
numbers.
- A piece's Transform effect with no copies and Scale Strokes & Effects on no
longer counts as short of copies, so the piece is dressed and moves.
- The painted-look rerun test moves the source in one document drawn by one
renderer, and the plug-in returns a different piece for the moved source.
A raster effect that a painted live-effect plug-in lists on a piece before
a Transform effect now follows that Transform, as an object's raster
effects do once its geometry effects are applied: a Drop Shadow before a
scale of 200% draws at twice its offset. Before, it kept the offset and
size it had before the Transform.
A Pathfinder effect (pathfinder.*) in a piece's effects now refuses the
result, naming the field. A piece is one path, so the effect had nothing
to combine and was never drawn.
Docs: docs/plugins.md.
Each painted piece's own geometry effects now run within what the pieces
and the pieces before it leave of the budget of the object's geometry
effects, and stop at the first effect that would go past it or that would
make fewer Transform copies than it asks for. The pieces after it are not
built, and the object, or the fill or stroke the effect is on, draws the
geometry it was given. Before, each piece was reshaped with the whole
budget and checked afterwards, and on a fill every piece was reshaped
before any check.
Adds tests for SVG and PDF export and Expand Appearance of a piece's
opacity, blending mode and effects, and fuzz cases for hostile piece looks.
A painted live effect whose manifest has "api": 3 and "appearanceOutput": true
may give each piece, and each fill and stroke it returns, an opacity from 0 to
1, a blending mode by its exact name and up to 16 built-in effect records (4,096
in one result). Rows take raster effects only, and the rows an effect on a fill
or stroke returns take no effects. 3D effects and plug-in effects, this one
included, are refused, so a returned effect never runs a plug-in.
The host checks each record as effect.apply checks its parameters: known keys,
the type of each default, documented ranges and the per-effect value checks. A
bad value refuses the whole result, naming the field, and that step draws its
input unchanged. A piece's geometry effects reshape it before the object's later
effects, which run on it once, and count against the geometry effects' budget.
The effect stays live and runs again when its source changes.
Docs: docs/plugins.md, docs/mcp.md (plugin.list), docs/target-app-parity.md.