GrandTabernacleAutoVI/render.js
2023-11-14 16:58:06 +01:00

24 lines
No EOL
549 B
JavaScript

class Render {
constructor(id) {
this.canvas = document.getElementById(id)
this.ctx = canvas.getContext("2d")
this.ReloadAff()
}
ReloadAff() {
this.ctx.fillStyle = "red"
this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height);
/*this.ctx.stokeStyle = "black"
this.ctx.lineWidth = 1;
ctx.beginPath();
ctx.moveTo(point1[0], point1[1]);
ctx.lineTo(point2[0], point2[1]);
ctx.lineTo(point3[0], point3[1]);
ctx.lineTo(point1[0], point1[1]);
ctx.stroke()
ctx.fill();*/
this.ctx.closePath();
this.ctx
}
}