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

Bug in qt_painterpath_check_crossing()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.0
    • 4.5.2
    • GUI: Painting
    • None

    Description

      Steps to reproduce / test case:

      In Bug in qt_painterpath_check_crossing()

      case QPainterPath::MoveToElement: 
      if (i > 0 
      && qFuzzyCompare(last_pt.x(), last_start.y()) 
      && qFuzzyCompare(last_pt.y(), last_start.y()) 
      && qt_painterpath_isect_line_rect(last_pt.x(), last_pt.y(), 
      last_start.x(), last_start.y(), rect)) 
      return true; 
      last_start = last_pt = e; 
      break; 
      

      should be

      case QPainterPath::MoveToElement: 
      if (i > 0 
      && ( !qFuzzyCompare(last_pt.x(), last_start.y()) || !qFuzzyCompare(last_pt.y(), last_start.y()) ) 
      && qt_painterpath_isect_line_rect(last_pt.x(), last_pt.y(), 
      last_start.x(), last_start.y(), rect)) 
      return true; 
      last_start = last_pt = e; 
      break; 
      

      This bug results in refresh artefacts in QGraphicsScene painting. A typical case would be a QGraphicsRectItem moving so that it intersects another QGraphicsRectItem on its side that the above code catches i.e. the side formed by the last and first points on its path. In such a case you see the background drawn correctly in the refreshed area but the QGraphicsRectItem is not caught as being intersecting the region and so is not redrawn.

      Attachments

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

        Activity

          People

            sletta Gunnar Sletta
            sthomass Stian Sandvik Thomassen (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes