X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bigscreen%2Ffonts.h;h=0174a7058a286f555deacbbf5da2491b86aa442b;hb=cad5aff5a3a21bb8c95d8a265e93687234f46a43;hp=5377ad0853773c5506a00dafeaa2316fa48d5a8c;hpb=47647e430209e70479579de3725b193baf26630a;p=ccbs diff --git a/bigscreen/fonts.h b/bigscreen/fonts.h index 5377ad0..0174a70 100644 --- a/bigscreen/fonts.h +++ b/bigscreen/fonts.h @@ -4,9 +4,22 @@ #include #include FT_FREETYPE_H #include +#include #include "widestring.h" +struct TextDefer { + widestring str; + double size; + unsigned xpos, ypos; + std::string theme_element, fresh_theme_element; +}; + void init_freetype(); -unsigned my_draw_text(const widestring &str, unsigned char *buf, int xpos, int ypos, bool real_render, int r, int g, int b); +void set_screen_size(unsigned width, unsigned height); +unsigned my_draw_text(const widestring &str, unsigned char *buf, double size, const std::string &theme_element, int xpos = 0, int ypos = 0); + +// draw_all_deferred_text draws every string in current that is not the same in old, with a different theme +void my_draw_text_deferred(std::vector &td, const widestring &str, double size, const std::string &theme_element, const std::string &fresh_theme_element, int xpos, int ypos); +void draw_all_deferred_text(unsigned char *buf, std::vector ¤t, std::vector &old); #endif /* !defined(_FONTS_H) */