axmol/tools/tolua++/CCSprite.pkg

102 lines
3.5 KiB
Plaintext
Raw Normal View History

2012-04-09 00:10:12 +08:00
/*
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-04-09 00:10:12 +08:00
*/
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);
2012-04-09 00:10:12 +08:00
//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);
2012-04-09 00:10:12 +08:00
//void setUsesSpriteBatchNode(bool bUsesSpriteBatchNode);
2011-06-14 14:31:25 +08:00
void setTextureAtlas(CCTextureAtlas *pobTextureAtlas);
2012-02-02 14:26:38 +08:00
CCTextureAtlas* getTextureAtlas(void);
2012-04-09 00:10:12 +08:00
//void setSpriteBatchNode(CCSpriteBatchNode *pobSpriteBatchNode);
//CCSpriteBatchNode* getSpriteBatchNode(void);
//void setHonorParentTransform(ccHonorParentTransform eHonorParentTransform);
//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
CCPoint getOffsetPosition(void);
2011-06-14 14:31:25 +08:00
void setDirtyRecursively(bool bValue);
2012-06-15 17:26:11 +08:00
void ignoreAnchorPointForPosition(bool newValue);
2011-06-14 14:31:25 +08:00
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
void removeChild(CCNode* pChild, bool bCleanUp);
void removeAllChildrenWithCleanup(bool bCleanup);
void reorderChild(CCNode* pChild, int zOrder);
void addChild(CCNode* pChild);
void addChild(CCNode* pChild, int zOrder);
void addChild(CCNode* pChild, int zOrder, int tag);
void sortAllChildren();
//void setPosition(CCPoint pos);
void setRotation(float rotation);
void setSkewX(float sx);
void setSkewY(float sy);
void setScale(float fScale);
void setScaleX(float fScaleX);
void setScaleY(float fScaleY);
void setVertexZ(float fVertexZ);
void setAnchorPoint(const CCPoint & anchor);
void setVisible(bool bVisible);
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);
2012-06-15 17:26:11 +08:00
void setOpacityModifyRGB(bool bValue);
bool isOpacityModifyRGB(void);
2011-06-14 14:31:25 +08:00
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);
2012-04-09 00:10:12 +08:00
//void useSelfRender(void);
void setTextureRect(CCRect rect);
void setTextureRect(CCRect rect, bool rotated, CCSize size);
void setVertexRect(CCRect rect);
2012-04-09 00:10:12 +08:00
//void useBatchNode(CCSpriteBatchNode *batchNode);
2011-06-14 14:31:25 +08:00
void setDisplayFrame(CCSpriteFrame *pNewFrame);
bool isFrameDisplayed(CCSpriteFrame *pFrame);
CCSpriteFrame* displayFrame(void);
void setBatchNode(CCSpriteBatchNode* pBatchNode);
CCSpriteBatchNode* getBatchNode();
2011-06-14 14:31:25 +08:00
void setDisplayFrameWithAnimationName(const char *animationName, int frameIndex);
static CCSprite* createWithTexture(CCTexture2D *pTexture);
static CCSprite* createWithTexture(CCTexture2D *pTexture, CCRect rect);
static CCSprite* createWithSpriteFrame(CCSpriteFrame *pSpriteFrame);
static CCSprite* createWithSpriteFrameName(const char *pszSpriteFrameName);
static CCSprite* create(const char *pszFileName, CCRect rect);
static CCSprite* create(const char *pszFileName);
static CCSprite* create();
2011-06-14 14:31:25 +08:00
};