PDA

View Full Version : Qgraphicsrectitem coordinate system on image resize



sayan275
24th May 2018, 14:38
On an image(x by y), a QGraphicsRectItem is added, Let say Qrect(73, 77, 43, 28) Qrect(x,y,w,h). After resizing the image to 128 by 32, how this QGraphicsRectItem can be redrawn with proper co-ordinates.

The image is first resized, and then the graphicsRectItem to be added.

How a qrect can be mapped with respect to the image resized?

sayan275
28th May 2018, 11:13
The grey area within the blue rectangle will be resized to 128 * 32, and then the red rectangle would be added on the resized image. How to get the co-ordinates of red rect on the resized image?
12836