SPBitmapChar Class Reference
| Inherits from | NSObject |
| Declared in | SPBitmapChar.h |
Overview
A BitmapChar contains the information about one char of a bitmap font.
You don’t have to use this class directly in most cases.
Tasks
Initialization
-
– initWithID:texture:xOffset:yOffset:xAdvance:Initializes a char with a texture and its properties.
Methods
-
– addKerning:toChar:Adds kerning information relative to a specific other character ID.
-
– kerningToChar:Retrieve kerning information relative to the given character ID.
-
– createImageCreates an image of the char.
Properties
-
charIDThe unicode ID of the char.
property -
xOffsetThe number of pixels to move the char in x direction on character arrangement.
property -
yOffsetThe number of pixels to move the char in y direction on character arrangement.
property -
xAdvanceThe number of pixels the cursor has to be moved to the right for the next char.
property -
textureThe texture of the character.
property -
widthThe width of the character in points.
property -
heightThe height of the character in points.
property
Properties
charID
The unicode ID of the char.
@property (nonatomic, readonly) int charIDDiscussion
The unicode ID of the char.
Declared In
SPBitmapChar.hheight
The height of the character in points.
@property (nonatomic, readonly) float heightDiscussion
The height of the character in points.
Declared In
SPBitmapChar.htexture
The texture of the character.
@property (nonatomic, readonly) SPTexture *textureDiscussion
The texture of the character.
Declared In
SPBitmapChar.hwidth
The width of the character in points.
@property (nonatomic, readonly) float widthDiscussion
The width of the character in points.
Declared In
SPBitmapChar.hxAdvance
The number of pixels the cursor has to be moved to the right for the next char.
@property (nonatomic, readonly) float xAdvanceDiscussion
The number of pixels the cursor has to be moved to the right for the next char.
Declared In
SPBitmapChar.hInstance Methods
addKerning:toChar:
Adds kerning information relative to a specific other character ID.
- (void)addKerning:(float)amount toChar:(int)charIDDiscussion
Adds kerning information relative to a specific other character ID.
Declared In
SPBitmapChar.hcreateImage
Creates an image of the char.
- (SPImage *)createImageDiscussion
Creates an image of the char.
Declared In
SPBitmapChar.hinitWithID:texture:xOffset:yOffset:xAdvance:
Initializes a char with a texture and its properties.
- (instancetype)initWithID:(int)charID texture:(SPTexture *)texture xOffset:(float)xOffset yOffset:(float)yOffset xAdvance:(float)xAdvanceDiscussion
Initializes a char with a texture and its properties.
Declared In
SPBitmapChar.h