From b6dc446f7d9a5ce14eb6974749391b9eb101a764 Mon Sep 17 00:00:00 2001 From: zhbhun Date: Sun, 6 Aug 2023 23:57:38 +0800 Subject: [PATCH] style: format js --- src/render/canvas/canvas-renderer.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/render/canvas/canvas-renderer.ts b/src/render/canvas/canvas-renderer.ts index efd8a5a..f6c0326 100644 --- a/src/render/canvas/canvas-renderer.ts +++ b/src/render/canvas/canvas-renderer.ts @@ -600,14 +600,9 @@ export class CanvasRenderer extends Renderer { 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 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) => { item.x = item.x / scaleX; item.y = item.y / scaleY;