Esempio n. 1
0
TextureRegion* TextureRegion::create(const std::string& filename, const Rect& rect, bool rotated, const Point& offset, const Size& originalSize)
{
    TextureRegion *TextureRegion = new (std::nothrow) TextureRegion();
    TextureRegion->initWithTextureFilename(filename, rect, rotated, offset, originalSize);
    TextureRegion->autorelease();

    return TextureRegion;
}
Esempio n. 2
0
TextureRegion* TextureRegion::clone() const
{
	// no copy constructor	
    TextureRegion *copy = new (std::nothrow) TextureRegion();
    copy->initWithTextureFilename(_textureFilename.c_str(), _rectInPixels, _rotated, _offsetInPixels, _originalSizeInPixels);
    copy->setTexture(_texture);
    copy->autorelease();
    return copy;
}
Esempio n. 3
0
FLAKOR_NS_BEGIN

// implementation of TextureRegion

TextureRegion* TextureRegion::create(const std::string& filename, const Rect& rect)
{
    TextureRegion *TextureRegion = new (std::nothrow) TextureRegion();
    TextureRegion->initWithTextureFilename(filename, rect);
    TextureRegion->autorelease();

    return TextureRegion;
}