diff options
author | Ton Roosendaal <ton@blender.org> | 2009-07-02 22:12:46 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-07-02 22:12:46 +0400 |
commit | 5a0896e1a3c7f17abd37e3d818585fde8e80ff6d (patch) | |
tree | 6a53f54cceb0909e255f286e95a356653b2afcad /source/blender/blenfont | |
parent | aefa7b626a5e623b5f98979a5cc849b7c21563cc (diff) |
2.5
Cleanup of scroller drawing in 2D windows.
Before:
http://download.blender.org/institute/rt11.jpg
After:
http://download.blender.org/institute/rt12.jpg
Will add 'zoom' widget circles later, as mockupped here:
http://www.reynish.com/files/blender25/fcurve_scrollbar.png
Also note the scale values are inside scroller; drawing it
on top conflicts with current frame item and markers.
Currently scroller disappear entirely when view is total.
For Joshua:
To make sliders behave nicely, the boundbox (v2d->tot) has to
be refreshed on each change. I've added it in graph drawing
now, but it could be notifier based I guess... not sure what
the correct anim api call would be. Can discuss tomorrow!
On todo:
Layout config hints so people can make scroller positions swap.
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r-- | source/blender/blenfont/BLF_api.h | 5 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf.c | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index 2ee31a17fa6..c373fde5693 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -79,6 +79,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. */ diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index 9dad5a4bfa0..a7e599fabf9 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -321,6 +321,19 @@ void BLF_draw_default(float x, float y, float z, char *str) } } +void BLF_default_rotation(float angle) +{ + + if (global_font_default>=0) { + global_font[global_font_default]->angle= angle; + if(angle) + global_font[global_font_default]->flags |= BLF_ROTATION; + else + global_font[global_font_default]->flags &= ~BLF_ROTATION; + } +} + + void BLF_draw(char *str) { FontBLF *font; |