29 lines
824 B
C
29 lines
824 B
C
// text.h
|
|
#ifndef TEXT_RENDERER_H
|
|
#define TEXT_RENDERER_H
|
|
|
|
#include <stdint.h>
|
|
|
|
struct text_t;
|
|
|
|
extern "C" {
|
|
text_t* text_init(int width, int height);
|
|
// shares cache, prefer when using the same font to save memory
|
|
text_t* text_init_shared(text_t* source, int width, int height);
|
|
void text_destroy(text_t* text);
|
|
void text_push(text_t* text,
|
|
const char* str,
|
|
float size,
|
|
float speed,
|
|
const char* font_path,
|
|
bool outline);
|
|
// finish current text immediately
|
|
void text_show_all_current(text_t* text);
|
|
bool text_is_animating(text_t* text);
|
|
// advance, call every frame, returns false when done
|
|
bool text_nextframe(text_t* text);
|
|
uint32_t* text_getfb(text_t* text);
|
|
void text_clear(text_t* text);
|
|
}
|
|
|
|
#endif // TEXT_RENDERER_H
|