Merge pull request #11927 from timvandermeij/svg-fill-opacity-shading

Implement fill opacity for shading patterns in the SVG back-end
This commit is contained in:
Tim van der Meij 2020-05-24 14:29:22 +02:00 committed by GitHub
commit 9d38dd4e8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1090,6 +1090,9 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
rect.setAttributeNS(null, "width", x1 - x0);
rect.setAttributeNS(null, "height", y1 - y0);
rect.setAttributeNS(null, "fill", this._makeShadingPattern(args));
if (this.current.fillAlpha < 1) {
rect.setAttributeNS(null, "fill-opacity", this.current.fillAlpha);
}
this._ensureTransformGroup().appendChild(rect);
}