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

QTransform fails when using negative w in projective transforms

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes