Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    [Solved] SVG displays stippled areas instead of solid

    Qt WebKit
    2
    12
    5219
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      ggendel 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).

      1 Reply Last reply Reply Quote 0
      • ?
        Guest last edited by

        hi ggendel, can you markup that link

        1 Reply Last reply Reply Quote 0
        • ?
          Guest 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?

          1 Reply Last reply Reply Quote 0
          • G
            ggendel 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.png

            They 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

            1 Reply Last reply Reply Quote 0
            • ?
              Guest 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?

              1 Reply Last reply Reply Quote 0
              • G
                ggendel 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

                1 Reply Last reply Reply Quote 0
                • ?
                  Guest 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)

                  1 Reply Last reply Reply Quote 0
                  • G
                    ggendel 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

                    1 Reply Last reply Reply Quote 0
                    • ?
                      Guest last edited by

                      you are welcome and let us know if it worked :)

                      1 Reply Last reply Reply Quote 0
                      • G
                        ggendel last edited by

                        I tried it on OpenSuse 11.3 and it looks great so it looks like the problem is OpenSuse 10.3.

                        1 Reply Last reply Reply Quote 0
                        • B
                          benjamin.poulain 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.

                          1 Reply Last reply Reply Quote 0
                          • G
                            ggendel 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 Reply Last reply Reply Quote 0
                            • First post
                              Last post