#include <Font.h>
Public Member Functions | |
Font () | |
Constructor of the Font class. | |
Font (const char *file, int ptsize, long index=0) | |
Constructor of the Font class. | |
Font (const string &file, int ptsize, long index=0) | |
Constructor of the Font class. | |
Font (const Font &obj) | |
Copy constructor of the Font class. | |
Font & | operator= (Font &obj) |
Operator = of the Font class. | |
~Font () | |
Destructor of the Font class. | |
UINT | Load (const char *file, int ptsize, long index=0) |
Function to load a font from a file. | |
UINT | Load (const string &file, int ptsize, long index=0) |
Function to load a font from a file. | |
void | Free (void) |
Function to release the data of the Font object. | |
int | GetStyle (void) |
Function to obtain the style of the font. | |
void | SetStyle (int style) |
Function to change the style of the font. | |
int | GetHeight (void) |
Function to obtain the height of the font. | |
int | GetAscent (void) |
Function to obtain the ascent of the font. | |
int | GetDescent (void) |
Function to obtain the descent of the font. | |
int | GetLineSkip (void) |
Function to obtain the distance between two lines of the font. | |
int | GetSize (void) |
Function to obtain the size of the font. | |
int | GetSizeText (const char *text, int *w=NULL, int *h=NULL) |
Function to obtain the size of a string. | |
SDL_Surface * | RenderText (const char *text, dword fc) |
Function to render a string. | |
SDL_Surface * | RenderText2 (const char *text, SDL_Color color) |
Function to render a string. | |
SDL_Surface * | RenderUNICODE (const word *text, dword fc) |
Function to render a string. | |
SDL_Surface * | RenderUNICODE2 (const word *text, SDL_Color color) |
Function to render a string. |
The Font class serves to store in memory a type of True-Type font.
Yukino::Font::Font | ( | ) |
Constructor of the Font class.
Constructor by defect of the Font class.
Yukino::Font::Font | ( | const char * | file, | |
int | ptsize, | |||
long | index = 0 | |||
) |
Constructor of the Font class.
Constructor of the Font class, that loads a file.
file | Path of the file. | |
ptsize | Size of the font. | |
index | Index of the font. |
Yukino::Font::Font | ( | const string & | file, | |
int | ptsize, | |||
long | index = 0 | |||
) |
Constructor of the Font class.
Constructor of the Font class, that loads a file.
file | Path of the file. | |
ptsize | Size of the font. | |
index | Index of the font. |
Yukino::Font::Font | ( | const Font & | obj | ) |
Copy constructor of the Font class.
obj | Font object to copy. |
Yukino::Font::~Font | ( | ) |
void Yukino::Font::Free | ( | void | ) |
int Yukino::Font::GetAscent | ( | void | ) | [inline] |
Function to obtain the ascent of the font.
This function serves to obtain the ascent of the font.
int Yukino::Font::GetDescent | ( | void | ) | [inline] |
Function to obtain the descent of the font.
This function serves to obtain the descent of the font.
int Yukino::Font::GetHeight | ( | void | ) | [inline] |
Function to obtain the height of the font.
This function serves to obtain the height of the font.
int Yukino::Font::GetLineSkip | ( | void | ) | [inline] |
Function to obtain the distance between two lines of the font.
This function serves to obtain the distance between two lines.
int Yukino::Font::GetSize | ( | void | ) | [inline] |
Function to obtain the size of the font.
This function serves to obtain the size of the font.
int Yukino::Font::GetSizeText | ( | const char * | text, | |
int * | w = NULL , |
|||
int * | h = NULL | |||
) | [inline] |
Function to obtain the size of a string.
This function serves to obtain the size of a rendered string.
int Yukino::Font::GetStyle | ( | void | ) | [inline] |
Function to obtain the style of the font.
This function serves to obtain the style of the font.
UINT Yukino::Font::Load | ( | const string & | file, | |
int | ptsize, | |||
long | index = 0 | |||
) | [inline] |
Function to load a font from a file.
This function serves to load a font from a file.
file | Path of the file. | |
ptsize | Size of the font. | |
index | Index of the font. |
UINT Yukino::Font::Load | ( | const char * | file, | |
int | ptsize, | |||
long | index = 0 | |||
) |
Function to load a font from a file.
This function serves to load a font from a file.
file | Path of the file. | |
ptsize | Size of the font. | |
index | Index of the font. |
SDL_Surface* Yukino::Font::RenderText | ( | const char * | text, | |
dword | fc | |||
) | [inline] |
Function to render a string.
This function serves to render a string with a color.
text | String to render. | |
fc | Color of the string. |
SDL_Surface* Yukino::Font::RenderText2 | ( | const char * | text, | |
SDL_Color | color | |||
) | [inline] |
Function to render a string.
This function serves to render a string with a color.
text | String to render. | |
color | Color of the string. |
Function to render a string.
This function serves to render a string with a color.
text | String to render. | |
fc | Color of the string. |
SDL_Surface* Yukino::Font::RenderUNICODE2 | ( | const word * | text, | |
SDL_Color | color | |||
) | [inline] |
Function to render a string.
This function serves to render a string with a color.
text | String to render. | |
color | Color of the string. |
void Yukino::Font::SetStyle | ( | int | style | ) | [inline] |
Function to change the style of the font.
This function serves to change the style of the font.
style | Style of the font. |