X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=bigscreen%2Ffonts.h;fp=bigscreen%2Ffonts.h;h=0174a7058a286f555deacbbf5da2491b86aa442b;hp=6950168432abb4f0d6973f91ef5ba6776d50b8d3;hb=bbbf0f34d43aa3b6f43225fb6c2d45566a423ab1;hpb=d4ec885cadcbcce077579bdd24c93ead18b06852 diff --git a/bigscreen/fonts.h b/bigscreen/fonts.h index 6950168..0174a70 100644 --- a/bigscreen/fonts.h +++ b/bigscreen/fonts.h @@ -4,25 +4,22 @@ #include #include FT_FREETYPE_H #include +#include #include "widestring.h" -#include "design.h" struct TextDefer { widestring str; double size; unsigned xpos, ypos; - int r, g, b; - int rn, gn, bn; - - bool changed; + std::string theme_element, fresh_theme_element; }; void init_freetype(); void set_screen_size(unsigned width, unsigned height); -unsigned my_draw_text(const widestring &str, unsigned char *buf, double size, int xpos = 0, int ypos = 0, int r = DATA_RED, int g = DATA_GREEN, int b = DATA_BLUE); +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, int r = DATA_RED, int g = DATA_GREEN, int b = DATA_BLUE, int rn = FRESH_DATA_RED, int gn = FRESH_DATA_GREEN, int bn = FRESH_DATA_BLUE); +// 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) */