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

QTransform fails when using negative w in projective transforms

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 4.5.2
    • GUI: Painting
    • None
    • windows

    Description

      Consider the following function in qTransform

      static inline bool lineTo_clipped(QPainterPath &path, const QTransform &transform, const QPointF &a, const QPointF &b,
      bool needsMoveTo, bool needsLineTo = true)
      {
      QHomogeneousCoordinate ha = mapHomogeneous(transform, a);
      QHomogeneousCoordinate hb = mapHomogeneous(transform, b);

      if (ha.w < Q_NEAR_CLIP && hb.w < Q_NEAR_CLIP)
      return false;

      A valid projective transform may have ha.w be -0.997. This code and many other checks like it assume that w > 0.

      Attachments

        Issue Links

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

          Activity

            People

              rodal Samuel Rødal
              jasonremillard Jason Remillard
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes