mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Don't overwrite the global alpha when switching to smask mode
It fixes #issue16287.
This commit is contained in:
parent
b57da32d70
commit
1d0227af62
2 changed files with 4 additions and 11 deletions
|
@ -1323,8 +1323,7 @@ class CanvasGraphics {
|
|||
this.current.strokeAlpha = value;
|
||||
break;
|
||||
case "ca":
|
||||
this.current.fillAlpha = value;
|
||||
this.ctx.globalAlpha = value;
|
||||
this.ctx.globalAlpha = this.current.fillAlpha = value;
|
||||
break;
|
||||
case "BM":
|
||||
this.ctx.globalCompositeOperation = value;
|
||||
|
@ -1378,17 +1377,12 @@ class CanvasGraphics {
|
|||
drawnHeight
|
||||
);
|
||||
this.suspendedCtx = this.ctx;
|
||||
this.ctx = scratchCanvas.context;
|
||||
const ctx = this.ctx;
|
||||
const ctx = (this.ctx = scratchCanvas.context);
|
||||
ctx.setTransform(this.suspendedCtx.getTransform());
|
||||
copyCtxState(this.suspendedCtx, ctx);
|
||||
mirrorContextOperations(ctx, this.suspendedCtx);
|
||||
|
||||
this.setGState([
|
||||
["BM", "source-over"],
|
||||
["ca", 1],
|
||||
["CA", 1],
|
||||
]);
|
||||
this.setGState([["BM", "source-over"]]);
|
||||
}
|
||||
|
||||
endSMaskMode() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue