Skip to content

Commit cb33fc5

Browse files
committed
fix(canvas): reset canvas transformation on creation
1 parent 548522d commit cb33fc5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/canvas.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export function createCanvas<T extends HTMLCanvasElement | OffscreenCanvas | Can
6060
if (!ctx) {
6161
throw new Error("Failed to get 2d context");
6262
}
63+
ctx.resetTransform();
6364

6465
// 应用图像平滑选项
6566
if (options.imageSmoothingEnabled !== undefined) {

0 commit comments

Comments
 (0)