Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2009-06-01 21:21:03 +0400
committerTon Roosendaal <ton@blender.org>2009-06-01 21:21:03 +0400
commita117731aa23c25d699c405325c7bb7ac5680a5e7 (patch)
tree19bf09edd70e5b50b582593f5db1bcdb7e7281ec /source/blender/editors/space_sequencer
parentcb96aa47dbcefa8be8db63dc8fc2607b16b2d5d1 (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/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index a0b27cede05..675602a23a0 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -517,6 +517,7 @@ static void draw_seq_extensions(Scene *scene, SpaceSeq *sseq, Sequence *seq)
/* draw info text on a sequence strip */
static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float y1, float y2, char *background_col)
{
+ rctf rect;
char str[32 + FILE_MAXDIR+FILE_MAXFILE];
if(seq->name[2]) {
@@ -564,7 +565,11 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
cpack(0);
}
- UI_view2d_text_cache_add(v2d, x1, y1+SEQ_STRIP_OFSBOTTOM, str);
+ rect.xmin= x1;
+ rect.ymin= y1;
+ rect.xmax= x2;
+ rect.ymax= y2;
+ UI_view2d_text_cache_rectf(v2d, &rect, str);
}
/* draws a shaded strip, made from gradient + flat color + gradient */