diff options
author | Diego Borghetti <bdiego@gmail.com> | 2010-12-10 01:27:55 +0300 |
---|---|---|
committer | Diego Borghetti <bdiego@gmail.com> | 2010-12-10 01:27:55 +0300 |
commit | 545cc4803e8e9e7418aba98b2c1bec72fa629146 (patch) | |
tree | 3b3fb952f7ef2b6926bb3d990574c5f7f6a603e7 /source/blender/blenfont/BLF_api.h | |
parent | 3ee53d7b5f8e4371607467cff69c3f35662abdc4 (diff) |
Change the BLF_aspect function to handle 3d text.
This is need to properly handle 3d text (dalai work on GE), before
the BLF_aspect only take one argument, and the result was a call to:
glScalef(aspect, aspect, 1.0)
Now the three value are store in the font (x, y and z) and also
need to be enable using BLF_enable(BLF_ASPECT).
By default all the code that don't have BLF_ASPECT enable work with
a scale of 1.0 (so nothing change to the current UI).
I also remove all the call of BLF_aspect(fontid, 1.0) found in
the editors, because is disable by default, so no need any more.
Campbell the only thing to check is the python api, right now
I modify the api to from:
BLF_aspect(fontid, aspect)
to:
BLF_aspect(fontid, aspect, aspect, 1.0)
This is to avoid break the api, but now you need add the BLF_ASPECT
option to the function py_blf_enable and in some point change
py_blf_aspect to take 3 arguments.
Diffstat (limited to 'source/blender/blenfont/BLF_api.h')
-rw-r--r-- | source/blender/blenfont/BLF_api.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index 84086742b15..b696c64023d 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -45,7 +45,7 @@ int BLF_load_mem_unique(const char *name, unsigned char *mem, int mem_size); /* Attach a file with metrics information from memory. */ void BLF_metrics_attach(int fontid, unsigned char *mem, int mem_size); -void BLF_aspect(int fontid, float aspect); +void BLF_aspect(int fontid, float x, float y, float z); void BLF_position(int fontid, float x, float y, float z); void BLF_size(int fontid, int size, int dpi); @@ -195,6 +195,7 @@ void BLF_dir_free(char **dirs, int count); #define BLF_SHADOW (1<<2) #define BLF_KERNING_DEFAULT (1<<3) #define BLF_MATRIX (1<<4) +#define BLF_ASPECT (1<<5) // XXX, bad design extern int blf_mono_font; |