[Solved] SVG displays stippled areas instead of solid
-
wrote on 29 Oct 2010, 13:44 last edited by
When using a QWebView to display svg files with opacity values, they are drawn with a stippled pattern. The same files in Safari and Firefox show up as expected. How can I get this to render without stippling?
Here is a file that shows the problem:
"http://www.genashor.com/~gary/ForQtForum/stippled.svg":http://www.genashor.com/~gary/ForQtForum/stippled.svg
With stippling, the text becomes unreadable. I tried setting the palette brush but it doesn't seem to work (unless I'm doing something wrong).
-
wrote on 30 Oct 2010, 04:12 last edited by
hi ggendel, can you markup that link
-
wrote on 30 Oct 2010, 10:05 last edited by
I checked with FF and with Qt webkit loading this in a QWebview, and the svg seems similar. Can you create a smaller svg file and post here that can show this difference you are mentioning?
-
wrote on 30 Oct 2010, 12:08 last edited by
Chetan,
Thanks for looking at this. I've been pulling my hair out on this one. I put two image grabs from a piece of the result of the svg rendering to demonstrate what I'm seeing:
FF_svg.png
QWebView_svg.pngThey can be found in "http://www.genashor.com/~gary/ForQtForum/":http://www.genashor.com/~gary/ForQtForum/
BTW, I'm currently working with Qt-4.5.3 if that helps.
Regards,
Gary -
wrote on 30 Oct 2010, 15:18 last edited by
Ah, now i see what you mean, the rendering seems totally different on Qt Webkit.
But, I'm on Qt 4.7.0 and on Winxp and do not see any difference between FF and Qt webkit. Feasible for you to take latest version of Qt and check this out? -
wrote on 1 Nov 2010, 12:12 last edited by
Chetan,
Thanks for bearing with me. I tried 4.7.0 with exactly the same result. I packaged up a test rig with the class I'm using and put it on the website as "tstSvg.tar.gz". We use "jam" and have a modular rules setup so I took the system commands from the actual build and put it in the "build.txt" file. You should be able to modify this file to build it on your platform, but the Jamfile is pretty easy to understand if you want use it to make a .pro file instead.
You'll also need to change the hardcoded path to the svg file in tstSvg.cpp. The entire code is just over a page long so I don't expect anything there to surprise you.
Gary
-
wrote on 3 Nov 2010, 15:10 last edited by
I tried again with your code and it just works !
Not sure if this is something related to graphics driver on your box and Qt facing issue with it? Can you try this on a different computer? (guess based on "this":http://developer.qt.nokia.com/forums/viewthread/1437 thread) -
wrote on 3 Nov 2010, 15:24 last edited by
Chetan,
I'm coming to the same conclusion. I saw an application note that Qt relies on the underlying capabilities of the X-server. This means if I don't have the proper render extension library it will cause this stippling pattern.
Thanks for all your assistance.
Gary
-
wrote on 3 Nov 2010, 16:45 last edited by
you are welcome and let us know if it worked :)
-
wrote on 3 Nov 2010, 17:14 last edited by
I tried it on OpenSuse 11.3 and it looks great so it looks like the problem is OpenSuse 10.3.
-
wrote on 8 Nov 2010, 12:11 last edited by
I also have no problem, you probably has missing extension on your X server.
You can try the graphicssystem raster, it avoids lots of problems of X11. -
wrote on 8 Nov 2010, 15:15 last edited by
[quote author="Benjamin Poulain" date="1289218305"]I also have no problem, you probably has missing extension on your X server.
You can try the graphicssystem raster, it avoids lots of problems of X11.[/quote]Thanks... Works like a charm. I'll have to play around to see if this option causes any side-effects to other widgets.
1/12