Created
April 24, 2019 19:51
-
-
Save JanneMattila/93c5d0c27b0f04ca9411788342b20824 to your computer and use it in GitHub Desktop.
Azure App Configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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