Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef GLIB2D_FONT_H
- #define GLIB2D_FONT_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include "glib2d.h"
- #include <SDL_ttf.h>
- #define GLYPH_CACHE_SIZE (16)
- typedef struct
- {
- int id;
- char ch[4];
- g2dImage *tex;
- } g2dGlyph;
- typedef struct
- {
- TTF_Font *ttf;
- g2dGlyph *glyph_cache[GLYPH_CACHE_SIZE];
- } g2dFont;
- void g2dFontInit();
- void g2dFontTerm();
- g2dFont *g2dFontLoad(char *path, int pt);
- void g2dFontFree(g2dFont *font);
- void g2dFontBegin(g2dFont *font);
- void g2dFontEnd();
- void g2dFontReset();
- void g2dFontSetText(char *string);
- void g2dFontSetCoordXY(float x, float y);
- void g2dFontSetScale(float scale);
- void g2dFontSetColor(g2dColor color);
- void g2dFontSetShadowColor(g2dColor color);
- void g2dFontSetAlpha(int alpha);
- void g2dFontSetRotation(float degrees);
- void g2dFontSetCoordMode(g2dCoord_Mode mode);
- #ifdef __cplusplus
- }
- #endif
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement