From 16a61743e133e505bd4666ad30d1697764171ad8 Mon Sep 17 00:00:00 2001 From: Diego Borghetti Date: Tue, 17 Feb 2009 16:56:29 +0000 Subject: Making the things compiled!! I change the #if 0 with #if WITH_FREETYPE2, also fix a lot of typos, etc. This is the basic but now it draw text!!, I am using the "User Preference" space to test the library, nobody is working on that and the option are in the outliner now so... TODO-next: using the 4x4 mat, string size, bounding box, aspect and rotate. Notes: I update the Makefile, missing some include and other things so maybe scons, cmake and msvc also need update ? --- source/blender/editors/space_info/space_info.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_info/space_info.c') diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c index 8b01080495b..141127d7eb5 100644 --- a/source/blender/editors/space_info/space_info.c +++ b/source/blender/editors/space_info/space_info.c @@ -48,6 +48,7 @@ #include "ED_screen.h" #include "BIF_gl.h" +#include "BLF_api.h" #include "WM_api.h" #include "WM_types.h" @@ -141,8 +142,29 @@ static void info_main_area_draw(const bContext *C, ARegion *ar) UI_view2d_view_ortho(C, v2d); /* data... */ + // XXX 2.50 Testing new font library - Diego + glColor3f(1.0, 0.0, 0.0); + BLF_aspect(1.0); + + BLF_size(14, 96); + BLF_position(5.0, 5.0, 0.0); + BLF_draw("Hello Blender, size 14, dpi 96"); + + glColor3f(0.0, 0.0, 1.0); + BLF_size(11, 96); + BLF_position(200.0, 50.0, 0.0); + BLF_draw("Another Hello Blender, size 11 and dpi 96!!"); + + glColor3f(0.8, 0.0, 0.7); + BLF_size(12, 72); + BLF_position(5.0, 100.0, 0.0); + BLF_draw("Hello World, size 12, dpi 72"); - + glColor3f(0.8, 0.7, 0.5); + BLF_size(12, 96); + BLF_position(5.0, 200.0, 0.0); + BLF_draw("And this make a new glyph cache!!"); + /* reset view matrix */ UI_view2d_view_restore(C); -- cgit v1.2.3