locked
Controlling Zoom RRS feed

  • Question

  •  

    I find when I render a graph w/ just a few nodes(4) vs a graph w/ many nodes (50) that the physical dimensions of the nodes are different when rendered.

     

    It seems that a graph w/ few nodes is zoomed in tighter than one w/ many nodes.

    Is there a way to control this so that the physical dimensions of the nodes always

    appear to be the same size (same zoom level)?

     

    I've tried using gViewer.ZoomF but this didn't seem to have any affect.

     

    Thx.

    Saturday, March 29, 2008 2:50 AM

Answers

  • ZoomF should work for you.

    Try to do something like that

     gViewer.ZoomF = Math.Max((double)graph.Width / (double)gViewer.Width, (double)graph.Height / (double)gViewer.Height);

    Thanks,

    Lev

    Monday, March 31, 2008 7:24 PM

All replies

  • ZoomF should work for you.

    Try to do something like that

     gViewer.ZoomF = Math.Max((double)graph.Width / (double)gViewer.Width, (double)graph.Height / (double)gViewer.Height);

    Thanks,

    Lev

    Monday, March 31, 2008 7:24 PM
  •  

    Perfect. Thx!
    Wednesday, April 2, 2008 6:48 AM