Skip to content

Instantly share code, notes, and snippets.

@JanneMattila
Created April 24, 2019 19:51
Show Gist options
  • Save JanneMattila/93c5d0c27b0f04ca9411788342b20824 to your computer and use it in GitHub Desktop.
Save JanneMattila/93c5d0c27b0f04ca9411788342b20824 to your computer and use it in GitHub Desktop.
Azure App Configuration
let canvas = <HTMLCanvasElement>document.getElementById("canvas");
let context = canvas.getContext("2d");
context.clearRect(0, 0, canvas.width, canvas.height);
const lineSpaceWidth = 50;
for (let i = 0; i <= this.canvas.width / lineSpaceWidth; i++) {
const line = i * lineSpaceWidth;
context.beginPath();
context.moveTo(line, 0);
context.lineTo(line, canvas.height);
context.stroke();
context.beginPath();
context.moveTo(0, line);
context.lineTo(this.canvas.width, line);
context.stroke();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment