diff options
Diffstat (limited to 'source/blender/blenfont/BLF_api.h')
-rw-r--r-- | source/blender/blenfont/BLF_api.h | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index b5a61f2727f..b77f4a8fcd1 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -70,6 +70,13 @@ void BLF_boundbox(char *str, struct rctf *box); float BLF_width(char *str); float BLF_height(char *str); + +/* + * For fixed width fonts only, returns the width of a + * character. + */ +float BLF_fixed_width(void); + /* * and this two function return the width and height * of the string, using the default font and both value @@ -79,6 +86,11 @@ float BLF_width_default(char *str); float BLF_height_default(char *str); /* + * set rotation for default font + */ +void BLF_default_rotation(float angle); + +/* * By default, rotation and clipping are disable and * have to be enable/disable using BLF_enable/disable. */ @@ -86,11 +98,25 @@ void BLF_rotation(float angle); void BLF_clipping(float xmin, float ymin, float xmax, float ymax); void BLF_blur(int size); - 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. */ @@ -117,6 +143,8 @@ void BLF_dir_free(char **dirs, int count); /* font->flags. */ #define BLF_ROTATION (1<<0) #define BLF_CLIPPING (1<<1) +#define BLF_SHADOW (1<<2) +#define BLF_KERNING_DEFAULT (1<<3) /* font->mode. */ #define BLF_MODE_TEXTURE 0 |