TextureRegion* TextureRegion::createWithTexture(Texture2D* texture, const Rect& rect, bool rotated, const Point& offset, const Size& originalSize) { TextureRegion *TextureRegion = new (std::nothrow) TextureRegion(); TextureRegion->initWithTexture(texture, rect, rotated, offset, originalSize); TextureRegion->autorelease(); return TextureRegion; }
TextureRegion* TextureRegion::createWithTexture(Texture2D *texture, const Rect& rect) { TextureRegion *TextureRegion = new (std::nothrow) TextureRegion(); TextureRegion->initWithTexture(texture, rect); TextureRegion->autorelease(); return TextureRegion; }