Skip to content

Commit

Permalink
fix for bluriness (#3721)
Browse files Browse the repository at this point in the history
  • Loading branch information
asturur authored Feb 19, 2017
1 parent 7a987fa commit 74d8e02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/shapes/object.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/shapes/text.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},

Expand Down

0 comments on commit 74d8e02

Please sign in to comment.