Hello peeps.
I got an issue with the usage of QTransform. As you can se in the attachment the pixmap after the transform is ugly and I cant figure out why this is.
The code I use is
Code:
{ initMyResource(); qreal width = m_pointer.size().width(); qreal height = m_pointer.size().height(); QTransform transform; transform.translate(size().width()/2, size().height()/2); transform.rotate(m_rotation); transform.translate(-size().width()/2, -size().height()/2); transform.scale(size().width() / width, size().height() / height); boolPainter.setTransform(transform); //boolPainter.setTransform(QTransform().translate(size().width()/2, size().height()/2) // .rotate(m_rotation).translate(-size().width()/2, -size().height()/2)); boolPainter.drawPixmap(0, 0, m_pointer); boolPainter.end(); }
Can anybody see how I can improve this so the quality stays the same?