Merge pull request #19717 from calixteman/issue16287
Don't overwrite the global alpha when switching to smask mode (bug 1764587)
This commit is contained in:
commit
a8c77633a1
@ -1323,8 +1323,7 @@ class CanvasGraphics {
|
|||||||
this.current.strokeAlpha = value;
|
this.current.strokeAlpha = value;
|
||||||
break;
|
break;
|
||||||
case "ca":
|
case "ca":
|
||||||
this.current.fillAlpha = value;
|
this.ctx.globalAlpha = this.current.fillAlpha = value;
|
||||||
this.ctx.globalAlpha = value;
|
|
||||||
break;
|
break;
|
||||||
case "BM":
|
case "BM":
|
||||||
this.ctx.globalCompositeOperation = value;
|
this.ctx.globalCompositeOperation = value;
|
||||||
@ -1378,17 +1377,12 @@ class CanvasGraphics {
|
|||||||
drawnHeight
|
drawnHeight
|
||||||
);
|
);
|
||||||
this.suspendedCtx = this.ctx;
|
this.suspendedCtx = this.ctx;
|
||||||
this.ctx = scratchCanvas.context;
|
const ctx = (this.ctx = scratchCanvas.context);
|
||||||
const ctx = this.ctx;
|
|
||||||
ctx.setTransform(this.suspendedCtx.getTransform());
|
ctx.setTransform(this.suspendedCtx.getTransform());
|
||||||
copyCtxState(this.suspendedCtx, ctx);
|
copyCtxState(this.suspendedCtx, ctx);
|
||||||
mirrorContextOperations(ctx, this.suspendedCtx);
|
mirrorContextOperations(ctx, this.suspendedCtx);
|
||||||
|
|
||||||
this.setGState([
|
this.setGState([["BM", "source-over"]]);
|
||||||
["BM", "source-over"],
|
|
||||||
["ca", 1],
|
|
||||||
["CA", 1],
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
endSMaskMode() {
|
endSMaskMode() {
|
||||||
|
|||||||
@ -5821,8 +5821,7 @@
|
|||||||
"file": "pdfs/issue16287.pdf",
|
"file": "pdfs/issue16287.pdf",
|
||||||
"md5": "cd3e0859140465ae8b8bde0c95cb4929",
|
"md5": "cd3e0859140465ae8b8bde0c95cb4929",
|
||||||
"rounds": 1,
|
"rounds": 1,
|
||||||
"type": "eq",
|
"type": "eq"
|
||||||
"about": "Please note that this file currently renders incorrectly."
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "issue2006",
|
"id": "issue2006",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user