#import <CCSpriteFrame.h>
|
|
CGRect | rect_ |
| |
|
CGRect | rectInPixels_ |
| |
|
BOOL | rotated_ |
| |
|
CGPoint | offset_ |
| |
|
CGPoint | offsetInPixels_ |
| |
|
CGSize | originalSize_ |
| |
|
CGSize | originalSizeInPixels_ |
| |
|
CCTexture2D * | texture_ |
| |
|
NSString * | textureFilename_ |
| |
A CCSpriteFrame has:
You can modify the frame of a CCSprite by doing:
CCSpriteFrame *frame = [CCSpriteFrame frameWithTexture:texture rect:rect offset:offset]; [sprite setDisplayFrame:frame];
| + (id) frameWithTexture: |
|
(CCTexture2D *) |
texture |
| rect: |
|
(CGRect) |
rect |
|
|
| |
Create a CCSpriteFrame with a texture, rect in points. It is assumed that the frame was not trimmed.
| + (id) frameWithTexture: |
|
(CCTexture2D *) |
texture |
| rectInPixels: |
|
(CGRect) |
rect |
| rotated: |
|
(BOOL) |
rotated |
| offset: |
|
(CGPoint) |
offset |
| originalSize: |
|
(CGSize) |
originalSize |
|
|
| |
Create 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.
| + (id) frameWithTextureFilename: |
|
(NSString *) |
filename |
| rect: |
|
(CGRect) |
rect |
|
|
| |
Create a CCSpriteFrame with a texture filename, rect in points. It is assumed that the frame was not trimmed.
| + (id) frameWithTextureFilename: |
|
(NSString *) |
filename |
| rectInPixels: |
|
(CGRect) |
rect |
| rotated: |
|
(BOOL) |
rotated |
| offset: |
|
(CGPoint) |
offset |
| originalSize: |
|
(CGSize) |
originalSize |
|
|
| |
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.
| - (id) initWithTexture: |
|
(CCTexture2D *) |
texture |
| rect: |
|
(CGRect) |
rect |
|
|
| |
Initializes a CCSpriteFrame with a texture, rect in points; It is assumed that the frame was not trimmed.
| - (id) initWithTexture: |
|
(CCTexture2D *) |
texture |
| rectInPixels: |
|
(CGRect) |
rect |
| rotated: |
|
(BOOL) |
rotated |
| offset: |
|
(CGPoint) |
offset |
| originalSize: |
|
(CGSize) |
originalSize |
|
|
| |
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.
| - (id) initWithTextureFilename: |
|
(NSString *) |
filename |
| rect: |
|
(CGRect) |
rect |
|
|
| |
Initializes a CCSpriteFrame with a texture filename, rect in points; It is assumed that the frame was not trimmed.
| - (id) initWithTextureFilename: |
|
(NSString *) |
filename |
| rectInPixels: |
|
(CGRect) |
rect |
| rotated: |
|
(BOOL) |
rotated |
| offset: |
|
(CGPoint) |
offset |
| originalSize: |
|
(CGSize) |
originalSize |
|
|
| |
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.
- Since
- v1.1
offset of the frame in points
| - (CGPoint) offsetInPixels |
|
readwritenonatomicassign |
offset of the frame in pixels
original size of the trimmed image in points
| - (CGSize) originalSizeInPixels |
|
readwritenonatomicassign |
original size of the trimmed image in pixels
rect of the frame in points. If it is updated, then rectInPixels will be updated too.
rect of the frame in pixels. If it is updated, then rect (points) will be updated too.
whether or not the rect of the frame is rotated ( x = x+width, y = y+height, width = height, height = width )
| - (NSString*) textureFilename |
|
readnonatomicretain |
texture file name of the frame
The documentation for this class was generated from the following file: