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

QPainterPath contains() doesnt work with big coords when qreal is float

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 4.7.2
    • GUI: Painting
    • None
    • arm devices, or desktop with qreal as floats

    Description

      QPainterPath::contains() does not produce consistent outcome when qreal is defined as float and when it is defined as qreal and the scenegraph is large.

      I attached a test program to reproduce this. If qreal is double, there will be 3 objects at the testing point, if it is float, there will be 0..1 (seems to vary a bit). This can be reproduced on desktop if one forces qreal to be float (the original issue stems from maemo6 which is an arm devices where qreal is a float). This can be done by tweaking qreal typedefs on:
      /src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h and
      /src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h

      Furthermore I have attached two screenshots of the testapp after scrolling slowly the area so that the ellipse clips. On float platform, the ellipse gets easily distorted where as on double platform it works ok. I am not sure if this is separate or related issue?

      Attachments

        1. contains_app.tar
          10 kB
        2. qreal_is_double.png
          qreal_is_double.png
          7 kB
        3. qreal_is_float_850Mx850M.png
          qreal_is_float_850Mx850M.png
          7 kB
        4. qreal_is_float.png
          qreal_is_float.png
          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
            juvuolle Juha Vuolle (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes