Another ANSI library for awesome text rendering in terminals.
- Beginner friendly.
- Cross-platform.
- Header-only.
void tr_effect(TrEffect effects); // BOLD, DIM, UNDERLINE, BLINK, INVERT, HIDDEN, STRIKETHROUGH
void tr_fg_color(uint32_t fg_color, TrColorsMode fg_mode); // Supports ANSI 16, ANSI 256, true colors.
void tr_bg_color(uint32_t bg_color, TrColorsMode bg_mode);
void tr_draw_sprite(const TrPixel *sprite, int width, int height, int x, int y);
void tr_draw_text(const char *text, const TrStyle *style, int x, int y);
void tr_fb_clear(TrPixel *fb, int fb_width, int fb_height, uint32_t bg_color, TrColorsMode bg_mode);
void tr_fb_render(TrPixel *curr_fb, TrPixel *prev_fb, int fb_width, int fb_height);
void tr_fb_draw_sprite(TrPixel *fb, int fb_width, int fb_height, const TrPixel *sprite, int sprite_width, int sprite_height, int sprite_x, int sprite_y);
void tr_fb_draw_text(TrPixel *fb, int fb_width, int fb_height, const char *text, const TrStyle *text_style, int text_x, int text_y);
void tr_clear(void); // Clear the screen
void tr_move_cursor(int x, int y);
void tr_show_cursor(bool visible);
Just add trenderer.h
to your project and it's good to go.