Re: Canvas change in gnome 1.2 (helix)



> When I run this on my box, I find that x2 = 3 * x1 - 1, even though x2 sould be
> equal to x1 (because the text is centered). Why is the right side of the text
> three times what it should be?
> 
> Also, I just noticed that the zoom looks buggy: The text and rectangles aren't
> scaled by the same amount. Anyone noticed that too?

Yeah, zoom is totally broken on the AACanvas. Pretty much broken on both
canvases actually (Insert standard XFonts suck excuse here)

Anyhoo, here's a patch for gnome-canvas-text.c that should fix up the problem.
I'll get approval and commit it to CVS asap.

iain

Index: gnome-canvas-text.c
===================================================================
RCS file: /cvs/gnome/gnome-libs/libgnomeui/gnome-canvas-text.c,v
retrieving revision 1.36.4.4
diff -U2 -r1.36.4.4 gnome-canvas-text.c
--- gnome-canvas-text.c	2000/05/16 22:41:45	1.36.4.4
+++ gnome-canvas-text.c	2000/05/26 01:03:10
@@ -313,5 +313,5 @@
 		*px1 = x + private->min_lbearing;
 		*py1 = y;
-		*px2 = x + text->max_width + private->max_rbearing;
+		*px2 = x + private->max_rbearing;
 		*py2 = y + text->height;
 	}
@@ -406,5 +406,5 @@
 		*px1 = text->cx + private->min_lbearing;
 		*py1 = text->cy;
-		*px2 = text->cx + text->max_width + private->max_rbearing;
+		*px2 = text->cx + private->max_rbearing;
 		*py2 = text->cy + text->height;
 	}
@@ -1273,5 +1273,5 @@
 	}
 
-	*x2 = *x1 + width + private->max_rbearing;
+	*x2 = *x1 + private->max_rbearing;
 	*y2 = *y1 + height;
 }




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]