GNOME Bugzilla – Bug 649485
plotted triangles smaller than 5 pts loose their bottom line in svg
Last modified: 2011-05-06 08:54:23 UTC
Created attachment 187302 [details] svg with plotted triangles size 5 pts and 4 pts When I plot triangles that are smaller than 5 pts they loose their bottem line when exported as a svg. I opened the files with inkscape and gimp and its the same with both programmes. png, pdf, eps and ps export works fine
Apparently there is a clipping problem: for the triangle of size 5 the clipping and drawing is: <clipPath id="clip1"> <rect width="6" height="6"/> </clipPath> <g id="surface10762" clip-path="url(#clip1)"> <path style="fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:miter;stroke:rgb(0%,0%,50.196078%);stroke-opacity:1;stroke-miterlimit:10;" d="M 0 -1 L 1 1 L -1 1 Z M 0 -1 " transform="matrix(2.5,0,0,2.5,3,3)"/> </g> but for the triangles of size 4 we have: <clipPath id="clip2"> <rect width="4" height="4"/> </clipPath> <g id="surface10764" clip-path="url(#clip2)"> <path style="fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:miter;stroke:rgb(100%,0%,100%);stroke-opacity:1;stroke-miterlimit:10;" d="M -0.00078125 -1.000781 L 0.999219 0.999219 L -1.000781 0.999219 Z M -0.00078125 -1.000781 " transform="matrix(2,0,0,2,2.4,2.4)"/> </g> If I change the clipping path to have width and height 5, then the bottom line becomes visible.
I'm finding that integer values for the clip area size are highly suspect.
Since the size of the triangle is handled by the transform matrix I am also surprised about the fact that we have d="M 0 -1 L 1 1 L -1 1 Z M 0 -1 " versus d="M -0.00078125 -1.000781 L 0.999219 0.999219 L -1.000781 0.999219 Z M -0.00078125 -1.000781 " they ought to be the same.
This might be a cairo resolution issue. I don't know the internals of the svg backend.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report. The path values issues comes from the way cairo stores values.