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:
authorCampbell Barton <ideasman42@gmail.com>2010-09-14 16:35:02 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-09-14 16:35:02 +0400
commitce98d6ae17abbc7322d8f41bbdecc4dcba04c6b9 (patch)
tree8002f269caae5fa1a5d6b80921f32a7f07fdadc3 /source/blender/blenfont
parentbaadd70ea1cd2d258dcd38c1b87117a72a5b81ba (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.c9
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 */