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

SVG polyline is rendered invalidly with closed path

    XMLWordPrintable

Details

    • 7a4ebf1b714956c7a8b676d83ea8461b2cdc0db3 (qt/qtbase/dev)

    Description

      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.

      Attachments

        1. chromesvg.png
          chromesvg.png
          12 kB
        2. qtbug.svg
          0.6 kB
        3. qtsvg.png
          qtsvg.png
          18 kB
        For Gerrit Dashboard: QTBUG-65393
        # Subject Branch Project Status CR V

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes