added counter pixel ratio method so that drawings aren't double scaled when using toDataUrl and toImage

This commit is contained in:
Eric Rowell
2012-12-21 22:51:57 -08:00
parent 03834db910
commit 375c64a332
4 changed files with 11 additions and 2 deletions

View File

@@ -187,6 +187,13 @@
if(pixelRatio !== 1) {
this.getContext().scale(pixelRatio, pixelRatio);
}
},
_counterPixelRatio: function() {
var pixelRatio = Kinetic.Canvas.pixelRatio;
if(pixelRatio !== 1) {
pixelRatio = 1 / pixelRatio;
this.getContext().scale(pixelRatio, pixelRatio);
}
}
};