|
From: <hba...@us...> - 2010-10-13 14:07:43
|
Revision: 11260
http://plplot.svn.sourceforge.net/plplot/?rev=11260&view=rev
Author: hbabcock
Date: 2010-10-13 14:07:32 +0000 (Wed, 13 Oct 2010)
Log Message:
-----------
Change cairo device to return the string length in millimeters.
Modified Paths:
--------------
trunk/drivers/cairo.c
Modified: trunk/drivers/cairo.c
===================================================================
--- trunk/drivers/cairo.c 2010-10-11 22:56:04 UTC (rev 11259)
+++ trunk/drivers/cairo.c 2010-10-13 14:07:32 UTC (rev 11260)
@@ -694,10 +694,10 @@
pango_layout_set_markup( layout, aStream->pangoMarkupString, -1 );
pango_layout_get_pixel_size( layout, &textXExtent, &textYExtent );
- /* If asked, set the string length and return */
+ /* If asked, set the string length (in mm) and return */
if (pls->get_string_length)
{
- pls->string_length = textXExtent;
+ pls->string_length = (PLFLT)textXExtent * 25.4 / DPI;
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|