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

strokePath not render as expected for custom dash pattern with RoundJoin

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.12.9, 5.15.0
    • GUI: Painting
    • None
    • All

    Description

      See the below demo code:

      path.moveTo(95.26263883128254, 240.5478666666667);
      path.cubicTo(170.4208796104275, 282.11466666666666,
                   245.49135802469135, 282.11466666666666,
                   320.4740740740741, 240.5478666666667);
      
      QPen pen(QBrush(Qt::black), 30.0, Qt::SolidLine, Qt::FlatCap, Qt::RoundJoin);
      pen.setDashPattern(QVector<qreal>() << 4.0 << 3.0 << 1.0 << 3.0);
      painter.strokePath(path, pen);
      

      The first part of the line ends with rounding, which seems bug for us.

       

      We expected render as the below image:

       

      It seems that the changes of QTBUG-75008 introduced the problem,  as when reverted it works.

       

      Attachments

        1. bug.png
          bug.png
          3 kB
        2. dash_round.zip
          1 kB
        3. expected.png
          expected.png
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vgt Eirik Aavitsland
            timxx Weitian Leung
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes