Patch to fix printing problem with shape markers
The existing ps-output code does not correctly print shape makers, neglecting to apply the transformation. This really sucks if you've been using these markers a lot, as I've been doing in drawing a bunch of FSMs. For an example of code with this problem, see:
web.mit.edu/jonas/www/input.FSM.svg
The marker definition: <marker style="overflow:visible;" id="TriangleOutM" refX="0.0" refY="0.0" orient="auto" inkscape:stockid="TriangleOutM"> <path transform="scale(0.4)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start :none;" d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " id="path3347" sodipodi:nodetypes="cccc" /> </marker>
has the "transform" attribute in its path, and in the current codebase it appears to be ignored. Thus in PS and EPS output, the markers are quite often the wrong size.
The error appears to be in sp-shape.cpp, in sp_shape_print. The following patch fixes the problem, and I'd love to submit it via the SF.net patch interface, but their confirmation-mail-script to register an account is ultra-slow today :) Really, we just additionally apply the transformation from the marker_path, a rather simple bug. ...Eric
The patch follows:
Index: sp-shape.cpp =================================================================== RCS file: /cvsroot/inkscape/inkscape/src/sp-shape.cpp,v retrieving revision 1.38 diff -c -r1.38 sp-shape.cpp *** sp-shape.cpp 22 Jun 2004 17:35:19 -0000 1.38 --- sp-shape.cpp 26 Jun 2004 16:48:21 -0000 *************** *** 568,573 **** --- 568,574 ---- }
nr_matrix_multiply (&tr, &marker->c2p, &tr); + nr_matrix_multiply (&tr, &marker_path->transform, &tr);
NRMatrix old_tr = marker_path->transform; marker_path->transform = tr;
participants (2)
-
bulia byak
-
Eric Jonas