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

drawPoints not plotting when cap style is Qt::RoundCap

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.0
    • 4.6.2
    • GUI: Painting
    • None
    • Windows XP, qt-4.6.2-vs2005 (using install 2010.02.01)
    • 533bf9e4b7bda99c589f14fb308fa75231196703

    Description

      When trying to draw points, using painter->drawPoints(...), the points are not plotting when painter cap style is Qt::RoundCap. It works fine for Qt::FlatCap and Qt::SquareCap.

      I noticed a similar bug report (QTBUG-6721), however in this report the opposite was true; Qt:RoundCap worked fine but Qt::FlatCap and Qt::SquareCap caused the points to not be drawn. I noticed that the bug was closed so I assume it was fixed.

      code ex:
      ************************************************
      QPen tempPen = painter->pen();
      QPolygon points;

      points.append(QPoint(1.0, 2.0));
      points.append(QPoint(2.0, 4.0));
      points.append(QPoint(3.0, 8.0));

      tempPen.setWidth(3);
      tempPen.setCapStyle(Qt::RoundCap);
      painter->setPen(tempPen);

      painter->drawPoints(points);
      ************************************************

      This should plot 3 dots which have a rounded edge, (and it did in Qt 4.5.2), however
      in Qt 4.6.2 this plots nothing.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sletta Gunnar Sletta
            jzuber Jonathan Zuber
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes