help with speedy graphics
Geoff Canyon
gcanyon at inspiredlogic.com
Wed Jul 21 06:52:50 EDT 2004
After doing this:
set the markerPoints of grc 2 to 0,0 & cr & 5,0 & cr & 5,5 & cr & 0,5
& cr & 0,0
This takes about 10 ticks to create 2500 boxes on my machine:
on mouseUp
put ticks() into t
put empty into tPoints
repeat 2500
put random(300)+410 into x
put random(400)+50 into y
put x,y & cr & cr after tPoints
end repeat
set the points of grc 2 to tPoints
put ticks() - t
end mouseUp
As others have suggested, having one graphic for each color should do
the trick.
Using ten graphics, it takes about 10 ticks to create 10,000 boxes
using 10 graphics:
on mouseUp
lock screen
put ticks() into t
repeat with i = 1 to 10
put empty into tPoints
repeat 1000
put random(600)+10 into x
put random(400)+50 into y
put x,y & cr & cr after tPoints
end repeat
set the points of grc i to tPoints
end repeat
put ticks() - t
end mouseUp
regards,
Geoff Canyon
gcanyon at inspiredlogic.com
More information about the use-livecode
mailing list