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

Painting error on Mac OS ?

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 4.7.0, 4.8.0
    • GUI: Painting
    • None
    • Mac OS 10.6.3 and later
    • macOS

    Description

      When I try to render anything with QImage, QPixmap I get the "<<error>> CGAffineTransformInvert: singular matrix" error.
      Platform: Mac OS.
      Everything works just fine on a Windows XP or 7 machine, compiled under mscv++2010.

      the code:

      QImage img(filePath);
      ...
      ...
      ...
      QRectF imgRect = QRectF(img->rect());

      QPainter p(img);
      p.setPen( m_conf.Color ); // some valid QColor object
      p.setBrush( Qt::SolidPattern );
      p.setFont( m_conf.Font ); // some valid QFont object
      p.setOpacity( m_conf.Opacity ); // from 0.0 to 1.0

      qreal x = imgRect.width();
      qreal y = imgRect.height();

      p.save();
      p.translate( x, y );
      p.rotate(-90);

      // Get's error CGAffineTransformInvert: singular matrix.
      p.drawText( QPointF(0 + m_conf.BottonMargin , 0 - m_conf.RigthMargin),m_conf.String);

      p.restore();

      Attachments

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

        Activity

          People

            rodal Samuel Rødal
            markeshov Markeshov Dmitry
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes