mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
SVG clip intersections and operators
This commit is contained in:
parent
2dc4af525d
commit
fe2cf2f73f
1 changed files with 5 additions and 0 deletions
|
@ -995,6 +995,8 @@ SVGGraphics = (function SVGGraphicsClosure() {
|
||||||
this.extraStack.forEach(function (prev) {
|
this.extraStack.forEach(function (prev) {
|
||||||
prev.clipGroup = null;
|
prev.clipGroup = null;
|
||||||
});
|
});
|
||||||
|
// Intersect with the previous clipping path.
|
||||||
|
clipPath.setAttributeNS(null, 'clip-path', current.activeClipUrl);
|
||||||
}
|
}
|
||||||
current.activeClipUrl = 'url(#' + clipId + ')';
|
current.activeClipUrl = 'url(#' + clipId + ')';
|
||||||
|
|
||||||
|
@ -1069,6 +1071,7 @@ SVGGraphics = (function SVGGraphicsClosure() {
|
||||||
if (current.element) {
|
if (current.element) {
|
||||||
current.element.setAttributeNS(null, 'fill', current.fillColor);
|
current.element.setAttributeNS(null, 'fill', current.fillColor);
|
||||||
current.element.setAttributeNS(null, 'fill-opacity', current.fillAlpha);
|
current.element.setAttributeNS(null, 'fill-opacity', current.fillAlpha);
|
||||||
|
this.endPath();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1092,6 +1095,8 @@ SVGGraphics = (function SVGGraphicsClosure() {
|
||||||
pf(current.dashPhase) + 'px');
|
pf(current.dashPhase) + 'px');
|
||||||
|
|
||||||
current.element.setAttributeNS(null, 'fill', 'none');
|
current.element.setAttributeNS(null, 'fill', 'none');
|
||||||
|
|
||||||
|
this.endPath();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue