// WERKEND 160607 22:30 import { Component } from '@angular/core'; @Component({ selector: 'my-app', template: '' }) export class AppComponent { canvas: HTMLCanvasElement; ctx: any; constructor () { this.canvas = <HTMLCanvasElement>document.createElement("canvas"); this.canvas.width = 400; this.canvas.height = 400; document.body.appendChild(this.canvas); this.ctx = this.canvas.getContext("2d"); this.canvas.style.setProperty("background", "red", null); this.canvas.style.setProperty("border-width", "thick", null); this.canvas.style.setProperty("border-color", "blue", null); this.canvas.style.setProperty("border-style", "dotted", null); this.ctx.beginPath(); this.ctx.moveTo(25, 25); this.ctx.lineTo(375, 375); this.ctx.stroke(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)