Results 1 to 2 of 2

Thread: Qgraphicsrectitem coordinate system on image resize

  1. #1
    Join Date
    Mar 2018
    Posts
    6
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Qgraphicsrectitem coordinate system on image resize

    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?

  2. #2
    Join Date
    Mar 2018
    Posts
    6
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qgraphicsrectitem coordinate system on image resize

    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?
    Untitled.png

Similar Threads

  1. Coordinate space vs coordinate system
    By kangaba in forum General Programming
    Replies: 0
    Last Post: 10th December 2013, 14:38
  2. qt coordinate system
    By qtlearner123 in forum Newbie
    Replies: 1
    Last Post: 17th April 2012, 15:20
  3. Replies: 4
    Last Post: 13th February 2011, 20:24
  4. resize a QGraphicsRectItem
    By gbmtoday in forum Newbie
    Replies: 4
    Last Post: 10th February 2011, 16:12
  5. The coordinate system
    By avis_phoenix in forum Qt Programming
    Replies: 1
    Last Post: 28th July 2008, 12:16

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.