Skip to content

Commit 99b4d03

Browse files
author
SeanLin
committed
Merge pull request cocos2d#1042 from dingpinglv/ContentScaleFactorNotEqual1
fixed a bug of cc.Sprite that it's wrong when call _changeTextureColor function
2 parents 530891e + 6516e81 commit 99b4d03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cocos2d/sprite_nodes/CCSprite.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,9 +1226,9 @@ cc.SpriteCanvas = cc.NodeRGBA.extend(/** @lends cc.SpriteCanvas# */{
12261226
//generate color texture cache
12271227
var rect = cc.RECT_POINTS_TO_PIXELS(this._rect);
12281228
if (this._texture instanceof HTMLCanvasElement && !this._rectRotated)
1229-
cc.generateTintImage(this.getTexture(), cacheTextureForColor, this._color, rect, this._texture);
1229+
cc.generateTintImage(this.getTexture(), cacheTextureForColor, this._displayedColor, rect, this._texture);
12301230
else {
1231-
var colorTexture = cc.generateTintImage(this.getTexture(), cacheTextureForColor, this._color, rect);
1231+
var colorTexture = cc.generateTintImage(this.getTexture(), cacheTextureForColor, this._displayedColor, rect);
12321232
this.setTexture(colorTexture);
12331233
}
12341234
}

0 commit comments

Comments
 (0)