mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
style: format js
This commit is contained in:
@@ -600,14 +600,9 @@ export class CanvasRenderer extends Renderer {
|
|||||||
image.height,
|
image.height,
|
||||||
image.width / image.height
|
image.width / image.height
|
||||||
]);
|
]);
|
||||||
// const pattern = this.ctx.createPattern(
|
|
||||||
// this.resizeImage(image, width, height),
|
|
||||||
// 'repeat'
|
|
||||||
// ) as CanvasPattern;
|
|
||||||
// this.renderRepeat(path, pattern, x, y);
|
|
||||||
const scaleX = width / image.naturalWidth;
|
const scaleX = width / image.naturalWidth;
|
||||||
const scaleY = height / image.naturalHeight;
|
const scaleY = height / image.naturalHeight;
|
||||||
const pattern = this.ctx.createPattern(image, "repeat") as CanvasPattern;
|
const pattern = this.ctx.createPattern(image, 'repeat') as CanvasPattern;
|
||||||
const scaledPath = (path as Vector[]).map((item) => {
|
const scaledPath = (path as Vector[]).map((item) => {
|
||||||
item.x = item.x / scaleX;
|
item.x = item.x / scaleX;
|
||||||
item.y = item.y / scaleY;
|
item.y = item.y / scaleY;
|
||||||
|
|||||||
Reference in New Issue
Block a user