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

QPainterPath::operator|=(..) doesn't unite the paths correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.0
    • 4.5.3, 4.6.0, 4.6.1
    • GUI: Painting
    • None
    • linux
    • f7d61dab69308f0993c8a5f2232226d1713ac4a7

    Description

      when uniting painter paths, sometimes the resulting path is "open" and parts of it get erased.
      this code should show the issue (at the end the same ellipses are drawn using add for comparison):
      QPainterPath p, path;

      path=QPainterPath();
      p=QPainterPath();
      p.addEllipse( 284 , 268 , 30, 30);
      path|=p;
      p=QPainterPath();
      p.addEllipse( 303 , 267 , 30, 30);
      path|=p;
      p=QPainterPath();
      p.addEllipse( 305 , 267 , 30, 30);
      path|=p;
      p=QPainterPath();
      p.addEllipse( 303 , 267 , 30, 30);
      path|=p;
      p=QPainterPath();
      p.addEllipse( 292 , 267 , 30, 30);
      path|=p;
      painter.drawPath(path);

      p=QPainterPath();
      p.addEllipse( 284 , 238 , 30, 30);
      p.addEllipse( 303 , 237 , 30, 30);
      p.addEllipse( 305 , 237 , 30, 30);
      p.addEllipse( 303 , 237 , 30, 30);
      p.addEllipse( 292 , 237 , 30, 30);
      painter.drawPath(p);

      i've made two attachments. the first gives the result i get and the second is demonstration code. just click and move the mouse slightly back and forth. it doesn't happen, if moving fast.

      Attachments

        1. QPainterPathBugTest.zip
          5 kB
        2. duu1.png
          duu1.png
          0.7 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rodal Samuel Rødal
            aman Adam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes