2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
class CCSpriteFrame : public CCObject
|
2011-06-14 14:31:25 +08:00
|
|
|
{
|
2012-02-02 14:26:38 +08:00
|
|
|
CCRect getRectInPixels(void);
|
|
|
|
void setRectInPixels(CCRect rectInPixels);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
bool isRotated(void);
|
|
|
|
void setRotated(bool bRotated);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2013-07-04 12:50:17 +08:00
|
|
|
CCRect getRect(void) const;
|
2012-02-02 14:26:38 +08:00
|
|
|
void setRect(CCRect rect);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
CCPoint getOffsetInPixels(void);
|
|
|
|
void setOffsetInPixels(CCPoint offsetInPixels);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
CCSize getOriginalSizeInPixels(void);
|
|
|
|
void setOriginalSizeInPixels(CCSize sizeInPixels);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-08-10 18:14:04 +08:00
|
|
|
const CCSize & getOriginalSize();
|
|
|
|
void setOriginalSize(const CCSize & size);
|
|
|
|
|
|
|
|
CCTexture2D* getTexture(void);
|
2012-02-02 14:26:38 +08:00
|
|
|
void setTexture(CCTexture2D* pobTexture);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-08-10 18:14:04 +08:00
|
|
|
const CCPoint & getOffset();
|
|
|
|
void setOffset(const CCPoint & offsets);
|
|
|
|
|
2012-06-27 14:21:29 +08:00
|
|
|
static CCSpriteFrame* create(const char* filename, CCRect rect, bool rotated, CCPoint offset, CCSize originalSize);
|
2012-09-17 14:40:42 +08:00
|
|
|
static CCSpriteFrame* create(const char* filename, CCRect rect);
|
2012-08-10 18:14:04 +08:00
|
|
|
static CCSpriteFrame* createWithTexture(CCTexture2D* pobTexture, CCRect rect, bool rotated, CCPoint offset, CCSize originalSize);
|
2012-09-17 14:40:42 +08:00
|
|
|
static CCSpriteFrame* createWithTexture(CCTexture2D* pobTexture, CCRect rect);
|
2011-06-14 14:31:25 +08:00
|
|
|
};
|