mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-07-30 19:07:22 +02:00
Merge pull request #21262 from calixteman/issue18032
Fix nested non-isolated groups in knockout rendering
This commit is contained in:
commit
7f151c777b
@ -3341,13 +3341,15 @@ class CanvasGraphics {
|
||||
// #compositeKnockoutSurface so it doesn't become part of the group
|
||||
// source itself.
|
||||
const backdropCtx = group.knockout && !group.isolated ? currentCtx : null;
|
||||
// Non-isolated non-KO subgroup inside a KO parent: at endGroup we'll
|
||||
// blend its elements against the outer KO running canvas (also frozen),
|
||||
// so just record the flag here and read ctx.canvas at composite time.
|
||||
// Non-isolated non-KO subgroup inside a KO parent, with inner compositing
|
||||
// of its own: at endGroup we'll blend its elements against the outer KO
|
||||
// running canvas (also frozen), so just record the flag here and read
|
||||
// ctx.canvas at composite time.
|
||||
const hasInnerBackdrop =
|
||||
!group.isolated &&
|
||||
!group.knockout &&
|
||||
!group.smask &&
|
||||
group.needsIsolation &&
|
||||
this.#knockoutGroupLevel > 0;
|
||||
|
||||
// Pool the per-element shape mask for the lifetime of this KO group.
|
||||
|
||||
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -920,3 +920,4 @@
|
||||
!smask_luminosity_oob_transfer.pdf
|
||||
!operator_list_cycle.pdf
|
||||
!knockout_groups_test.pdf
|
||||
!issue18032.pdf
|
||||
|
||||
BIN
test/pdfs/issue18032.pdf
Normal file
BIN
test/pdfs/issue18032.pdf
Normal file
Binary file not shown.
@ -14252,5 +14252,13 @@
|
||||
"rounds": 1,
|
||||
"type": "eq",
|
||||
"about": "Knockout groups composite-modes survey."
|
||||
},
|
||||
{
|
||||
"id": "issue18032",
|
||||
"file": "pdfs/issue18032.pdf",
|
||||
"md5": "656234fde97953c4e3fc7698831590a9",
|
||||
"rounds": 1,
|
||||
"type": "eq",
|
||||
"about": "Non-isolated knockout group with a nested non-isolated subgroup over existing text."
|
||||
}
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user