C# Class SparrowSharp.Fonts.BitmapChar

A BitmapChar contains the information about one char of a bitmap font. _You don't have to use this class directly in most cases._
Show file Open project: fmotagarcia/sparrow-sharp Class Usage Examples

Public Properties

Property Type Description
CharId int
Texture Sparrow.Textures.Texture
XAdvance float
XOffset float
YOffset float

Public Methods

Method Description
AddKerning ( float amount, int charId ) : void

Adds kerning information relative to a specific other character ID.

BitmapChar ( Texture texture ) : System.Collections.Generic

Initializes a char with a texture.

BitmapChar ( int charId, Texture texture, float xOffset, float yOffset, float xAdvance ) : System.Collections.Generic

Initializes a char with a texture and its properties.

KerningToChar ( int charId ) : float

Retrieve kerning information relative to the given character ID.

Method Details

AddKerning() public method

Adds kerning information relative to a specific other character ID.
public AddKerning ( float amount, int charId ) : void
amount float
charId int
return void

BitmapChar() public method

Initializes a char with a texture.
public BitmapChar ( Texture texture ) : System.Collections.Generic
texture Sparrow.Textures.Texture
return System.Collections.Generic

BitmapChar() public method

Initializes a char with a texture and its properties.
public BitmapChar ( int charId, Texture texture, float xOffset, float yOffset, float xAdvance ) : System.Collections.Generic
charId int
texture Sparrow.Textures.Texture
xOffset float
yOffset float
xAdvance float
return System.Collections.Generic

KerningToChar() public method

Retrieve kerning information relative to the given character ID.
public KerningToChar ( int charId ) : float
charId int
return float

Property Details

CharId public property

The unicode ID of the char.
public int CharId
return int

Texture public property

The texture of the character.
public Texture,Sparrow.Textures Texture
return Sparrow.Textures.Texture

XAdvance public property

The number of pixels the cursor has to be moved to the right for the next char.
public float XAdvance
return float

XOffset public property

The number of pixels to move the char in x direction on character arrangement.
public float XOffset
return float

YOffset public property

The number of pixels to move the char in y direction on character arrangement.
public float YOffset
return float