After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 649485 - plotted triangles smaller than 5 pts loose their bottom line in svg
plotted triangles smaller than 5 pts loose their bottom line in svg
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Charting
1.10.x
Other Linux
: Normal normal
: ---
Assigned To: Jean Bréfort
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2011-05-05 17:33 UTC by f.h526223
Modified: 2011-05-06 08:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
svg with plotted triangles size 5 pts and 4 pts (42.23 KB, image/svg+xml)
2011-05-05 17:33 UTC, f.h526223
Details

Description f.h526223 2011-05-05 17:33:43 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
Comment 1 Andreas J. Guelzow 2011-05-05 19:06:08 UTC
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.
Comment 2 Jean Bréfort 2011-05-05 19:17:54 UTC
I'm finding that integer values for the clip area size are highly suspect.
Comment 3 Andreas J. Guelzow 2011-05-05 21:02:57 UTC
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.
Comment 4 Jean Bréfort 2011-05-05 21:20:19 UTC
This might be a cairo resolution issue. I don't know the internals of the svg backend.
Comment 5 Jean Bréfort 2011-05-06 08:54:23 UTC
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.