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

QPainter drops e.g. lines using small (< 1e-12) user world coords

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15.9, 6.0.2, 6.1.0 Alpha
    • 5.12.0
    • GUI: Painting
    • None
    • MacOS 10.11, 10.12 XCode
      Windows 8, 10 Visual Studio
    • macOS
    • 1549dff04c49aa37333e54f8bc45900d0f35b270 (qt/qtbase/dev) 3fec6597a5d718f5aa2ba5976b9175635a191ca0 (qt/qtbase/6.0) 8c2860672f54782c9b5e7159da476dc2882b7e1c (qt/qtbase/6.1) 92e813b1b7c2cf3398946fab873841f828c21b9f (qt/tqtc-qtbase/tqtc/lts-5.15)

    Description

      QCosmeticStroker::drawLine(const QPointF &p1, const QPointF &p2)

      performs a comparison of both input QPointF parameters BEFORE they are transformed into device coords!

      If the coordinates are < 1e-12 only a single point is drawn because of usage of qFuzzyIsNull in operator==

       

      We use scientific data, like pico and nano amps! Most likely there are more issues of this nature!

       

      SOURCE CODE

      void QCosmeticStroker::drawLine(const QPointF &p1, const QPointF &p2)

      }{{   

      // comparison should be on start and end below, not p1 and p2

      {{  if (p1 == p2) }}

        { }}{{          

          drawPoints(&p1, 1);{{        }}

          return;{{    }}

         } {{    }}

         QPointF start = p1 * state->matrix;{{    }}

         QPointF end = p2 * state->matrix;

         .

         .

         .

      }

      Attachments

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

        Activity

          People

            vgt Eirik Aavitsland
            ulix Ulrich Rexhausen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes