diff options
author | Diego Borghetti <bdiego@gmail.com> | 2009-06-23 20:27:35 +0400 |
---|---|---|
committer | Diego Borghetti <bdiego@gmail.com> | 2009-06-23 20:27:35 +0400 |
commit | cb59bf722e597899c0653777f72bcc85ab476eca (patch) | |
tree | 1fc9a3f2ed1b1e7e12356191fe1bc93c228d42a3 /source/blender/blenfont/BLF_api.h | |
parent | eb22a7b2102cceb432e3545cd342956e92873a49 (diff) |
Move shadow option (for text) from editor/interface to blenfont.
Two new function:
BLF_shadow: set the level (for blur) and the shadow color.
BLF_shadow_offset: set the x and y offset for shadow.
(this is the current position plus offset)
By default shadow is not enable in the font, so before draw the
text you need call BLF_enable(BLF_SHADOW), also remember disable
the option in the end.
Diffstat (limited to 'source/blender/blenfont/BLF_api.h')
-rw-r--r-- | source/blender/blenfont/BLF_api.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index e871de490f3..cb64615d64c 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -91,6 +91,21 @@ void BLF_enable(int option); void BLF_disable(int option); /* + * Shadow options, level is the blur level, can be 3, 5 or 0 and + * the other argument are the rgba color. + * Take care that shadow need to be enable using BLF_enable!!. + */ +void BLF_shadow(int level, float r, float g, float b, float a); + +/* + * Set the offset for shadow text, this is the current cursor + * position plus this offset, don't need call BLF_position before + * this function, the current position is calculate only on + * BLF_draw, so it's safe call this whenever you like. + */ +void BLF_shadow_offset(int x, int y); + +/* * Search the path directory to the locale files, this try all * the case for Linux, Win and Mac. */ @@ -119,6 +134,7 @@ void BLF_dir_free(char **dirs, int count); #define BLF_CLIPPING (1<<1) #define BLF_FONT_KERNING (1<<2) #define BLF_USER_KERNING (1<<3) +#define BLF_SHADOW (1<<4) /* font->mode. */ #define BLF_MODE_TEXTURE 0 |