My Project
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Properties | List of all members
GraphicDNA.FontChar Class Reference

Public Member Functions

void Init (int pFontSize, int pTextureWidth, int pTextureHeight, char pChr)
 Preprocess some character data for rendering.
 

Public Attributes

int OriginalFontSize
 Original Font Size.
 
Vector2 TextureSize
 Size of the texture atlas that holds all characters, in Pixels.
 
char Char
 Character to be printed.
 
Vector2 PositionUV
 UV Texture coords of the char within the texture atlas.
 
Vector2 RelativeSize
 Size of the char, relative to the FontSize (in percent, 0..1)
 
Vector2 RelativeOffset
 How much the current position should be offset when copying the image from the texture to the screen, in relative coords to fontsize (0..1)
 
Vector2 SizeUV
 Size of the char in TextureCoords.
 
float RelativeAdvanceInX
 Advance in the X direction, in Coords relative to the font size.
 

Properties

Int32 ID [get, set]
 Character ID according to ASCII convention.
 
Int32 X [get, set]
 The left position of the character image in the texture.
 
Int32 Y [get, set]
 The top position of the character image in the texture.
 
Int32 Width [get, set]
 The width of the character image in the texture.
 
Int32 Height [get, set]
 The height of the character image in the texture.
 
Int32 XOffset [get, set]
 How much the current position should be offset when copying the image from the texture to the screen.
 
Int32 YOffset [get, set]
 How much the current position should be offset when copying the image from the texture to the screen.
 
Int32 XAdvance [get, set]
 How much the current position should be advanced after drawing the character.
 
Int32 Page [get, set]
 The texture page where the character image is found.
 
Int32 Channel [get, set]
 The texture channel where the character image is found (1 = blue, 2 = green, 4 = red, 8 = alpha, 15 = all channels).
 

Member Function Documentation

◆ Init()

void GraphicDNA.FontChar.Init ( int  pFontSize,
int  pTextureWidth,
int  pTextureHeight,
char  pChr 
)
inline

Preprocess some character data for rendering.

Parameters
pFontSizeSize of the font
pTextureWidthWidth of the texture atlas
pTextureHeightHeight of the texture atlas
pChrCharacter of this char

The documentation for this class was generated from the following file: