Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. CGAffineTransformInvert in Mac OS Qt 4.8.0

CGAffineTransformInvert in Mac OS Qt 4.8.0

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    markeshov
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved