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

Methods

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

xOffset

The number of pixels to move the char in x direction on character arrangement.

@property (nonatomic, readonly) float xOffset

Discussion

The number of pixels to move the char in x direction on character arrangement.

Declared In

SPBitmapChar.h

yOffset

The number of pixels to move the char in y direction on character arrangement.

@property (nonatomic, readonly) float yOffset

Discussion

The number of pixels to move the char in y direction on character arrangement.

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

kerningToChar:

Retrieve kerning information relative to the given character ID.

- (float)kerningToChar:(int)charID

Discussion

Retrieve kerning information relative to the given character ID.

Declared In

SPBitmapChar.h