diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-09-14 16:35:02 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-09-14 16:35:02 +0400 |
commit | ce98d6ae17abbc7322d8f41bbdecc4dcba04c6b9 (patch) | |
tree | 8002f269caae5fa1a5d6b80921f32a7f07fdadc3 /source/blender/blenfont | |
parent | baadd70ea1cd2d258dcd38c1b87117a72a5b81ba (diff) |
fix for own bug for font buffer drawing (only effected the bottom line of the stamp)
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r-- | source/blender/blenfont/intern/blf_font.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index 4c7e6410585..04f40ac825b 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -200,9 +200,14 @@ void blf_font_buffer(FontBLF *font, char *str) } chx= pen_x + ((int)g->pos_x); + chy= (int)font->pos[1] + g->height; - pen_y= (int)font->pos[1] - (g->height - ((int)g->pos_y)); - chy= pen_y - ((int)g->pos_y); + if (g->pitch < 0) { + pen_y = (int)font->pos[1] + (g->height - (int)g->pos_y); + } + else { + pen_y = (int)font->pos[1] - (g->height - (int)g->pos_y); + } if ((chx + g->width) >= 0 && chx < font->bw && (pen_y + g->height) >= 0 && pen_y < font->bh) { /* dont draw beyond the buffer bounds */ |