Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-65393

SVG polyline is rendered invalidly with closed path

XMLWordPrintable

    • 7a4ebf1b714956c7a8b676d83ea8461b2cdc0db3 (qt/qtbase/dev)

      When using QSvgRenderer to render a polyline that reaches the same point twice the line is rendered as closed path even if the angle of the lines is such that there should be a partial gap. This is best illustrated with screenshots: Attached chromesvg.png has a gap in the top of the pentagon while qtsvg.png shows solid line, which is how Qt renders it. The gap should be there, because this is a polyline, not a polygon.

      This can be reproduced with Qt's SVG Viewer Example. Open the attached qtbug.svg file in SVG Viewer and compare it to the result in a browser (Chrome and Safari tested). If the points differ even a tiniest bit (e.g. add 0.0001 to one of the coordinates) the problem doesn't reproduce.

        1. qtsvg.png
          18 kB
          Qt Support
        2. qtbug.svg
          0.6 kB
          Qt Support
        3. chromesvg.png
          12 kB
          Qt Support
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            vgt Eirik Aavitsland
            qtcomsupport Qt Support
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes