sftdlib header
More...
#include <3ds.h>
Go to the source code of this file.
|
int | sftd_init () |
| Initializates the library. More...
|
|
int | sftd_fini () |
| Finishes the library. More...
|
|
sftd_font * | sftd_load_font_file (const char *pathname) |
| Loads a font from a file. More...
|
|
sftd_font * | sftd_load_font_mem (const void *buffer, unsigned int size) |
| Loads a font from memory. More...
|
|
void | sftd_free_font (sftd_font *font) |
| Frees a font. More...
|
|
void | sftd_draw_text (sftd_font *font, int x, int y, unsigned int color, unsigned int size, const char *text) |
| Draws text using a font. More...
|
|
void | sftd_draw_wtext (sftd_font *font, int x, int y, unsigned int color, unsigned int size, const wchar_t *text) |
| Draws wide text using a font. More...
|
|
sftdlib header
- Author
- Sergi Granell (xerpi)
- Date
- 2 April 2015
void sftd_draw_text |
( |
sftd_font * |
font, |
|
|
int |
x, |
|
|
int |
y, |
|
|
unsigned int |
color, |
|
|
unsigned int |
size, |
|
|
const char * |
text |
|
) |
| |
Draws text using a font.
- Parameters
-
font | the font to use |
x | the x coordinate to draw the text to |
y | the y coordinate to draw the text to |
color | the color to draw the font |
size | the font size |
text | a pointer to the text to draw |
void sftd_draw_wtext |
( |
sftd_font * |
font, |
|
|
int |
x, |
|
|
int |
y, |
|
|
unsigned int |
color, |
|
|
unsigned int |
size, |
|
|
const wchar_t * |
text |
|
) |
| |
Draws wide text using a font.
- Parameters
-
font | the font to use |
x | the x coordinate to draw the text to |
y | the y coordinate to draw the text to |
color | the color to draw the font |
size | the font size |
text | a pointer to the wide text to draw |
Finishes the library.
- Returns
- Whether the finalization has been successful or not
Frees a font.
- Parameters
-
font | pointer to the font to freeze |
Initializates the library.
- Returns
- Whether the initialization has been successful or not
sftd_font* sftd_load_font_file |
( |
const char * |
pathname | ) |
|
Loads a font from a file.
- Parameters
-
pathname | the path to the font |
- Returns
- a pointer to the loaded font (NULL on error)
sftd_font* sftd_load_font_mem |
( |
const void * |
buffer, |
|
|
unsigned int |
size |
|
) |
| |
Loads a font from memory.
- Parameters
-
buffer | the address of the font |
size | the size of the font buffer |
- Returns
- a pointer to the loaded font (NULL on error)