Class CCSpriteFrame

#include <Geode/cocos/sprite_nodes/CCSpriteFrame.h>
classCCSpriteFrame:publiccocos2d::CCObject{ ... }

A CCSpriteFrame has:

Examples0
Public static methods4
staticcocos2d::CCSpriteFrame*create(
charconst*filename
,)

Create a CCSpriteFrame with a texture filename, rect in points. It is assumed that the frame was not trimmed.

staticcocos2d::CCSpriteFrame*create(
charconst*filename
,,
boolrotated
,,)

Create a CCSpriteFrame with a texture filename, rect, rotated, offset and originalSize in pixels. The originalSize is the size in pixels of the frame before being trimmed.

staticcocos2d::CCSpriteFrame*createWithTexture(,)

Create a CCSpriteFrame with a texture, rect in points. It is assumed that the frame was not trimmed.

staticcocos2d::CCSpriteFrame*createWithTexture(,,
boolrotated
,,)

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.

Public member functions23
cocos2d::CCRectconst&getRectInPixels()
No description provided
voidsetRectInPixels()
No description provided
boolisRotated()
No description provided
voidsetRotated(
boolbRotated
)
No description provided
cocos2d::CCRectconst&getRect()

get rect of the frame

voidsetRect()

set rect of the frame

cocos2d::CCPointconst&getOffsetInPixels()

get offset of the frame

voidsetOffsetInPixels()

set offset of the frame

cocos2d::CCSizeconst&getOriginalSizeInPixels()

get original size of the trimmed image

voidsetOriginalSizeInPixels()

set original size of the trimmed image

cocos2d::CCSizeconst&getOriginalSize()

get original size of the trimmed image

voidsetOriginalSize()

set original size of the trimmed image

cocos2d::CCTexture2D*getTexture()

get texture of the frame

voidsetTexture()

set texture of the frame, the texture is retained

cocos2d::CCPointconst&getOffset()
No description provided
voidsetOffset()
No description provided
virtualcocos2d::CCObject*copyWithZone()
No description provided
boolinitWithTexture(,)

Initializes a CCSpriteFrame with a texture, rect in points. It is assumed that the frame was not trimmed.

boolinitWithTextureFilename(
charconst*filename
,)

Initializes a CCSpriteFrame with a texture filename, rect in points; It is assumed that the frame was not trimmed.

boolinitWithTexture(,,
boolrotated
,,)

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.

boolinitWithTextureFilename(
charconst*filename
,,
boolrotated
,,)

Since v1.1

Initializes a CCSpriteFrame with a texture, rect, rotated, offset and originalSize in pixels. The originalSize is the size in pixels of the frame before being trimmed.

gd::stringgetFrameName()const
No description provided
voidsetFrameName()
No description provided
Fields0
Protected member functions0
Protected fields10
;
No description provided
cocos2d::CCSizem_obOriginalSize
;
No description provided
cocos2d::CCRectm_obRectInPixels
;
No description provided
boolm_bRotated
;
No description provided
;
No description provided
cocos2d::CCPointm_obOffsetInPixels
;
No description provided
cocos2d::CCSizem_obOriginalSizeInPixels
;
No description provided
;
No description provided
gd::stringm_strTextureFilename
;
No description provided
gd::stringm_strFrameName
;
No description provided