Пример #1
0
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;
}
Пример #2
0
TextureRegion* TextureRegion::createWithTexture(Texture2D *texture, const Rect& rect)
{
    TextureRegion *TextureRegion = new (std::nothrow) TextureRegion();
    TextureRegion->initWithTexture(texture, rect);
    TextureRegion->autorelease();
    
    return TextureRegion;
}