daorus
1st August 2011, 20:47
http://www.qtcentre.org/attachment.php?attachmentid=6727&d=1312224010
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);
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")
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/perspective-transformations.html to understand these rools but I just can't find any information about my problem, I mean deep understanding of combination for QTransform.
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);
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")
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/perspective-transformations.html to understand these rools but I just can't find any information about my problem, I mean deep understanding of combination for QTransform.