[IPython-dev] Qt SVG clipping bug (it's NOT a matplotlib bug)- Qt won't fix...
Hans Meine
hans_meine at gmx.net
Thu Oct 14 04:55:20 EDT 2010
Hi,
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
> fix":
>
> http://bugreports.qt.nokia.com/browse/QTBUG-1865
In this older tracker item (before migration), you can see that the "Won't
Fix" was later changed to "Deferred", now "Expired":
http://qt.nokia.com/developer/task-tracker/index_html?method=entry&id=204966
That at least does not look like Nokia's official policy is that this won't
get fixed.
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
*generating* SVGs.)
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
limitations.
(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,
Hans
PS: Here are the current docs; I could not find a word about clipping in them:
http://doc.qt.nokia.com/4.7/qtsvg.html
http://doc.qt.nokia.com/4.7/qsvggenerator.html
More information about the IPython-dev
mailing list