mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Updated tests for new bound vs bounds function.
This commit is contained in:
parent
dc01cf0dc9
commit
9a3c6926dc
@ -2,3 +2,7 @@ export const {Bounds} = jest.requireActual('../bounds');
|
||||
export const parseBounds = (): typeof Bounds[] => {
|
||||
return [new Bounds(0, 0, 200, 50)];
|
||||
};
|
||||
|
||||
export const parseBound = (): typeof Bounds => {
|
||||
return new Bounds(0, 0, 200, 50);
|
||||
};
|
||||
|
@ -617,11 +617,13 @@ export class CanvasRenderer extends Renderer {
|
||||
]);
|
||||
areas.forEach((area) => {
|
||||
const [path, x, y, width, height] = area;
|
||||
if (image) {
|
||||
const pattern = this.ctx.createPattern(
|
||||
this.resizeImage(image!, width, height),
|
||||
this.resizeImage(image, width, height),
|
||||
'repeat'
|
||||
) as CanvasPattern;
|
||||
this.renderRepeat(path, pattern, x, y);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (isLinearGradient(backgroundImage)) {
|
||||
|
Loading…
Reference in New Issue
Block a user