Goofy Drawing question

Dr. Hawkins dochawk at
Sat Feb 25 10:39:40 EST 2017

On Sat, Feb 25, 2017 at 2:07 AM, hh via use-livecode <
use-livecode at> wrote:

> Assuming you wish to draw, not to paint:

I assumed he wanted to see it draw, so . . .

> local gg="goofy", fc="255,0,0", ls=3
> local x0=250, x1=375,y0=250, y1=275 --starting & ending coordinates
local x,y, xstep, ystep

local drwTm = 500 --time to take to draw it

on mouseUp
>   lock screen
>   if there is no grc gg then create grc gg
 set points of grc gg to (x0,y0)
 unlock screen

  set style of grc gg to "polygon" -- or "line"
 set lineSize of grc gg to ls
set forecolor of grc gg to fc

steps = max(x1-x0, y1-y0)

put (x1-x0)/steps into xstep

put (y1-y0)/steps into ystep

tinc = round(drwTm /steps)

repeat with i = 1 to steps

lock screen

  set points of grc gg to (x0,y0),(x0+i*xstep, y0+i*ystep)

wait tinc milliseconds with messages
unlock screen

 end repeat

> end mouseUp
> --
Dr. Richard E. Hawkins, Esq.
(702) 508-8462

More information about the use-livecode mailing list