Important: Please read the Qt Code of Conduct -

CGAffineTransformInvert in Mac OS Qt 4.8.0

  • Hi, please help!

    When i'll try draw text on QPixmap or QImage by using QPainter, i'll get error: CGAffineTransformInvert: singular matrix.

    there is code:

    @ QRectF imgRect = QRectF(img->rect());

    QPainter p(img);
    p.setPen( m_conf.Color );
    p.setBrush( Qt::SolidPattern );
    p.setFont( m_conf.Font );
    p.setOpacity( m_conf.Opacity );
    qreal x = imgRect.width();
    qreal y = imgRect.height();
    qDebug() << p.transform();;
        p.translate( x, y );
        p.drawText( QPointF(0 + m_conf.BottonMargin , 0 - m_conf.RigthMargin),m_conf.String);
        qDebug() << p.transform();

    on windows xp, 7 msvc++2010 this working good


Log in to reply