Results 1 to 9 of 9

Thread: Zooming a paricular selected region

  1. #1
    Join Date
    Feb 2006
    Location
    New Delhi,India
    Posts
    226
    Thanks
    14
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Zooming a paricular selected region

    Hi...

    I want to zoom a particular selected region and set that into display...
    with the help pf mousemove event i have set the points that are selected..
    Now when i call my zoom event it should only zoom the selected region and show it and not zoom the entire canvas...
    its something like creation of a new view on the canvas which would show the selected region on the canvas..
    how do it do that...

    Thanking you..
    Kapil
    All you have to decide is what to do with the time that is given to you

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Zooming a paricular selected region

    But do you want to zoom or clip (crop)?

  3. #3
    Join Date
    Feb 2006
    Location
    New Delhi,India
    Posts
    226
    Thanks
    14
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Zooming a paricular selected region

    Quote Originally Posted by wysota
    But do you want to zoom or clip (crop)?
    Hi..

    I want to zoom a selected part on the canvas and the entire canvas..
    its like whenever i select a potion and press the zoom button, that part is only zoomed to scale level 3 and not anyother part of the canvas....

    clip(crop)---> ??????

    with regards,
    Kapil
    All you have to decide is what to do with the time that is given to you

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Zooming a paricular selected region

    Could you provide some image with an example of what you want?

  5. #5
    Join Date
    Feb 2006
    Location
    New Delhi,India
    Posts
    226
    Thanks
    14
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Zooming a paricular selected region

    Hi..

    In the image attached, i want to just zoom the rectangle in the center and not the lines arnd it...
    with the worldmatrix and scale function the entire canvas gets zoomed.. i just want this item to get zoomed and shown on the viewport or say on the screen provided..
    how do i do it....


    kapil
    Attached Images Attached Images
    All you have to decide is what to do with the time that is given to you

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Zooming a paricular selected region

    A... ok. So you can't do it with QCanvas The best way would probably be to create a widget on top of the item and paint the zoomed part on it or create another canvasview and show only the part of the canvas you want (zoomed of course).

  7. #7
    Join Date
    Feb 2006
    Location
    New Delhi,India
    Posts
    226
    Thanks
    14
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Zooming a paricular selected region

    Hi...

    Creating another View and showing the rectangle in a zoomed format on it ?????

    How do i call the canvas object on a new view wherein it is shown only....

    object is unique to a view... how can i pass the same canvas item to two different views, one in normal and the other in zoomed format...

    can u help me out with some doc or info on it... i read the Qcanvas and the QCanvasView docs...

    Kapil
    All you have to decide is what to do with the time that is given to you

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Zooming a paricular selected region

    Quote Originally Posted by Kapil
    object is unique to a view...
    No, it's unique to a canvas.

    how can i pass the same canvas item to two different views, one in normal and the other in zoomed format...
    Didn't I already answer that question for you today?
    http://www.qtcentre.org/forum/showthread.php?t=2140

  9. #9
    Join Date
    Feb 2006
    Location
    New Delhi,India
    Posts
    226
    Thanks
    14
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Zooming a paricular selected region

    hi..

    yaa u did answer that... so sorry for the repitition...
    i would it this way..

    Thanks a lot..
    with regards,
    Kapil
    All you have to decide is what to do with the time that is given to you

Similar Threads

  1. Zooming a selected region on QCanvasView
    By luffy27 in forum Qt Programming
    Replies: 10
    Last Post: 5th October 2007, 10:30

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.