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

Re: high-level text drawing



Whoops, XDrawString output was clipped:
~70 times now with Xft
~15 times with GDK_USE_XFT=0

--- pango-test.c.orig	2003-12-29 20:00:08.000000000 +0200
+++ pango-test.c	2003-12-29 20:01:52.000000000 +0200
@@ -37,7 +37,7 @@
 	g_timer_start(timer);
 	for (i=0;i<count;i++) {
 		sprintf(s, "str%d", i);
-		XDrawString(GDK_DISPLAY(), GDK_DRAWABLE_XID(area->window), GDK_GC_XGC(area->style->black_gc), 0,0, s, strlen(s));
+		XDrawString(GDK_DISPLAY(), GDK_DRAWABLE_XID(area->window), GDK_GC_XGC(area->style->black_gc), 0,24, s, strlen(s));
 	}
 	gdk_flush();
 	g_timer_stop(timer);
@@ -49,8 +49,8 @@
 		"gdk_draw_layout: %fms total, %fus per string\n"\
 		"XDrawString: %fms total, %fus per string\n\n"\
 		"gdk_draw_layout/XDrawString: %f\n",
-		t0/1000.0, t0*1000.0*1000.0/count,
-		t1/1000.0, t1*1000.0*1000.0/count,
+		t0*1000.0, t0*1000.0*1000.0/count,
+		t1*1000.0, t1*1000.0*1000.0/count,
 		t0/t1
 	);






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