X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=bigscreen%2Ffonts.h;h=b465aa1ff859d591c35f24783eaf9fa4df4b156b;hp=533e4ff5f13f6fa079acc56b444aa73452882dff;hb=88b3ef1f363e8181e7eb04e24f1646fe9782bb44;hpb=eb548f080c1bfba8b4e5c23a8d5d1a8da229a78c diff --git a/bigscreen/fonts.h b/bigscreen/fonts.h index 533e4ff..b465aa1 100644 --- a/bigscreen/fonts.h +++ b/bigscreen/fonts.h @@ -6,7 +6,19 @@ #include #include "widestring.h" +struct TextDefer { + widestring str; + double size; + unsigned xpos, ypos; + + bool changed; +}; + void init_freetype(); -int my_draw_text(const widestring &str, unsigned char *buf, int xpos, int ypos, bool real_render, int r, int g, int b); +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); + +// 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); +void draw_all_deferred_text(unsigned char *buf, std::vector ¤t, std::vector &old); #endif /* !defined(_FONTS_H) */