fix for bluriness (#3721)

This commit is contained in:
Andrea Bogazzi 2017-02-19 17:08:15 -05:00 committed by Asturur
parent 7acfec2511
commit 676ae10618
2 changed files with 7 additions and 7 deletions

View file

@ -872,8 +872,8 @@
width = dim.x * zoomX,
height = dim.y * zoomY;
return {
width: Math.ceil(width) + 2,
height: Math.ceil(height) + 2,
width: width + 2,
height: height + 2,
zoomX: zoomX,
zoomY: zoomY
};
@ -897,8 +897,8 @@
zoomX = dims.zoomX, zoomY = dims.zoomY;
if (width !== this.cacheWidth || height !== this.cacheHeight) {
this._cacheCanvas.width = width;
this._cacheCanvas.height = height;
this._cacheCanvas.width = Math.ceil(width);
this._cacheCanvas.height = Math.ceil(height);
this._cacheContext.translate(width / 2, height / 2);
this._cacheContext.scale(zoomX, zoomY);
this.cacheWidth = width;

View file

@ -403,9 +403,9 @@
*/
_getCacheCanvasDimensions: function() {
var dim = this.callSuper('_getCacheCanvasDimensions');
var fontSize = Math.ceil(this.fontSize) * 2;
dim.width += fontSize;
dim.height += fontSize;
var fontSize = this.fontSize * 2;
dim.width += fontSize * dim.zoomX;
dim.height += fontSize * dim.zoomY;
return dim;
},