[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31925] trunk/blender/source/blender/ blenfont/intern/blf_font.c: fix for own bug for font buffer drawing ( only effected the bottom line of the stamp)

Campbell Barton ideasman42 at gmail.com
Tue Sep 14 14:35:02 CEST 2010


Revision: 31925
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31925
Author:   campbellbarton
Date:     2010-09-14 14:35:02 +0200 (Tue, 14 Sep 2010)

Log Message:
-----------
fix for own bug for font buffer drawing (only effected the bottom line of the stamp)

Modified Paths:
--------------
    trunk/blender/source/blender/blenfont/intern/blf_font.c

Modified: trunk/blender/source/blender/blenfont/intern/blf_font.c
===================================================================
--- trunk/blender/source/blender/blenfont/intern/blf_font.c	2010-09-14 12:17:09 UTC (rev 31924)
+++ trunk/blender/source/blender/blenfont/intern/blf_font.c	2010-09-14 12:35:02 UTC (rev 31925)
@@ -200,9 +200,14 @@
 		}
 
 		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 */





More information about the Bf-blender-cvs mailing list