Add options.background option

This commit is contained in:
Niklas von Hertzen
2014-11-04 21:53:26 +02:00
parent fc800bff9d
commit 657eb983cf
4 changed files with 91 additions and 2 deletions

View File

@ -6,6 +6,9 @@ function CanvasRenderer(width, height) {
this.canvas.height = height;
}
this.ctx = this.canvas.getContext("2d");
if (this.options.background) {
this.rectangle(0, 0, width, height, this.options.background);
}
this.taintCtx = this.document.createElement("canvas").getContext("2d");
this.ctx.textBaseline = "bottom";
this.variables = {};