Op den Dunnersdag 14 Oktober 2010 Klock 01:36:52 hett Fernando Perez schreven:
I've been investigating further the bug where clipped paths in SVG
render wrong in our console. It turns out the mpl team already fixed
some things on their side, and I can confirm that their SVGs now
render fine in inkscape.
Inkscape is an incredible piece of software, but maybe you should better test
with e.g. Firefox, since there are *many* SVGs out there which only display
fine in the almighty Inkscape. (Could you attach the example SVG? It looks
simple enough to serve as a testcase.)
However, the problem seems to be that the Qt SVG renderer simply
doesn't support clipping paths, period.
That's an unfortunate limitation, indeed.
Furthermore, they seem to
have decided they won't fix this, as the bug was closed with "won't
In this older tracker item (before migration), you can see that the "Won't
Fix" was later changed to "Deferred", now "Expired":
That at least does not look like Nokia's official policy is that this won't
Anyhow, I am not so sure I fully understand the situation. AFAICS, there are
two separate issues here:
a) generation of the SVG
b) SVG rendering
Even if Qt's renderer does not support clipping, what does that have to do
with a) (which is relevant for ipython export)? Does MPL use Qt for SVG
export? ('Cause the tracker item is about QSvgGenerator, a QPaintDevice for
I wonder why QSvgGenerator is not fixed even without clipping support in Qt's
SVG renderer.. I can understand if they say "we want to be able to render what
we produce", but in this case this introduces seemingly unnecessary
(BTW: The viewbox will not help, this only sets a global SVG 'viewbox'
property, which is not related to path clipping at all.)
Have a nice day,
PS: Here are the current docs; I could not find a word about clipping in them: