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

QPainter::drawPolyline + raster paint engine creates wrong pixels

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 4.8.6, 5.0.2, 5.1.1, 5.2.1, 5.3.2, 5.4.0 Beta
    • GUI: Painting
    • None
    • Here on Linux/X11, but as it is an issue of the raster paint engine it will probably happen everywhere

    Description

      For a special sequence of points the raster paint engine draws a polyline by 1 pixel wrong.
      In certain situations ( see the attached example code ), where a polyline changes its direction the line continues at the wrong position.

      In the attached example it is only about a few pixels only, but with longer lines the number of wrong pixels is growing.

      This bug has been introduced somewhere with Qt 4.8 - all versions <= Qt 4.7.x should be fine ( I checked Qt 4.4, 4.5. 4.6. 4.7 )

      Attachments

        1. main_random.cpp
          2 kB
        2. polydraw.cpp
          0.8 kB
        3. qtbug42398.zip
          1 kB

        Activity

          People

            vgt Eirik Aavitsland
            uwer Uwe Rathmann
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: