[Plplot-cvs] SF.net SVN: plplot: [7873] trunk/drivers/svg.c From: - 2007-09-18 18:24 ```Revision: 7873 http://plplot.svn.sourceforge.net/plplot/?rev=7873&view=rev Author: airwin Date: 2007-09-18 11:24:47 -0700 (Tue, 18 Sep 2007) Log Message: ----------- Correct definitions of rotation and shear angles so this device gives correct results for the 28th example. Modified Paths: -------------- trunk/drivers/svg.c Modified: trunk/drivers/svg.c =================================================================== --- trunk/drivers/svg.c 2007-09-18 17:44:26 UTC (rev 7872) +++ trunk/drivers/svg.c 2007-09-18 18:24:47 UTC (rev 7873) @@ -376,7 +376,7 @@ short lastOffset = 0; double ftHt; PLUNICODE fci; - PLFLT rotation, shear, cos_rot, sin_rot, sin_shear; + PLFLT rotation, shear, cos_rot, sin_rot, sin_shear, cos_shear; PLFLT t[4]; // PLFLT *t = args->xform; PLUNICODE *ucs4 = args->unicode_array; @@ -397,13 +397,17 @@ // Calculate the tranformation matrix for SVG based on the // transformation matrix provived by PLplot. plRotationShear(args->xform, &rotation, &shear); + // N.B. Experimentally, I (AWI) have found the svg rotation angle is + // the negative of the libcairo rotation angle, and the svg shear angle + // is pi minus the libcairo shear angle. cos_rot = cos(rotation); - sin_rot = sin(rotation); + sin_rot = -sin(rotation); sin_shear = sin(shear); + cos_shear = -cos(shear); t[0] = cos_rot; - t[1] = sin_rot; - t[2] = sin_rot + cos_rot * sin_shear; - t[3] = -cos_rot + sin_rot * sin_shear; + t[1] = -sin_rot; + t[2] = cos_rot * sin_shear + sin_rot * cos_shear; + 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. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ```
 [Plplot-cvs] SF.net SVN: plplot: [8077] trunk/drivers/svg.c From: - 2007-12-10 20:21 ```Revision: 8077 http://plplot.svn.sourceforge.net/plplot/?rev=8077&view=rev Author: andrewross Date: 2007-12-10 12:21:54 -0800 (Mon, 10 Dec 2007) Log Message: ----------- Don't enable debug messages in svg driver by default. Modified Paths: -------------- trunk/drivers/svg.c Modified: trunk/drivers/svg.c =================================================================== --- trunk/drivers/svg.c 2007-12-10 20:21:26 UTC (rev 8076) +++ trunk/drivers/svg.c 2007-12-10 20:21:54 UTC (rev 8077) @@ -142,7 +142,7 @@ pls->width = 1; pls->verbose = 1; pls->bytecnt = 0; - pls->debug = 1; + /*pls->debug = 1;*/ pls->dev_text = 1; /* handles text */ pls->dev_unicode = 1; /* wants text as unicode */ pls->page = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ```