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.
-
– createImage
Creates an image of the char.
Properties
-
charID
The unicode ID of the char.
property -
xOffset
The number of pixels to move the char in x direction on character arrangement.
property -
yOffset
The number of pixels to move the char in y direction on character arrangement.
property -
xAdvance
The number of pixels the cursor has to be moved to the right for the next char.
property -
texture
The texture of the character.
property -
width
The width of the character in points.
property -
height
The height of the character in points.
property
Properties
charID
The unicode ID of the char.
@property (nonatomic, readonly) int charID
Discussion
The unicode ID of the char.
Declared In
SPBitmapChar.h
height
The height of the character in points.
@property (nonatomic, readonly) float height
Discussion
The height of the character in points.
Declared In
SPBitmapChar.h
texture
The texture of the character.
@property (nonatomic, readonly) SPTexture *texture
Discussion
The texture of the character.
Declared In
SPBitmapChar.h
width
The width of the character in points.
@property (nonatomic, readonly) float width
Discussion
The width of the character in points.
Declared In
SPBitmapChar.h
xAdvance
The number of pixels the cursor has to be moved to the right for the next char.
@property (nonatomic, readonly) float xAdvance
Discussion
The number of pixels the cursor has to be moved to the right for the next char.
Declared In
SPBitmapChar.h
Instance Methods
addKerning:toChar:
Adds kerning information relative to a specific other character ID.
- (void)addKerning:(float)amount toChar:(int)charID
Discussion
Adds kerning information relative to a specific other character ID.
Declared In
SPBitmapChar.h
createImage
Creates an image of the char.
- (SPImage *)createImage
Discussion
Creates an image of the char.
Declared In
SPBitmapChar.h
initWithID: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)xAdvance
Discussion
Initializes a char with a texture and its properties.
Declared In
SPBitmapChar.h