How best can I create a panel which allows zoom on a drawing?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • steve

    How best can I create a panel which allows zoom on a drawing?


    I would like to create a panel, or other widget, on which I can draw,
    say, a triangle, and use the wheel on the mouse to zoom in and out on
    the drawing. A vector drawing.

    I know this can be done because I have seen apps that do this. They
    were 3D and I only need 2D but they were very fast.

    Is there an easy way to do this? Do I need to use the DirectX
    libraries to do this?

    Any pointer in the right direction would be very welcome and hopefully
    save me much time.

    Thanks,

    Steve
  • Marc Gravell

    #2
    Re: How best can I create a panel which allows zoom on a drawing?

    I wonder if your best approach might be to use WPF to render the area?
    This natively supports scaleable vector-based graphics - you'd just need
    to add the mouse hooks... Try searching for +WPF +zoom

    Marc

    Comment

    • steve

      #3
      Re: How best can I create a panel which allows zoom on a drawing?


      Thanks. My original app was written using Windows Forms. Is there an
      easy way to convert to WPF?

      Steve



      On Fri, 09 May 2008 13:05:56 +0100, Marc Gravell
      <marc.gravell@g mail.comwrote:
      >I wonder if your best approach might be to use WPF to render the area?
      >This natively supports scaleable vector-based graphics - you'd just need
      >to add the mouse hooks... Try searching for +WPF +zoom
      >
      >Marc

      Comment

      • Chris Dunaway

        #4
        Re: How best can I create a panel which allows zoom on a drawing?

        On May 9, 6:48 am, steve <s_j_b...@yahoo .comwrote:
        I would like to create a panel, or other widget, on which I can draw,
        say, a triangle, and use the wheel on the mouse to zoom in and out on
        the drawing. A vector drawing.
        >
        I know this can be done because I have seen apps that do this. They
        were 3D and I only need 2D but they were very fast.
        >
        Is there an easy way to do this? Do I need to use the DirectX
        libraries to do this?
        >
        Any pointer in the right direction would be very welcome and hopefully
        save me much time.
        >
        Thanks,
        >
        Steve
        Check out this site:



        and this link in particular:



        Chris

        Comment

        • Marc Gravell

          #5
          Re: How best can I create a panel which allows zoom on a drawing?

          Not really, but you can embed WPF in WinForm (via ElementHost) and
          WinForm in WPF (via WindowsFormsHos t).

          However, depending on the complexity, the zooming picturebox (that Chris
          mentions) looks interesting.

          Marc

          Comment

          • steve

            #6
            Re: How best can I create a panel which allows zoom on a drawing?


            thanks, I will have to play around with it a bit to see how it would
            work for what I want.

            Steve



            On Fri, 9 May 2008 06:41:43 -0700 (PDT), Chris Dunaway
            <dunawayc@gmail .comwrote:
            >On May 9, 6:48 am, steve <s_j_b...@yahoo .comwrote:
            >I would like to create a panel, or other widget, on which I can draw,
            >say, a triangle, and use the wheel on the mouse to zoom in and out on
            >the drawing. A vector drawing.
            >>
            >I know this can be done because I have seen apps that do this. They
            >were 3D and I only need 2D but they were very fast.
            >>
            >Is there an easy way to do this? Do I need to use the DirectX
            >libraries to do this?
            >>
            >Any pointer in the right direction would be very welcome and hopefully
            >save me much time.
            >>
            >Thanks,
            >>
            >Steve
            >
            >Check out this site:
            >
            >http://www.bobpowell.net
            >
            >and this link in particular:
            >
            >http://www.bobpowell.net/zoompicbox.htm
            >
            >Chris

            Comment

            Working...