mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
parent
7222aba1b4
commit
105ca4598c
@ -561,11 +561,14 @@ export class CanvasRenderer {
|
||||
image.height,
|
||||
image.width / image.height
|
||||
]);
|
||||
const pattern = this.ctx.createPattern(
|
||||
|
||||
if( width > 0 && height > 0) {
|
||||
const pattern = this.ctx.createPattern(
|
||||
this.resizeImage(image, width, height),
|
||||
'repeat'
|
||||
) as CanvasPattern;
|
||||
this.renderRepeat(path, pattern, x, y);
|
||||
) as CanvasPattern;
|
||||
this.renderRepeat(path, pattern, x, y);
|
||||
}
|
||||
}
|
||||
} else if (isLinearGradient(backgroundImage)) {
|
||||
const [path, x, y, width, height] = calculateBackgroundRendering(container, index, [null, null, null]);
|
||||
|
Loading…
Reference in New Issue
Block a user