贴图反向bug修改

This commit is contained in:
2025-07-07 17:17:40 +08:00
parent ea94efb65f
commit dd003aa00d

View File

@ -606,7 +606,8 @@ class Tools {
canvasEle.height = myImg.height canvasEle.height = myImg.height
ctx.translate(canvasEle.width / 2, canvasEle.height / 2); // 移动原点至中心 ctx.translate(canvasEle.width / 2, canvasEle.height / 2); // 移动原点至中心
ctx.rotate(Math.PI); // (弧度制) ctx.rotate(Math.PI); // (弧度制)
ctx.drawImage(myImg, -myImg.width * (options.space / 2), -myImg.height / 2) ctx.translate(-canvasEle.width / 2, -canvasEle.height / 2); // 移回原点
ctx.drawImage(myImg, -myImg.width * (options.space / 2), 0)
ctx.restore(); // 恢复状态 ctx.restore(); // 恢复状态
} }