shithub: m8c

ref: 4fe8c338e1655229fc0f862f40877994f107d013
dir: /src/SDL2_inprint.h/

View raw version
// Based on bitmap font routine by driedfruit, https://github.com/driedfruit/SDL_inprint
// Released into public domain.

#ifndef SDL2_inprint_h
#define SDL2_inprint_h

#include "fonts/fonts.h"
#include <SDL3/SDL.h>

extern void inline_font_initialize(const struct inline_font *font);
extern void inline_font_close(void);

extern void inline_font_set_renderer(SDL_Renderer *renderer);
extern void infont(SDL_Texture *font);
extern void incolor1(const SDL_Color *color);
extern void incolor(Uint32 color); /* Color must be in 0x00RRGGBB format ! */
extern void inprint(SDL_Renderer *dst, const char *str, Uint32 x, Uint32 y, Uint32 fgcolor,
                    Uint32 bgcolor);

const struct inline_font *inline_font_get_current(void);

#endif /* SDL2_inprint_h */