X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=bigscreen%2Ffonts.h;h=eb7b6fa6cde447ad0ae87bfa3e24545aef696730;hp=5377ad0853773c5506a00dafeaa2316fa48d5a8c;hb=33798d738eb88b893f21818275c2f0f4b7f7562e;hpb=47647e430209e70479579de3725b193baf26630a diff --git a/bigscreen/fonts.h b/bigscreen/fonts.h index 5377ad0..eb7b6fa 100644 --- a/bigscreen/fonts.h +++ b/bigscreen/fonts.h @@ -6,7 +6,20 @@ #include #include "widestring.h" +struct TextDefer { + widestring str; + double size; + unsigned xpos, ypos; + + bool changed; +}; + 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, 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) */