Haxe在画布上画线

时间:2018-11-09 21:19:38

标签: html5-canvas haxe

谁能帮我看看这个问题,我正在尝试在画布上画线,并且可以在Edge中使用,但是在Firefox和Chrome中,画布变黑了,左上角有一张皱眉。代码:

var cellwitdh = StaticData.SelectedTileSheet.getCellWidth();
var col = Math.floor(_gridCVS.width / cellwitdh);
var ctx = this._gridCVS.getContext2d();
for (i in 0...col)
{
    ctx.beginPath();
    ctx.moveTo(i cellwitdh, 0);
    ctx.lineTo(i cellwitdh, this._gridCVS.width);
    ctx.stroke();
    ctx.closePath();
}

enter image description here 我没有任何错误消息,只有这张图片

1 个答案:

答案 0 :(得分:2)

画布太大,我正在尝试制作24000x24000的画布;

answer reference

相关问题