axmol/tools/tolua++/CCSpriteFrame.pkg

50 lines
1.5 KiB
Plaintext
Raw Normal View History

2011-06-14 14:31:25 +08:00
namespace cocos2d {
class CCSpriteFrame : public CCObject
{
CCRect getRectInPixels(void);
void setRectInPixels(CCRect rectInPixels);
bool isRotated(void);
void setRotated(bool bRotated);
CCRect getRect(void);
void setRect(CCRect rect);
CCPoint getOffsetInPixels(void);
void setOffsetInPixels(CCPoint offsetInPixels);
CCSize getOriginalSizeInPixels(void);
void setOriginalSizeInPixels(CCSize sizeInPixels);
CCTexture2D* getTexture(void);
void setTexture(CCTexture2D* pobTexture);
~CCSpriteFrame(void);
virtual CCObject* copyWithZone(CCZone *pZone);
/** Create a CCSpriteFrame with a texture, rect in points.
It is assumed that the frame was not trimmed.
*/
static CCSpriteFrame* frameWithTexture(CCTexture2D* pobTexture, CCRect rect);
/** Create a CCSpriteFrame with a texture, rect, rotated, offset and originalSize in pixels.
The originalSize is the size in points of the frame before being trimmed.
*/
static CCSpriteFrame* frameWithTexture(CCTexture2D* pobTexture, CCRect rect, bool rotated, CCPoint offset, CCSize originalSize);
bool initWithTexture(CCTexture2D* pobTexture, CCRect rect);
/** Initializes a CCSpriteFrame with a texture, rect, rotated, offset and originalSize in pixels.
The originalSize is the size in points of the frame before being trimmed.
*/
bool initWithTexture(CCTexture2D* pobTexture, CCRect rect, bool rotated, CCPoint offset, CCSize originalSize);
};
}//namespace cocos2d