A global or spot color that a library pattern's art brings under a
numbered name no longer takes a name the library gives another swatch.
Before, adding a pattern whose art uses "Ink" to a document with another
"Ink" brought the color as "Ink 2" even when the library has its own
"Ink 2"; adding that library swatch next then came in as "Ink 2 2". The
brought color now takes the next free name the library does not use
("Ink 3"), and every paint linked to it follows the new name, so adding
the library's "Ink 2" next adds it under its own name and adding both
again adds nothing.
A color the pattern's art brings or takes is the color a library tint
or gradient links to only when it has the library color's paint and its
process, global or spot kind, as for the other lookups in the same add.
The test a_numbered_copy_named_like_another_library_color_is_found now
makes the blue "Ink 2" itself, as an earlier version's pattern add left
it, since a pattern add no longer gives that name.
A press keeps the pointer and the snapped point for the end of the piece it adds. When Alt
changes the action during the press, the end goes through the protractor's tick again for the
new action, so a continuous arc that snapped to a tick and becomes a sharp-corner arc ends at the
pointer, and a piece that becomes a continuous arc goes onto the tick, without waiting for the
next drag. This also covers a press that has not dragged.
A continuous arc that starts a path has no direction to follow and
sweeps the arc size, as a sharp-corner arc does. Moving its end onto a
protractor tick put the end on a circle the drawn arc does not follow,
so `tick_end` now gives no tick for it.
The hover keeps the snap settings it was made with (`SnapSettings` in
guides/snap.rs: the window, zoom, snapping options, tolerances,
Alignment Guides and construction angles). After one of them changes
under a still pointer, the hover's rubber band, protractor, distance
label and Smart Guides are hidden until the pointer moves, also through
a press, so the preview shows no point that a click would not place.
A press also drops the hover, so after a click puts an arc's end on a
tick no preview runs from that end back to the pointer. While the
pointer hovers, the tool asks the canvas to hover it again when the
view, the document or the selection changes (`wants_rehover`).
While an arc is drawn, by a drag or as the piece the next click adds, the
Quick Pen tool shows a protractor around the arc's center: a tick every 15°
from where the arc starts, a longer one every 90°, and one where it ends. The
piece the next click adds shows its protractor only while Enable Rubber Band
for the Pen tool shows that piece.
With Smart Guides on, the end of a continuous arc snaps onto the nearest tick
of its protractor, on the same circle, when the tick lies within the snapping
tolerance of the pointer, no other Smart Guide snaps the point, and neither
Snap to Grid nor Snap to Pixel snaps drawn points. A sharp-corner arc sweeps
its arc size, so its end does not snap. Shift does not constrain Quick Pen
points, so it does not change the snapping. The protractor, its 15° step and
the snapping are VectorCraft's own behavior.
The Smart Guides targets now also report whether a point landed on one of
them (`Targets::snap_hit`), so a target whose label or line is hidden still
takes precedence over a tick.
Adds tests for the arc's circle, the tick snapping by drag and by click and
its precedence, and the protractor during a drag and while hovering. Also adds
tests of existing Quick Pen behavior: a point snapping to a Smart Guide, and
the distance label shown while hovering.
A pass-through group's adjustment layers count as kept to change what is
below the outer pass-through group only when nothing below that group in
the outer one draws, as for adjustment layers directly in the outer group.
Before, a layer merged above them for its blend mode merged them applied
but the import counted them as not applied.
docs/mcp.md now says when a layer's mask hides all of it.
A library tint or gradient counts as already in the document only when
each color it links to is there. When the document's tint of that name
links to a color the document no longer has (deleted without unlinking),
the color comes back under its own name and is listed in `added`.
A picked pattern the document already holds keeps the copy of a color
its art takes (a numbered copy the library also names), and the picked
tints and gradients of that color link to it, so adding the pattern and
the tint again adds nothing. Without such a pattern, a numbered copy the
library also names stands for that library swatch alone.
docs/mcp.md also states that a pattern pasted with Merge for some colors
and Add for others is added again as a copy.
A layer or group whose layer mask, switched on, hides all of it now counts
as drawing nothing when the import decides what an adjustment layer
changes. A layer with stored pixels is hidden when its mask is 0 over all
of them. A group, an adjustment layer and a layer that stores no pixels
are hidden only when the mask is 0 everywhere, the value outside it
included.
- An adjustment layer above such a layer or group in a pass-through group
is kept to change what is below the group, instead of merging with
pixels that never show.
- A shallow knockout hidden by its mask merges nothing, so the adjustment
layers kept below it in a pass-through group stay in the group's kept
set: an adjustment layer above that group in an outer pass-through group
is kept after them, and both change what is below.
- A clipping base hidden by its mask draws nothing, its clipped layers
included.
Each mask is read once for this, only when it can hide all of the layer,
and the read is not counted against the import's memory allowance, since
the mask is read and counted again where it is drawn.
Docs: docs/mcp.md, docs/target-app-parity.md.
swatch.library.add linked a library tint to the wrong color in two cases.
When the document had a process color with the same name and paint as the
tint's global color, the global color counted as already present and the
tint linked to the process color. When a tint was added without its global
color and the document had another swatch of that color's name, the tint
linked to that swatch.
- A library color counts as already in the document only when the
document's color of that name is the same kind: process, global or spot.
A global color whose name the document gives a process color now comes
in under a numbered name, and its tints link to that copy.
- A global or spot color that an added tint or gradient links to, and that
the document does not have, now comes in with the tint or gradient. It
keeps its own name when that name is free and gets a number otherwise.
added lists it after the picked swatches.
- A library tint is not the document's tint of the same name and paint
when the document's swatch of the base's name is another color or kind.
- A tint that a pattern brought is used for a picked library tint only
when the color it links to is the library color's kind.
- An adjustment layer's mask is checked against the memory allowed beside
the canvases held while it is read (the merged canvas, the base's shape
and the copies kept for pass-through groups).
- A clipped adjustment layer whose mask is too large to read is left out
without unclipping the layers clipped above it to the same base.
- An adjustment layer in a pass-through group whose mask is too large to
read is left out without stopping the merge of the layer above the
group; its own merge with the layers below it still isn't made.
- A layer whose stored pixels are all transparent draws nothing, so an
adjustment layer above it in a pass-through group stays kept to change
what is below the group.
- A layer merged in a pass-through group for its blend mode or its
knockout takes the adjustment layers kept below it with it, so an
adjustment layer above that group in an outer pass-through group merges
with it instead of being dropped.
When a library tint waits for a color that a pattern's art brings,
swatch.library.add learns the color's name by importing the pattern into
a copy of the document. The import into the document now confirms those
names: when it gives a color another name, or none, the tints linked
from the copy are linked again.
- library.use and Add to Swatches report an error from the import that
merges a pattern's colors instead of falling back to adding them.
- The params text, docs/mcp.md and docs/target-app-parity.md say that a
tint or gradient links to the numbered copy its global or spot color
comes in under or already has, and name a gradient test.
- The new code uses the HashMap import, and one helper relinks the
added tints and gradients at both places that did it.
- A hidden pass-through group, kept with the hidden layers, and an
adjustment layer at 0 opacity or 0 fill no longer hold back the
adjustment layers above them in a pass-through group.
- Layers that draw nothing (no pixels stored, 0 opacity, or 0 fill with
nothing clipped to them) and groups of only such layers don't count as
content below an adjustment layer, so in a pass-through group it still
changes what is below the group. Layers clipped to a layer at 0 fill
or to an adjustment layer count as content.
- An adjustment layer whose layer mask is too large for the memory
allowed is counted as not applied, merged or clipped, instead of
stopping the layered import.
The Annex B runners checked their folders with Path::exists, which returns
false when the metadata cannot be read, so a folder that could not be
searched skipped the tests as if it were absent. They now use try_exists:
only an absent folder skips, and a metadata error fails the test.
The parity doc now says that an interpreter panic fails annex_b_runs and
makes cargo xtask test262 exit non-zero, while conformance failures do not.
A library tint or gradient whose global or spot color comes in under a
numbered name now links to that copy whichever order the swatches are
picked in, when the color was added by an earlier call, and when a
pattern's art brought the color or took the document's copy of it.
Adding the same tints again finds the ones added before.
- Each tint's or gradient's color is looked up for itself before
anything is added, past a process swatch of the same paint and past a
color group of that name. A numbered copy that the library's own
swatch of that name is stays that swatch's, and a new copy skips the
library's other names.
- A tint links to a global or spot color of the same kind only, and to
a color this call picks rather than to a copy a pattern took.
- Links are set as soon as the color's name is known. A tint waiting
for a color that a pattern's art brings learns its name from an
import into a copy, so the pattern does not add a second tint.
- A swatch a pattern brought takes a picked swatch's place only when
its colors link where the picked one's do.
- A stop linked to the Registration swatch counts as linked.
- library.use, Add to Swatches and the reuse check share one import
probe (patternlib::probe_import), and the probed copy is kept instead
of importing a second time.
Docs: docs/mcp.md, docs/target-app-parity.md.
The test262 runner read only test/language and a few built-ins folders,
so the Annex B tests were never counted, among them the for-in variable
with an initializer that must parse in sloppy code and give a
SyntaxError in strict code.
- annex_b_parse_subset parses every test under test/annexB/language
without a feature tag, of any edition, in the modes its flags give,
and writes annexb-parse-failures.txt.
- annex_b_runs runs those tests and the test/annexB/built-ins tests for
String, Date, RegExp and Function through the interpreter and writes
annexb-language-failures.txt and annexb-builtins-failures.txt. The
escape and unescape folders still run once, with the ES5 built-ins.
- A suite without test/annexB skips both; a folder there with nothing
to parse or run fails them. Conformance failures stay in the reports.
- The runner reads only regular files inside the suite: it does not
follow symbolic links, refuses an includes: name that leaves harness/,
refuses a file over 8 MiB before reading it, and fails on a folder it
cannot read instead of skipping it.
Docs: docs/target-app-parity.md, the xtask test262 module comment.
File › Open with a PSD or PSB file's layers as objects now reads the
nvrt, thrs and post blocks of the PSD file format specification and
merges each such adjustment layer with the visible layers below it in
its group, changing their colors. Clipped to a layer, it changes only
that layer and the layers clipped to it. In a pass-through group with
nothing below it in the group, it changes what is below the group when
the group is merged.
Each channel is taken as an 8-bit sRGB value: Invert turns v into
255 - v, Threshold compares the Rec. 709 luminance with its level, and
Posterize maps each channel to the nearest of its evenly spaced levels.
The adjusted color is composited in the layer's blend mode at its
opacity and fill opacity, through its layer mask.
A hidden one is left out. One that layers are clipped to, one clipped
to another adjustment layer, one whose data can't be read and one
whose merge needs more memory than allowed are not applied and are
counted in the existing adjustment-layer warning. Other adjustment
kinds are still not applied.
Docs: docs/mcp.md, docs/target-app-parity.md.
A geometry effect on a dynamic symbol instance's fill or stroke moves or
reshapes the art the canvas draws, and a click there already selects the
instance. Direct Selection still picked a part of the art at its plain
shape and outlined that shape, so a click on the drawn result picked
nothing and a click where the part no longer paints picked it.
symbol_part_at and symbol_part_outline_in_view now test and outline the
instance's art with the effects of its active fill and stroke added, as
the canvas adds them. Live objects in the art keep their place, so the
child-index path still leads to the part. A nested instance is picked
and outlined where its reshaped art is drawn, type with a fill or stroke
of its own where its reshaped glyphs are drawn (Type Object Selection by
Path Only still takes the type path), and an image's outline includes
the shapes its own fills and strokes paint. A clipping path is still
picked and outlined by its own geometry. Outline view and layers with
Preview off keep the plain shapes; blends, envelopes and repeats in the
art are picked without the instance's effects.
An even-odd compound paints the same whichever way each contour runs, so
an o's counter may run the same way as its outer contour. Such a part
matched neither as it is nor with all its contours reversed, and stayed
an outline at tolerance 0. A part of a split compound is now also read
with each contour turned the way its depth gives (outer contours one way,
their counters the other), both ways round. In a nonzero compound those
contours paint the counter, and the painted-area check still keeps the
part an outline.
The containment test that splits a compound into glyphs moves into its
own function, `containers`, which the new reading also calls.
Docs: docs/mcp.md, docs/type-parity.md.
When a direct-selected run holds a closed path's first anchor, Simplify
and Smooth now look for the new start on that run alone, so an
unselected segment that passes through the old start is not split.
When the first anchor stays, the path already starts there and is left
as it is.
A twist cut a beveled edge at points of the art's curve itself, while the
inset cap's edge eases its corners' miter offsets across the whole edge.
Where the art meets another edge at a sharp angle, the pieces next to the
cap drew a different curve from the cap's, leaving a gap of up to about
1.5 pt between them.
Each cut corner now takes the edge's corner offsets, eased across the
edge as the cap's edge eases them, and each piece follows the whole
edge's curve, so the pieces draw the cap's edge within the cap's
sampling tolerance, with and without perspective.
The tiny-circle test now also requires the solids to keep at least one
curve before it checks their control points.
When several refit points tie for nearest to a closed path's old start,
the earliest-along-the-path tie rule now places each distinct point on
the old path once, so many segments meeting at one point no longer
search every old segment once each. The tie rule is unchanged. Also
"the same way around" in the docs.
Simplify and Smooth refit a closed path from its first corner and kept
that order, so the path's first anchor moved and its dashes started
somewhere else. A refit now starts at the old first anchor when it keeps
one there, otherwise at a new anchor where the refit passes nearest that
point while the result still has fewer anchors than the path had, and
otherwise at the refit's nearest anchor. Its direction stays the same.
A direct-selected run across the start follows the same rule; before,
the path started at the run's end anchor.
The Smooth tool's start_nearest moves into vectorcraft-pathops, and both
commands call it with the limit on anchor count above.
Extrude & Bevel and Inflate drew several edges along the art's curves as
straight segments with a corner at every sample point, so Object > Expand
Appearance gave them corner anchors:
- The edges between two bevel steps and between two wall slices had no
outline. Every band now gets the outline of both its rings, and the two
faces that share a ring draw the same curves.
- A twist cut a wall's edge at points on the chord between two samples.
The cut corners now lie on the art's curve, and each piece follows its
own part of the curve, so the wall meets the cap along the cap's curve.
- Inflate's flat back, its side walls, and the cells of its front and
puffed back along the outline were polygons. They now follow the art's
curves, the cells within the sampling tolerance. The search for the
cells' edges along the outline stops after 4,194,304 edges per solid
(VectorCraft's own limit); the rest stay straight.
Visibility, depth order and face counts are still worked out on the
sampled polygons. Tests in crates/three-d/src/solid/tests_curves.rs.