Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Exact zoom (Read 2568 times)
madrat
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Jun 13th, 2007
Exact zoom
Jun 13th, 2007 at 9:02am
Print Post  
Hello,

I'm evaluating FlowChart.net for use in our software. So far, we're quite satisfied with it. However, there are a few wrinkles that we'd like to iron out before making a definite decision.

Our application doesn't need the zoom feature (except in the overview). However, we'd like to have an *exact* 100% zoom and so far, we've not been able to figure out how to do that. Setting the 'ZoomFactor' to 100 does not yield the expected result, i.e. 1px in the FlowChart does not correspond to 1px on the screen.

At the moment, we use a scaling function defined as follows, to normalize all our values:

[code]public float ScaleToZoom(float x) { return x / (ZoomFactor * 3.0f / 100.0f); }[/code]
However, we'd like an exact solution instead of this hack. What are we doing wrong and how to do it right?

PS: I should probably mention that the FlowChart control is used by inheriting from it. Then the subclass is instantiated. The subclass makes the following adjustments to the parent class ('FlowChart') in its constructor:

[code]        public Graph() {
           AllowDrop = false;
           ArrowCrossings = ArrowCrossings.BreakOff;
           ArrowStyle = ArrowStyle.Bezier;
           Behavior = BehaviorType.DoNothing;
           RoundedArrows = true;
           ShadowsStyle = ShadowsStyle.None;
           ZoomFactor = 100;
           // These doc extends are wrong, anyway; I just include them in case they somehow tamper the zoom.
           DocExtents =
               new System.Drawing.RectangleF(0.0f, 0.0f, ScaleToZoom((float)Width), ScaleToZoom((float)Height));
       }[/code]

PS: I've got a few more questions. Should I post them in this same thread or should I open independent threads for them?

And another PS: I guess that quite a few of my questions would be obsolete if there were a documentary (in addition to the examples). We haven't found one. Did we perhaps overlook it?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Exact zoom
Reply #1 - Jun 13th, 2007 at 11:38am
Print Post  
Hi,

By default FlowChart.NET measures stuff in millimeters. If you want the values that you specify when creating items to be treated as pixels, set the FlowChart.MeasureUnit to Pixel. After changing it, you will need to change some other properties that specify lengths and sizes. Consult the help topic on MeasureUnit for more details. There is a fcnet.chm file installed in the control's root folder, and there is a shortcut to in the start menu Flowchart.NET submenu.

Stoyan
  
Back to top
 
IP Logged
 
madrat
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Jun 13th, 2007
Re: Exact zoom
Reply #2 - Jun 13th, 2007 at 6:18pm
Print Post  
Hi,

thanks a lot. Seems I need glasses badly. I'll have a look at this help file.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint