Where overlapping faces of a solid are put in the order of their depths
(local_order, also Revolve's surface_order) and some lie in front of
one another in a ring, no order draws them all correctly. When the sort
could draw no face next, it drew the first face left by depth, whether
or not that face was part of a ring. A face that is only in front of a
ring's face, and comes before the ring by depth, was then drawn under
it: dashed strokes on bars that overlap in a ring, extruded as a 3D
group, had whole wall panels drawn over their dashes.
The sort now follows the faces that go before the first face left back,
among the faces that come before the next face drawn last, to a ring
that waits for no other of them (Tarjan's algorithm on the pairs
reversed, stopped at the first component completed). That ring gives up
its own face that comes first in the order of their depths, and the
faces left are looked at afresh, since they may be a smaller ring or
none. Only pairs of a ring, and pairs with a face drawn last, are then
drawn the wrong way round. A face drawn last (a cap) still follows
every face before it.
Cost and memory:
- Comparing pairs and looking for rings share MAX_LOCAL_CHECKS steps:
every face and pair looked at takes a step, and a face's list of the
faces before it is charged before it is read. Past the limit the
first face left by depth goes next, as before.
- A first face left that waits only for the next face drawn last, or
faces after it, goes next with no search and no step: each face keeps
a count of the faces not drawn before it that come before the face
drawn last.
- The search goes on from where it stopped, less the group that gave
up a face, so rings apart or one behind the other take a few steps a
face. A ring that is still a ring after it gives up a face is walked
again, so a large ring can cost about the square of its faces.
- The pairs are held as two u32 (8 bytes), dropped once each face's
list of the faces after it is made; both kinds of list are one array
of 4 bytes a pair. The lists of the faces before each face take a
step a pair to make, not taken from the limit, and are made only when
the room left is at least a quarter of the pairs, so making them
costs no more than four times the room left. A solid whose comparing
leaves less breaks its rings at the first face left by depth.
draw_order, cut_stroke_faces and in_one_order are unchanged.
Tests (solids::tests):
- a_face_in_front_of_a_cycle_waits_for_it: [0, 2, 3, 1] where the
first face by depth gave [3, 0, 2, 1]; with a cap, it stays last.
- the_faces_left_are_looked_at_afresh_after_each_face_released,
the_ring_released_waits_for_no_face_outside_it,
a_ring_is_looked_for_before_the_next_face_drawn_last.
- breaking_a_ring_draws_no_more_pairs_wrong_than_the_first_face_by_depth:
6,000 random sets (up to 30 faces, pairs shuffled and repeated, up to
four faces drawn last), each held to the order worked out plainly.
- breaking_rings_stops_at_its_room,
breaking_rings_takes_a_few_steps_a_face_but_for_a_ring_of_many_pairs:
the steps are counted, not timed, and bounded from above.
- a_face_that_waits_only_for_the_face_drawn_last_costs_no_search:
1,000 such faces before a ring take no search.
- the_lists_for_rings_are_made_only_with_room_for_a_quarter_of_the_pairs.
- a_list_longer_than_the_room_left_is_not_read: the entries read are
counted where they are read, and stay within the room.
- a_depth_cycle_keeps_the_cap_last is unchanged and passes.
With no ring looked for, the ring tests fail; without the skip or the
room for the lists, their tests fail.
Docs: docs/three-d.md, docs/revolve.md, docs/effects-parity.md,
docs/target-app-parity.md.
Part of #7023.
A printer name in "Sent “{title}” to {to}" was translated as a message of
its own, so Korean's "{status} ({e})" row turned "Office Laser (Floor 2)"
into "Office Laser(Floor 2)". An unquoted `{to}` value is now translated
only by an exact row, such as "the default printer"; a quoted one stays
as written. The cross-language case uses a printer name with
parentheses, and two quoted `{to}` names that match exact rows.
Overrides::is_set is only called from main under cfg(not(macos)), so it is allowed to be unused there (the repo's cfg_attr pattern). settle_cut_edges walks blended with iter_mut().enumerate() instead of indexing it.
Look::takes let a glyph filled only join a run whose glyphs were also
stroked, so after mode 2 text a mode 0 glyph took the run's stroke:
`2 Tr (B) Tj 0 Tr (C) Tj` came in as "BC" stroked throughout. A glyph
now joins only a run drawn alike (fill, stroke, overprints), so a glyph
filled only starts a run of its own and takes a stroke only when the
matched-stroke path (#8039) strokes it.
flush_stroke no longer strokes a whole run in place: a whole run goes
through the split and join code, so fill and stroke rendering glyph by
glyph still builds one stroked run.
egui places a popup by its size the frame before, so on the frame a late-measured name widens the
menu the filter text can stay where it was while the menu's rect already reaches past the window.
The helper now waits until both the filter and the menu's rect stay put, which fixes the
intermittent failure of a_menu_wider_than_its_field_stays_in_the_window (the menu ending 0.7 pt
past the window's edge).
Type on a path sits at fractions of its path's length. Scaling the path
non-uniformly changes where a fraction lands (CodeRabbit's case: M0 0 L100 0
L100 100 under diag(2, 1) moves the start bracket from (200, 0) to (150, 0)).
Path type now bakes the vertical scale into the character sizes and scales
its path uniformly by it, which keeps every fraction where it was; the
horizontal stretch stays in the transform.
A Swatch Options rename of the spot color base keeps it the base, also
as a command.batch step, and so do an Undo and a Redo of the rename.
Deleting the swatch or its color group, merging it into another, making
it a process color or closing its document ends the link, so a later
spot color of the same name does not become the base until it is chosen
again. The base keeps the color it showed.
A batch's Activate Document, New, Open, Close and Move Document steps
are followed, so steps in another document leave the link alone. When
the swatch goes in a way the panel does not follow, the link waits for
an Undo or Redo, and the next other command ends it.
Baking an object's scale into the character attributes removed that scale
from the type's transform, but the area frame (and a path type's path), which
is drawn through that transform too, kept its unscaled size. A 120 x 80 frame
scaled 200% shrank back to 120 x 80 on the page, so the 24 pt type broke into
two lines and the rest became overset.
The frame and the path now take the scale the transform loses, so they, the
line breaks and every glyph stay where they were.
Fixes#8297
A PDF/X-4 export wrote xmp:ModifyDate and xmp:CreateDate in its XMP
metadata but no xmp:MetadataDate. The PDF/X-4 metadata edit now adds
xmp:MetadataDate next to xmp:ModifyDate, with the same value, and grows
the stream's /Length to match. When the export dates the file as modified
later, post::modification_date already rewrites every xmp:MetadataDate,
so the two dates stay equal.
PDF/X-1a, PDF/X-3, PDF/A and plain PDF exports are unchanged.
A fill and a stroke at the same opacity below 1 were joined into one
type object whose opacity then applies to both together, losing the
darker overlap the file composites. stroke_filled now takes a stroke
only when the fill and the stroke are opaque.
An upright glyph filled and stroked was kept as an outline for the
reshaped-outline fallback while upright glyphs filled only were not;
it is no longer kept either, so such a line can't come in as the
outlines of its stroked glyphs alone.
Docs: the #8015 entries say what is left (translucent type, and a TJ
that starts a new line part way through).