Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Borghetti <bdiego@gmail.com>2010-12-09 07:36:58 +0300
committerDiego Borghetti <bdiego@gmail.com>2010-12-09 07:36:58 +0300
commitb25c32393d42c314c073ef2244cde1fabb7b64af (patch)
treea295abf9b556d1fdc8ed2d8d555f602bc1f874ce /source/blender/blenfont/intern/blf_internal_types.h
parent36175f37c9d3ea128cfdcebd1c1b438494b34433 (diff)
Add the possibility to set a 4x4 matrix to be used on blf.
This option allow the user to set a 4x4 matrix to be multiplied before draw the text, for example: double *m; /* Get the matrix or build it! */ BLF_matrix(m); BLF_enable(BLF_MATRIX); /* set color, size, etc and draw! */ BLF_disable(BLF_MATRIX); You don't need the last line (disable), but remember that if you use the font to draw in any other place, the matrix will be used!. The GL code is: glPushMatrix(); glMultMatrixd(m); glTranslatef(); glScalef(); glRotatef(); glPopMatrix(); Let's Dalai test this!!! :D
Diffstat (limited to 'source/blender/blenfont/intern/blf_internal_types.h')
-rw-r--r--source/blender/blenfont/intern/blf_internal_types.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h
index 70318c51823..04afaeb2e97 100644
--- a/source/blender/blenfont/intern/blf_internal_types.h
+++ b/source/blender/blenfont/intern/blf_internal_types.h
@@ -154,8 +154,10 @@ typedef struct FontBLF {
/* shadow color. */
float shadow_col[4];
- /* this is the matrix that we load before rotate/scale/translate. */
- float mat[4][4];
+ /* Multiplied this matrix with the current one before
+ * draw the text! see blf_draw__start.
+ */
+ double m[16];
/* clipping rectangle. */
rctf clip_rec;