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.save();
        p.translate( x, y );
        p.rotate(-90);
        p.drawText( QPointF(0 + m_conf.BottonMargin , 0 - m_conf.RigthMargin),m_conf.String);
        qDebug() << p.transform();
    p.restore();@
    

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

    Thanks


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.