From 7d812822bd9c522efc0730a4f219ccec9cfb4a57 Mon Sep 17 00:00:00 2001 From: Diego Borghetti Date: Tue, 18 Aug 2009 19:26:53 +0000 Subject: Stamp info back only for float buffer. (next commit add unsigned char). A couple of new functions: BLF_width_and_height - Merge of BLF_width and BLF_height in one call to avoid freetype2 stuff. BLF_buffer - Set the buffer, size and number of channel. BLF_buffer_col - Set the text color (the alpha is not used right now). BLF_draw_buffer - Draw the text in the current buffer. Also tweak a little the boundbox and draw function to avoid access the freetype2 and use the cache info. By default the font size is 12, the UI still need work to allow change the font and size. --- source/blender/blenfont/intern/blf_internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/blenfont/intern/blf_internal.h') diff --git a/source/blender/blenfont/intern/blf_internal.h b/source/blender/blenfont/intern/blf_internal.h index 30d5c8ede65..2a69b8652ea 100644 --- a/source/blender/blenfont/intern/blf_internal.h +++ b/source/blender/blenfont/intern/blf_internal.h @@ -45,7 +45,9 @@ void blf_font_attach_from_mem(FontBLF *font, const unsigned char *mem, int mem_s void blf_font_size(FontBLF *font, int size, int dpi); void blf_font_draw(FontBLF *font, char *str); +void blf_font_buffer(FontBLF *font, char *str); void blf_font_boundbox(FontBLF *font, char *str, rctf *box); +void blf_font_width_and_height(FontBLF *font, char *str, float *width, float *height); float blf_font_width(FontBLF *font, char *str); float blf_font_height(FontBLF *font, char *str); float blf_font_fixed_width(FontBLF *font); -- cgit v1.2.3