Loading ...
Sorry, an error occurred while loading the content.
 

Drawing Sketch on SVG when itz Zoomed

Expand Messages
  • Francis
    Hi All, Please suggest me how to draw a freehand sketch on an existing SVG when it is zoomed in or out to any extent.The drawing should follow my cursor
    Message 1 of 4 , Mar 12, 2003
      Hi All,

      Please suggest me how to draw a freehand sketch on an existing SVG
      when it is zoomed in or out to any extent.The drawing should follow
      my cursor position.

      Problem:

      I am trying to draw a sketch on a SVG. When it is at the original
      size it is working fine. When I zoomed it and drawing the sketch,
      then it is not drawing the sketch where my cussor position is. It is
      drawing on some offset. How can I fix it and what is the
      functionality that i need to implement in java script for this
      transformation?You can test the same in the following link also.

      http://www.resource-solutions.de/svgeditor
      http://www.adobe.com/svg/demos/svgDraw/svgDraw/index.html

      thank you in advance
      Francis
    • Chris Peto
      Hi, Yes, I would like to know this too. It seems that with even getting the zoom factor, it still zooms from the middle. Mit freundlichen Gru?en/Regards Chris
      Message 2 of 4 , Mar 12, 2003
        Hi,

        Yes, I would like to know this too. It seems that with even getting the
        zoom factor, it still zooms from the middle.

        Mit freundlichen Gru?en/Regards
        Chris Peto
        System Development
        ------------------------------------
        Resource Solutions
        Mobile: +49 (0) 173 308 7843
        Tel:+49(0) 6103 80 21 98
        Web:http://www.resource-solutions.de
        mailto:CPeto@...

        -----Original Message-----
        From: Francis [mailto:francis.k@...]
        Sent: Mittwoch, 12. Marz 2003 10:22
        To: svg-developers@yahoogroups.com
        Subject: [svg-developers] Drawing Sketch on SVG when itz Zoomed


        Hi All,

        Please suggest me how to draw a freehand sketch on an existing SVG
        when it is zoomed in or out to any extent.The drawing should follow
        my cursor position.

        Problem:

        I am trying to draw a sketch on a SVG. When it is at the original
        size it is working fine. When I zoomed it and drawing the sketch,
        then it is not drawing the sketch where my cussor position is. It is
        drawing on some offset. How can I fix it and what is the
        functionality that i need to implement in java script for this
        transformation?You can test the same in the following link also.

        http://www.resource-solutions.de/svgeditor
        http://www.adobe.com/svg/demos/svgDraw/svgDraw/index.html

        thank you in advance
        Francis



        Yahoo! Groups Sponsor
        ADVERTISEMENT




        -----
        To unsubscribe send a message to:
        svg-developers-unsubscribe@yahoogroups.com
        -or-
        visit http://groups.yahoo.com/group/svg-developers and click "edit my
        membership"
        ----

        Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


        [Non-text portions of this message have been removed]
      • Chris Peto
        Hi, I tried using the scale factor (transform) on my canvas object and it works to some extent. As long as the mouse is in the middle of the transformed area.
        Message 3 of 4 , Mar 12, 2003
          Hi,

          I tried using the scale factor (transform) on my canvas object and it works
          to some extent. As long as the mouse is in the middle of the transformed
          area.

          Mit freundlichen Gru?en/Regards
          Chris Peto
          System Development
          ------------------------------------
          Resource Solutions
          Mobile: +49 (0) 173 308 7843
          Tel:+49(0) 6103 80 21 98
          Web:http://www.resource-solutions.de
          mailto:CPeto@...

          -----Original Message-----
          From: Kevin Lindsey [mailto:kevin@...]
          Sent: Mittwoch, 12. Marz 2003 17:38
          To: svg-developers@yahoogroups.com
          Subject: Re: [svg-developers] Drawing Sketch on SVG when itz Zoomed


          Chris,

          > Yes, I would like to know this too. It seems that with even getting the
          > zoom factor, it still zooms from the middle.

          This is a mouse tracking problem. See the example on this page:

          http://www.kevlindev.com/gui/utilities/viewbox/

          Basically, you need to convert the mouse coordinate to user space taking
          the
          current zoom, translation, transforms, and viewBox settings into account.

          HTH,
          Kevin
          KevLinDev - http://www.kevlindev.com


          Yahoo! Groups Sponsor
          ADVERTISEMENT




          -----
          To unsubscribe send a message to:
          svg-developers-unsubscribe@yahoogroups.com
          -or-
          visit http://groups.yahoo.com/group/svg-developers and click "edit my
          membership"
          ----

          Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


          [Non-text portions of this message have been removed]
        • Kevin Lindsey
          Chris, ... This is a mouse tracking problem. See the example on this page: http://www.kevlindev.com/gui/utilities/viewbox/ Basically, you need to convert the
          Message 4 of 4 , Mar 12, 2003
            Chris,

            > Yes, I would like to know this too. It seems that with even getting the
            > zoom factor, it still zooms from the middle.

            This is a mouse tracking problem. See the example on this page:

            http://www.kevlindev.com/gui/utilities/viewbox/

            Basically, you need to convert the mouse coordinate to user space taking the
            current zoom, translation, transforms, and viewBox settings into account.

            HTH,
            Kevin
            KevLinDev - http://www.kevlindev.com
          Your message has been successfully submitted and would be delivered to recipients shortly.