Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Centered Zoom (Read 2645 times)
jsamba
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 19
Joined: Aug 17th, 2007
Centered Zoom
Aug 17th, 2007 at 2:05pm
Print Post  
I want the user to be allowed to zoom using a slider control, the mousewheel or double-clicking inside the diagram.

I use ZoomFactor to perform the zoom/unzoom responding to an event BUT it is the upper left corner of the visible rect which is invariant and I want it to be the CENTER of the visible rect.

I could do it knowing the coordinates of the visible rectangle.
I did not find a way to get the visible rect coordinates. I can reach to the left and top coord with ScrollY and ScrollY, that's all ... ???
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Centered Zoom
Reply #1 - Aug 18th, 2007 at 10:14am
Print Post  
If you know the size of the flowchart control in pixels, use the ClientPtToDocPt method to find the document coordinates of the lower-right corner.

Stoyan
  
Back to top
 
IP Logged
 
jsamba
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 19
Joined: Aug 17th, 2007
Re: Centered Zoom
Reply #2 - Aug 18th, 2007 at 2:09pm
Print Post  
Thank you Stoyan; I actually found a piece of code from you that does the work at

http://mindfusion.org/cgi/Forum/YaBB.pl?board=fcx_disc;action=display;num=115192...
  
Back to top
 
IP Logged
 
jsamba
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 19
Joined: Aug 17th, 2007
Re: Centered Zoom
Reply #3 - Aug 18th, 2007 at 2:11pm
Print Post  
... but it would be great to have it implemented as it is very useful

Something like the Scale, scaleX and ScaleY, scaleWidth ... fct et prop from VB  Wink
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint