diff options
author | Ton Roosendaal <ton@blender.org> | 2009-06-01 21:21:03 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-06-01 21:21:03 +0400 |
commit | a117731aa23c25d699c405325c7bb7ac5680a5e7 (patch) | |
tree | 19bf09edd70e5b50b582593f5db1bcdb7e7281ec /source/blender/editors/include/UI_view2d.h | |
parent | cb96aa47dbcefa8be8db63dc8fc2607b16b2d5d1 (diff) |
2.5
- Fix: text draw in fonts was slightly too low; it didn't calculate offset
correctly. Now it is aligned to have number characters in center.
- Fix: text clip was too wide, giving errors on extreme zoom in.
- Added boundbox-clipped default text drawing for view2d:
void UI_view2d_text_cache_rectf(View2D *v2d, rctf *rect, char *str)
(Note; also for previous commit, this cache immediately projects, so if
you change view2d while drawing, text is still on correct positions)
Diffstat (limited to 'source/blender/editors/include/UI_view2d.h')
-rw-r--r-- | source/blender/editors/include/UI_view2d.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index 3c58e218f09..4813b695795 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -184,6 +184,7 @@ short UI_view2d_mouse_in_scrollers(const struct bContext *C, struct View2D *v2d, /* cached text drawing in v2d, to allow pixel-aligned draw as post process */ void UI_view2d_text_cache_add(struct View2D *v2d, float x, float y, char *str); +void UI_view2d_text_cache_rectf(struct View2D *v2d, struct rctf *rect, char *str); void UI_view2d_text_cache_draw(struct ARegion *ar); /* operators */ |