axmol/tools/tolua++/CCSprite.pkg

82 lines
2.9 KiB
Plaintext
Raw Normal View History

2011-06-14 14:31:25 +08:00
typedef enum {
//! Translate with it's parent
CC_HONOR_PARENT_TRANSFORM_TRANSLATE = 1 << 0,
//! Rotate with it's parent
CC_HONOR_PARENT_TRANSFORM_ROTATE = 1 << 1,
//! Scale with it's parent
CC_HONOR_PARENT_TRANSFORM_SCALE = 1 << 2,
2011-07-11 14:00:55 +08:00
//! Skew with it's parent
CC_HONOR_PARENT_TRANSFORM_SKEW = 1 << 3,
2011-06-14 14:31:25 +08:00
//! All possible transformation enabled. Default value.
2011-07-11 14:00:55 +08:00
CC_HONOR_PARENT_TRANSFORM_ALL = CC_HONOR_PARENT_TRANSFORM_TRANSLATE | CC_HONOR_PARENT_TRANSFORM_ROTATE | CC_HONOR_PARENT_TRANSFORM_SCALE | CC_HONOR_PARENT_TRANSFORM_SKEW,
2011-06-14 14:31:25 +08:00
} ccHonorParentTransform;
2012-02-02 14:26:38 +08:00
class CCSprite : public CCNode
2011-06-14 14:31:25 +08:00
{
void setDirty(bool bDirty);
2012-02-02 14:26:38 +08:00
bool isDirty(void);
2011-06-14 14:31:25 +08:00
ccV3F_C4B_T2F_Quad getQuad(void);
CCRect getTextureRect(void);
bool isUsesBatchNode(void);
2012-02-02 14:26:38 +08:00
bool isTextureRectRotated(void);
2011-06-14 14:31:25 +08:00
2012-02-02 14:26:38 +08:00
void setAtlasIndex(unsigned int uAtlasIndex);
unsigned int getAtlasIndex(void);
2011-06-14 14:31:25 +08:00
void setUsesSpriteBatchNode(bool bUsesSpriteBatchNode);
void setTextureAtlas(CCTextureAtlas *pobTextureAtlas);
2012-02-02 14:26:38 +08:00
CCTextureAtlas* getTextureAtlas(void);
2011-06-14 14:31:25 +08:00
void setSpriteBatchNode(CCSpriteBatchNode *pobSpriteBatchNode);
2012-02-02 14:26:38 +08:00
CCSpriteBatchNode* getSpriteBatchNode(void);
void setHonorParentTransform(ccHonorParentTransform eHonorParentTransform);
2012-02-02 14:26:38 +08:00
ccHonorParentTransform getHonorParentTransform(void);
2011-06-14 14:31:25 +08:00
void setBlendFunc(ccBlendFunc blendFunc);
2012-02-02 14:26:38 +08:00
ccBlendFunc getBlendFunc(void);
2011-06-14 14:31:25 +08:00
2012-02-02 14:26:38 +08:00
CCPoint getOffsetPositionInPixels(void);
2011-06-14 14:31:25 +08:00
void setDirtyRecursively(bool bValue);
void setIsRelativeAnchorPoint(bool bRelative);
void setFlipX(bool bFlipX);
void setFlipY(bool bFlipY);
bool isFlipX(void);
bool isFlipY(void);
void updateColor(void);
2012-02-02 14:26:38 +08:00
2011-06-14 14:31:25 +08:00
void setOpacity(GLubyte opacity);
2012-02-02 14:26:38 +08:00
GLubyte getOpacity(void);
tolua_property__CCOpacity GLubyte opacity;
2011-06-14 14:31:25 +08:00
void setColor(ccColor3B color3);
2012-02-02 14:26:38 +08:00
ccColor3B getColor(void);
2011-06-14 14:31:25 +08:00
void setIsOpacityModifyRGB(bool bValue);
bool getIsOpacityModifyRGB(void);
2012-02-02 14:26:38 +08:00
void setTexture(CCTexture2D *texture);
2011-06-14 14:31:25 +08:00
CCTexture2D* getTexture(void);
void updateTransform(void);
void useSelfRender(void);
2012-02-02 14:26:38 +08:00
void setTextureRect(CCRect rect);
2011-06-14 14:31:25 +08:00
void setTextureRectInPixels(CCRect rect, bool rotated, CCSize size);
void useBatchNode(CCSpriteBatchNode *batchNode);
void setDisplayFrame(CCSpriteFrame *pNewFrame);
bool isFrameDisplayed(CCSpriteFrame *pFrame);
CCSpriteFrame* displayedFrame(void);
void setDisplayFrameWithAnimationName(const char *animationName, int frameIndex);
2012-02-02 14:26:38 +08:00
static CCSprite* spriteWithTexture(CCTexture2D *pTexture);
static CCSprite* spriteWithTexture(CCTexture2D *pTexture, CCRect rect);
static CCSprite* spriteWithTexture(CCTexture2D *pTexture, CCRect rect, CCPoint offset);
static CCSprite* spriteWithSpriteFrame(CCSpriteFrame *pSpriteFrame);
static CCSprite* spriteWithSpriteFrameName(const char *pszSpriteFrameName);
static CCSprite* spriteWithFile(const char *pszFileName);
static CCSprite* spriteWithFile(const char *pszFileName, CCRect rect);
static CCSprite* spriteWithBatchNode(CCSpriteBatchNode *batchNode, CCRect rect);
2011-06-14 14:31:25 +08:00
};