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

Incorrect stroking of straight curves

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.11.1
    • GUI: Painting, SVG Support
    • None
    • All

    Description

      Minimal example:

      #include <QGuiApplication>
      #include <QPainter>
      
      int main(int argc, char *argv[])
      {
          QGuiApplication a(argc, argv);
      
          QImage img(120, 120, QImage::Format_ARGB32_Premultiplied);
          img.fill(Qt::transparent);
      
          QPainterPath path;
          path.moveTo(11.28569, 13.087628);
          path.cubicTo(10.66069, 13.087628, 10.254441, 13.377808, 10.004442, 13.931381);
          path.cubicTo(10.004441, 13.931381, 3.5356915, 31.034938, 3.5356915, 31.034938);
      
          QPainter p(&img);
          p.setRenderHint(QPainter::Antialiasing);
          p.setPen(QPen(Qt::green, 3));
          p.scale(5, 5);
          p.drawPath(path);
      
          img.save("test.png");
      
          return 0;
      }
      

      Attachments

        1. actual.png
          actual.png
          3 kB
        2. expected.png
          expected.png
          2 kB
        3. test.svg
          0.3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vgt Eirik Aavitsland
            razrfalcon Evgeniy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes