Overview of program, to understand Question
I'm loading an image in type QImage
Then I paint the image in label,
& allow user to make markings on image (draw point/ellipse/...)
After the user finish editing the image
All the points the user created via mouse clicks is stored in an array.
Later in the program I'm rotating image along the y-axis then repainting the image.
but when I paint all the points that were stored in array its not being rotated accordingly(naturally)
The rotation of image along the y-axis.... Works
How do I rotate the points along the same axis so its inline with image
ie(creating a perspective look on output)
code to transform image
//before paint function
QTransform pptv;
pptv.rotate(-60, Qt::YAxis);
image1 = image1.transformed(pptv);
imageDrawFlag1 = true;
//before paint function
QTransform pptv;
pptv.rotate(-60, Qt::YAxis);
image1 = image1.transformed(pptv);
imageDrawFlag1 = true;
To copy to clipboard, switch view to plain text mode
& i paint the transformed image
but when it comes to repainting the points
//In paint function
foreach(tempPoint, markers)
{
painter.drawEllipse(tempPoint, 5, 5);
}
//painter.rotate -> only allows an integer, Does not allow which axis
//In paint function
foreach(tempPoint, markers)
{
painter.drawEllipse(tempPoint, 5, 5);
}
//painter.rotate -> only allows an integer, Does not allow which axis
To copy to clipboard, switch view to plain text mode
How would I go about solving this issue?
Kind Regards
Having some network issues today, my posts or responses might be delayed
Bookmarks