棋盘无边距

This commit is contained in:
2023-11-01 00:45:38 +08:00
parent 9dfbb9cd29
commit de06553a8d
1 changed files with 5 additions and 5 deletions

View File

@ -140,11 +140,11 @@ export class Chessboard {
context.beginPath() context.beginPath()
// 棋盘描边 // 棋盘描边
context.moveTo(10, 10) context.moveTo(20, 20)
context.lineTo(10, width * 9.6) context.lineTo(20, width * 9.4)
context.lineTo(width * 8.6, width * 9.6) context.lineTo(width * 8.4, width * 9.4)
context.lineTo(width * 8.6, 10) context.lineTo(width * 8.4, 20)
context.lineTo(10, 10) context.lineTo(20, 20)
context.stroke() context.stroke()
}; };
img.src = canvas.toDataURL() img.src = canvas.toDataURL()