PDA

View Full Version : Qt SvgRenderer renders SVG incorrectly



Daevius
2nd October 2011, 16:40
Hi,

When I draw an SVG image using a QSVGRenderer, it renders incorrectly. See the image below.
6929

The brown boxes are the edges of the SVG file. The grey background is a rectangle drawn in Qt based on the viewBoxF of the renderer.
It seems like Qt adds a stroke to all edges, and consequentially makes the SVG file get out of it's bounds.

I even have a case where all edges have an additional 'stroke', as it seems, except for one edge which shows perfectly fine.
I've been experimenting with scaling and translating to hide the 'bug', but each SVG has different problems...

Note: you can only see the difference when viewing very closely. I export the scene as PDF and zoom with Adobe Reader.

How to fix this?
Thanks!