mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-02 06:07:06 -06:00
M5: opaque knockout fills draw once in hard-edge and supersampled raster export
A knockout element with one opaque Normal solid fill (a path or compound, no mask, effects or isolation) is drawn once under AntiAlias::None, including the internal hard-edge frame of Art Optimized supersampled exports, instead of being erased and added back through per-element backdrop layers. Analytical antialiasing keeps the existing compositor and rounding. Exact-pixel tests compare against the general knockout path for paths and compound holes across precision, supersampling, translucent parents and copied backdrops, and check that the backdrop rasters are skipped; translucent fills keep their knockout compositing. # Conflicts: # docs/roadmap.md # docs/target-app-parity.md
This commit is contained in:
@@ -593,6 +593,13 @@ impl Renderer {
|
||||
if self.skipped(f, c) {
|
||||
continue;
|
||||
}
|
||||
// Hard-edge coverage is binary, so an opaque fill replaces its knockout shape exactly.
|
||||
// This also serves supersampled exports. Analytical AA keeps the erase/add passes:
|
||||
// their intermediate rounding can differ from source-over at partially covered edges.
|
||||
if f.opts.anti_alias == crate::AntiAlias::None && crate::node_checks::opaque_knockout_fill(c) {
|
||||
self.draw_arc(ctx, f, c);
|
||||
continue;
|
||||
}
|
||||
self.knockout_pass(ctx, f, c, Compose::DestOut);
|
||||
match &backdrop {
|
||||
Some(b) => self.knockout_over(ctx, f, c, b),
|
||||
|
||||
Reference in New Issue
Block a user