PDA

View Full Version : Zooming a paricular selected region



Kapil
9th May 2006, 09:21
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

wysota
9th May 2006, 12:15
But do you want to zoom or clip (crop)?

Kapil
9th May 2006, 12:40
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

wysota
9th May 2006, 12:44
Could you provide some image with an example of what you want?

Kapil
9th May 2006, 14:11
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

wysota
9th May 2006, 14:16
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).

Kapil
9th May 2006, 14:23
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

wysota
9th May 2006, 14:32
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

Kapil
9th May 2006, 14:41
hi..

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

Thanks a lot..
with regards,
Kapil