4 Replies Latest reply on Nov 14, 2008 9:50 AM by Gregory Lafrance

    A question about drawing canvas

    ruoyang
      Hi,

      In my application desgin, I have a canvas embeded in a viewstack. The canvas can be changed the size and move freely within the viewstack. I also allow user to draw line by clicking the mouse and moving on the canvas. Here is the problem, when user move or change the size of the canvas where he/she have drawn something, I need the size and position of his drawings also changed along with the canvas. That means the drawings are relatively static with the canvas. How can I implement this? Any Idear? Thanks!!!
        • 1. Re: A question about drawing canvas
          Level 7

          "ruoyang" <webforumsuser@macromedia.com> wrote in message
          news:gfj6nb$jkt$1@forums.macromedia.com...
          > Hi,
          >
          > In my application desgin, I have a canvas embeded in a viewstack. The
          > canvas
          > can be changed the size and move freely within the viewstack. I also allow
          > user
          > to draw line by clicking the mouse and moving on the canvas. Here is the
          > problem, when user move or change the size of the canvas where he/she have
          > drawn something, I need the size and position of his drawings also changed
          > along with the canvas. That means the drawings are relatively static with
          > the
          > canvas. How can I implement this? Any Idear? Thanks!!!

          Are you using the canvas's graphics object to draw the lines? I would think
          that the graphics object would move with the canvas.


          • 2. A question about drawing canvas
            ruoyang Level 1
            yes you are right, I did use the canvas graphics to draw. But when I change the size of canvas, the problem comes.
            • 3. Re: A question about drawing canvas
              Level 7

              "ruoyang" <webforumsuser@macromedia.com> wrote in message
              news:gfk7d1$3lf$1@forums.macromedia.com...
              > yes you are right, I did use the canvas graphics to draw, but it dosent
              > move with the canvas.

              Dunno then.


              • 4. Re: A question about drawing canvas
                Gregory Lafrance Level 6
                If you can post simplified yet "complete" code that shows the problem we can compile and examine/play with, you will probably have an answer soon.