Drag a Graphic Tool.

Jim Hurley jhurley at infostations.com
Mon Nov 29 11:07:47 EST 2004


>------------------------
>
>Message: 2
>Date: Sun, 28 Nov 2004 10:00:19 -0800
>From: Roger Guay <rogerguay at centurytel.net>
>Subject: Re: Drag a Graphic Tool.
>To: use-revolution at lists.runrev.com
>Message-ID: <5DB1C30C-4167-11D9-8CE7-000D933610BE at centurytel.net>
>Content-Type: text/plain; charset=US-ASCII; format=flowed
>
>Thanks very much Jan.  I thought of something like this but I was
>hoping to slow the "trace" down somehow.  Setting the points of a
>polygon is instantaneous for each line segment . . .  not the effect I
>was hoping for.  So far, I have made progress dragging the brush  tool
>as It gives me some choice of the line width.


Roger,

Actually you can set the "linesize" of the line or polygon tool; you 
can have both your arrow and line size.

What you need apparently is more intermediate points in order to 
control rate of drawing between end points. One way to do this would 
be with, you guessed it, Turtle Graphics. (You would want the version 
that does vector graphics, not bit map.) For example, you could 
control the motion between any two points A and B as follows:

on mouseUP
   put 0,0 into A
   put 300,300 into B
   startTurtle
   setXY A
   setheading direction(B)
   put distance(B) into d
   put 3 into s --Or whatever works for you
   repeat round(d/s) times
     forward s
     --Perhaps a "wait" here
   end repeat
   setxy B --Just to take care of the rounding error
end mouseUP

And you could iterate this to take you through a sequence of points.

Jim


More information about the use-livecode mailing list