From: <hba...@us...> - 2011-07-06 17:29:00
|
Revision: 11798 http://plplot.svn.sourceforge.net/plplot/?rev=11798&view=rev Author: hbabcock Date: 2011-07-06 17:28:53 +0000 (Wed, 06 Jul 2011) Log Message: ----------- Fix offset bug in the standard unicode pathway. The problem was that aStream->fontSize is only set in the alt-unicode pathway so the local variable fontSize should be used instead for calculating the text Y offset. Modified Paths: -------------- trunk/drivers/cairo.c Modified: trunk/drivers/cairo.c =================================================================== --- trunk/drivers/cairo.c 2011-07-06 05:48:58 UTC (rev 11797) +++ trunk/drivers/cairo.c 2011-07-06 17:28:53 UTC (rev 11798) @@ -934,11 +934,11 @@ cairo_transform( aStream->cairoContext, cairoTransformMatrix ); free( cairoTransformMatrix ); - // printf("baseline (ps) %d %d\n", baseline, textYExtent); + // printf("baseline (ps) %d %d %f\n", baseline, textYExtent, aStream->fontSize); // Move to the text starting point cairo_rel_move_to( aStream->cairoContext, (double) ( -1.0 * args->just * (double) textXExtent ), - (double) 0.5 * aStream->fontSize - baseline / 1024.0); + (double) 0.5 * fontSize - baseline / 1024.0); // Render the text pango_cairo_show_layout( aStream->cairoContext, layout ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |