CCBitmapFontAtlas Class Reference
Inherits from | CCSpriteSheet : CCNode : NSObject |
Conforms to | CCLabelProtocol CCRGBAProtocol |
Declared in | CCBitmapFontAtlas.h |
Overview
CCBitmapFontAtlas is a subclass of CCSpriteSheet.
Features: – Treats each character like a CCSprite. This means that each individual character can be: – rotated – scaled – translated – tinted – chage the opacity – It can be used as part of a menu item. – anchorPoint can be used to align the “label” – Supports AngelCode text format
Limitations: – All inner characters are using an anchorPoint of (0.5f, 0.5f) and it is not recommend to change it
because it might affect the rendering
CCBitmapFontAtlas implements the protocol CCLabelProtocol, like CCLabel and CCLabelAtlas. CCBitmapFontAtlas has the flexibility of CCLabel, the speed of CCLabelAtlas and all the features of CCSprite. If in doubt, use CCBitmapFontAtlas instead of CCLabelAtlas / CCLabel.
Supported editors: – http://www.n4te.com/hiero/hiero.jnlp – http://slick.cokeandcode.com/demos/hiero.jnlp – http://www.angelcode.com/products/bmfont/
Tasks
-
+ purgeCachedData
Purges the cached data. Removes from memory the cached configurations and the atlas name dictionary.
-
opacity
conforms to CCRGBAProtocol protocol
property -
color
conforms to CCRGBAProtocol protocol
property -
+ bitmapFontAtlasWithString:fntFile:
creates a bitmap font altas with an initial string and the FNT file
-
– initWithString:fntFile:
init a bitmap font altas with an initial string and the FNT file
-
– createFontChars
updates the font chars based on the string to render