Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/graphics-canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var Graphics = function(width, height, border, padding, font, fontsize){
, top: this.border_size
, left: this.padding_width + this.quiet };

this.canvas = new Canvas(width, height);
this.canvas = new Canvas.Canvas(width, height);
this.ctx = this.canvas.getContext('2d');
this.fg = "#000";
this.bg = "#fff";
Expand Down Expand Up @@ -94,7 +94,7 @@ Graphics.prototype.rotate = function(angle){
var bounds = geo.getRotatedBounds(this.width, this.height, rad);
var img = new Image();
img.src = this.canvas.toBuffer();
var canvas = new Canvas(bounds.width, bounds.height);
var canvas = new Canvas.Canvas(bounds.width, bounds.height);
var ctx = canvas.getContext('2d');
ctx.translate(bounds.width * 0.5, bounds.height * 0.5);
ctx.rotate(rad);
Expand Down