X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bigscreen%2Ffonts.h;h=0174a7058a286f555deacbbf5da2491b86aa442b;hb=40a55879c3ebcefc70e52ad2f573cf0da10d3d73;hp=b465aa1ff859d591c35f24783eaf9fa4df4b156b;hpb=88b3ef1f363e8181e7eb04e24f1646fe9782bb44;p=ccbs diff --git a/bigscreen/fonts.h b/bigscreen/fonts.h index b465aa1..0174a70 100644 --- a/bigscreen/fonts.h +++ b/bigscreen/fonts.h @@ -4,21 +4,22 @@ #include #include FT_FREETYPE_H #include +#include #include "widestring.h" struct TextDefer { widestring str; double size; unsigned xpos, ypos; - - bool changed; + std::string theme_element, fresh_theme_element; }; void init_freetype(); -unsigned my_draw_text(const widestring &str, unsigned char *buf, double size, int xpos = 0, int ypos = 0, int r = 255, int g = 255, int b = 255); +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, in red -void my_draw_text_deferred(std::vector &td, const widestring &str, double size, int xpos, int ypos); +// 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) */