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

QPolygon::containsPoint different results when point on boundary

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 4.6.3
    • GUI: Painting
    • None

    Description

      // make square polygon
      QPolygon polygon;
      polygon <<
         QPoint(10, 10)   << QPoint(-10, 10) <<
         QPoint(-10, -10) << QPoint(10, -10);
      
      // both points on the edges
      QPoint right = QPoint(10, 0);
      QPoint left  = QPoint(-10, 0);
      
      // dfferent results
      Q_ASSERT(
          polygon.containsPoint(right, Qt::OddEvenFill) ==
          polygon.containsPoint(left, Qt::OddEvenFill)
      );
      

      Possible related to QTBUG-8720 - but points on the boundary must (or must not, but both) be mathematically in the polygon.

      Attachments

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

        Activity

          People

            rodal Samuel Rødal
            abbat Anton Batenev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes