## [Plplot-cvs] SF.net SVN: plplot:[8837] trunk/drivers/svg.c

 [Plplot-cvs] SF.net SVN: plplot:[8837] trunk/drivers/svg.c From: - 2008-09-29 23:10:48 ```Revision: 8837 http://plplot.svn.sourceforge.net/plplot/?rev=8837&view=rev Author: airwin Date: 2008-09-29 23:10:29 +0000 (Mon, 29 Sep 2008) Log Message: ----------- Adjust multiplicative factor on ftHt to get the best empirical vertical position of text using example 1 and example 2. Modified Paths: -------------- trunk/drivers/svg.c Modified: trunk/drivers/svg.c =================================================================== --- trunk/drivers/svg.c 2008-09-29 21:50:08 UTC (rev 8836) +++ trunk/drivers/svg.c 2008-09-29 23:10:29 UTC (rev 8837) @@ -418,7 +418,7 @@ plgesc(&plplot_esc); plgfci(&fci); - /* determine the font height */ + /* determine the font height in pixels*/ ftHt = 1.5 * pls->chrht * DPI/25.4; /* Calculate the tranformation matrix for SVG based on the @@ -437,9 +437,11 @@ t[3] = -sin_rot * sin_shear + cos_rot * cos_shear; /* Apply coordinate transform for text display. - The transformation also defines the location of the text in x and y. */ + The transformation also defines the location of the text in x and y. + The value of the ftHT multiplicative factor has been determined + empirically by looking at example 1 and example 2 results. */ svg_open("g"); - svg_attr_values("transform", "matrix(%f %f %f %f %f %f)", t[0], t[1], t[2], t[3], (double)(args->x/scale), (double)(args->y/scale - 0.3*ftHt + 0.5)); + svg_attr_values("transform", "matrix(%f %f %f %f %f %f)", t[0], t[1], t[2], t[3], (double)(args->x/scale), (double)(args->y/scale - 0.38*ftHt + 0.5)); svg_general(">\n"); /*-------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ```