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

QSvgGenerator paths are not closed

    XMLWordPrintable

Details

    • Windows

    Description

      When line join between first and last element of the path are rendered with painter.path(), the exported svg when loaded in chrome or safari shows missing line join.

      if we look at this svg tutorial https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths

      it looks like looks like in order to have the line join happen in chrome, a 'z' needs to be added as the last element of the path, which is a "close path" command and QSvgGenerator never write a 'z' to the path.

      interestingly when same exported svg is loaded in QSvgWidget it renders it correct.

       

      Attached example generates a svg and when this saved svg is loaded in chrome top missing join is visible. 

       

      Attachments

        1. image002 (7).png
          9 kB
          Irfan Omair
        2. image003 (3).png
          6 kB
          Irfan Omair
        3. QTBUG81475.zip
          7 kB
          Irfan Omair
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            irfan.omair@digia.com Irfan Omair
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes