Correctly clip content that has border-radius (#399)

This commit is contained in:
MoyuScript 2014-10-07 19:11:24 +03:00
parent 8756d5d860
commit 4183f86d7c
4 changed files with 6 additions and 1 deletions

2
dist/html2canvas.js vendored
View File

@ -1821,7 +1821,9 @@ NodeParser.prototype.paintNode = function(container) {
this.renderer.clip(container.clip, function() {
this.renderer.renderBorders(container.borders.borders);
}, this);
this.renderer.clip(container.backgroundClip, function() {
switch (container.node.nodeName) {
case "svg":
case "IFRAME":

File diff suppressed because one or more lines are too long

View File

@ -281,7 +281,9 @@ NodeParser.prototype.paintNode = function(container) {
this.renderer.clip(container.clip, function() {
this.renderer.renderBorders(container.borders.borders);
}, this);
this.renderer.clip(container.backgroundClip, function() {
switch (container.node.nodeName) {
case "svg":
case "IFRAME":

View File

@ -9,6 +9,7 @@
<img src="../../assets/image.jpg" />
<img src="../../assets/image.jpg" style="width:50px;height:400px;" />
<img src="../../assets/image.jpg" style="width:500px;" />
<img src="../../assets/image.jpg" style="width:100px;border-radius:50px;" />
<img src="../../assets/image.jpg" style="width:500px;height:40px;" />