
For about a week I spent to figure out rules to get right combination of translate and axis rotation to build a tranform object to set to painter in the following way
QTransform trans;
trans.translate(1000, 500);
trans.rotate(25, Qt::XAxis);
trans.rotate(-10, Qt::ZAxis);
pp.setTransform(trans);
pp.
drawTiledPixmap(QRect(-1000,
-1000,
3000,
3000), tile
);
p.save("room.jpg")
QTransform trans;
trans.translate(1000, 500);
trans.rotate(25, Qt::XAxis);
trans.rotate(-10, Qt::ZAxis);
QPixmap tile("tile.jpg");
QPixmap p(1920, 1080);
QPainter pp(&p);
pp.setTransform(trans);
pp.drawTiledPixmap(QRect(-1000, -1000, 3000, 3000), tile);
p.save("room.jpg")
To copy to clipboard, switch view to plain text mode
Does anybody can recommend the rules how to get definitelly that turn I want, no matter how crazy it is?
If life is a fairy tale I WOULD want to get a utily like this http://zrusin.blogspot.com/2006/09/p...ormations.html to understand these rools but I just can't find any information about my problem, I mean deep understanding of combination for QTransform.
Bookmarks