Exemplo n.º 1
0
CCScale9Sprite* CCScale9Sprite::resizableSpriteWithCapInsets(CCRect capInsets)
{
    CCScale9Sprite* pReturn = new CCScale9Sprite();
    if ( pReturn && pReturn->initWithImage(m_pImage, m_spriteRect, capInsets) )
    {
        pReturn->autorelease();
        return pReturn;
    }
    CC_SAFE_DELETE(pReturn);
    return NULL;
}
Exemplo n.º 2
0
CCScale9Sprite* CCScale9Sprite::createWithImage(CAImage* texture)
{
	CCScale9Sprite* pReturn = new CCScale9Sprite();
	if (pReturn && pReturn->initWithImage(texture))
	{
		pReturn->autorelease();
		return pReturn;
	}
	CC_SAFE_DELETE(pReturn);
	return NULL;
}