mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Apply border radius correctly on image elements
This commit is contained in:
parent
fe97851988
commit
ad1119a76c
@ -88,7 +88,9 @@ export default class CanvasRenderer {
|
||||
);
|
||||
const width = typeof image.width === 'number' ? image.width : contentBox.width;
|
||||
const height = typeof image.height === 'number' ? image.height : contentBox.height;
|
||||
|
||||
this.ctx.save();
|
||||
this.path(calculatePaddingBoxPath(container.curvedBounds));
|
||||
this.ctx.clip();
|
||||
this.ctx.drawImage(
|
||||
image,
|
||||
0,
|
||||
@ -100,6 +102,7 @@ export default class CanvasRenderer {
|
||||
contentBox.width,
|
||||
contentBox.height
|
||||
);
|
||||
this.ctx.restore();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user