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

[4.4.0] Bug: QPainter draws weird artifacts (Windows only)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • 4.7.1
    • 4.4.0
    • GUI: Painting
    • None

    Description

      Running the code below produces and saves an image that should be absolutely white, but instead has a black dot on the left edge. This happens on Window only, and seems to be related to some misdealing of coordinates higher than 2^15. Playing around with some other coordinates can also produce different artifacts such as lines crossing the image.

      Test case main.cpp to reproduce:
      //-------------------------------------------------
      #include <QtGui>

      int main( int argc, char * argv[] )
      {
      QApplication app( argc, argv );
      QImage image( 100, 100, QImage::Format_RGB32 );
      QPainter painter( & image );
      painter.fillRect( image.rect(), Qt::white );
      painter.drawLine( 32760, 50, 32770, 50 );
      painter.end();
      image.save( "test.png" );
      return 0;
      }
      //-------------------------------------------------

      Attachments

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

        Activity

          People

            sletta Gunnar Sletta
            admin Administrator
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes