@@ -242,8 +242,7 @@ cc.SpriteFrame = cc.Class.extend(/** @lends cc.SpriteFrame# */{
242242 It is assumed that the frame was not trimmed.
243243 */
244244 case 2 :
245- var rectInPixels = cc . RECT_POINTS_TO_PIXELS ( rect ) ;
246- return this . initWithTexture ( texture , rectInPixels , false , cc . PointZero ( ) , rectInPixels . size ) ;
245+ return this . initWithTexture ( texture , rect , false , cc . PointZero ( ) , rect . size ) ;
247246 break ;
248247
249248 /** Initializes a cc.SpriteFrame with a texture, rect, rotated, offset and originalSize in pixels.
@@ -278,14 +277,13 @@ cc.SpriteFrame = cc.Class.extend(/** @lends cc.SpriteFrame# */{
278277 * @param {cc.Size } originalSize
279278 */
280279 initWithTextureFilename :function ( filename , rect , rotated , offset , originalSize ) {
281- var rectInPixels = cc . RECT_POINTS_TO_PIXELS ( rect ) ;
282280 offset = offset || cc . size ( 0 , 0 ) ;
283- originalSize = originalSize || rectInPixels . size ;
281+ originalSize = originalSize || rect . size ;
284282
285283 this . _texture = null ;
286284 this . _textureFilename = filename ;
287- this . _rectInPixels = rectInPixels ;
288- this . _rect = cc . RECT_PIXELS_TO_POINTS ( rectInPixels ) ;
285+ this . _rectInPixels = rect ;
286+ this . _rect = cc . RECT_PIXELS_TO_POINTS ( rect ) ;
289287 this . _rotated = rotated || false ;
290288 this . _offsetInPixels = offset ;
291289 this . _offset = cc . POINT_PIXELS_TO_POINTS ( offset ) ;
0 commit comments