@@ -1246,7 +1246,6 @@ cc.SpriteCanvas = cc.NodeRGBA.extend(/** @lends cc.SpriteCanvas# */{
1246
1246
1247
1247
context . globalAlpha = this . _realOpacity / 255 ;
1248
1248
var locRect = this . _rect ;
1249
- var scaledRect = cc . RECT_POINTS_TO_PIXELS ( locRect ) ;
1250
1249
var flipXOffset = 0 | ( this . _offsetPosition . x ) , flipYOffset = - this . _offsetPosition . y - locRect . height ;
1251
1250
if ( this . _flipX ) {
1252
1251
flipXOffset = - this . _offsetPosition . x - locRect . width ;
@@ -1257,13 +1256,14 @@ cc.SpriteCanvas = cc.NodeRGBA.extend(/** @lends cc.SpriteCanvas# */{
1257
1256
context . scale ( 1 , - 1 ) ;
1258
1257
}
1259
1258
if ( this . _texture ) {
1259
+ var scaleFactor = cc . CONTENT_SCALE_FACTOR ( ) ;
1260
1260
if ( this . _colorized ) {
1261
1261
context . drawImage ( this . _texture ,
1262
- 0 , 0 , scaledRect . width , scaledRect . height ,
1262
+ 0 , 0 , locRect . width * scaleFactor , locRect . height * scaleFactor ,
1263
1263
flipXOffset , flipYOffset , locRect . width , locRect . height ) ;
1264
1264
} else {
1265
1265
context . drawImage ( this . _texture ,
1266
- scaledRect . x , scaledRect . y , scaledRect . width , scaledRect . height ,
1266
+ locRect . x * scaleFactor , locRect . y * scaleFactor , locRect . width * scaleFactor , locRect . height * scaleFactor ,
1267
1267
flipXOffset , flipYOffset , locRect . width , locRect . height ) ;
1268
1268
}
1269
1269
} else if ( this . _contentSize . width !== 0 ) {
0 commit comments