We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11aec1a commit d24b8a9Copy full SHA for d24b8a9
cocos2d/core/layers/CCLayer.js
@@ -148,8 +148,8 @@ if (cc._renderType === cc._RENDER_TYPE_CANVAS) {
148
//compute the bounding box of the bake layer.
149
this._transformForRenderer();
150
var boundingBox = this._getBoundingBoxForBake();
151
- boundingBox.width = Math.ceil(boundingBox.width);
152
- boundingBox.height = Math.ceil(boundingBox.height);
+ boundingBox.width = 0|(boundingBox.width+0.5);
+ boundingBox.height = 0|(boundingBox.height+0.5);
153
var bakeContext = locBakeSprite.getCacheContext();
154
locBakeSprite.resetCanvasSize(boundingBox.width, boundingBox.height);
155
bakeContext.translate(0 - boundingBox.x, boundingBox.height + boundingBox.y);
0 commit comments