Add options.background option

This commit is contained in:
MoyuScript
2014-11-04 21:53:26 +02:00
parent 95d76a365d
commit de6ba1beb5
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 = {};