Drawing speed in rev 2.8

James Hurley jhurley0305 at sbcglobal.net
Tue Jun 5 11:33:47 EDT 2007


>
> Message: 4
> Date: Mon, 04 Jun 2007 10:49:15 -0700
> From: Scott Rossi <scott at tactilemedia.com>
> Subject: Re: Drawing speed in rev 2.8
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Message-ID: <C2899EAB.27383%scott at tactilemedia.com>
> Content-Type: text/plain;	charset="US-ASCII"
>
> Recently, James Hurley wrote:
>
>> I've just moved over to 2.8 and have  found a significant loss of
>> speed in drawing with the  pencil tool.
>>
>> Does anyone have any idea why the handler below would take 88 ticks
>> in 2.7, but 302 ticks in 2.8?
>
> I see the same speed you describe in 2.8.1.  Not sure why there is a
> difference compared to older versions, but the following could be a
> workaround for you, plus allow you to somewhat control the speed at  
> which
> the drawing is completed.
>
> [ between the NEW comments ]
>
> on mouseUp
>   put the ticks into tStartTime
>
>   repeat while the number of images >0
>     delete image 1
>   end repeat
>
>   put the width of this card/2 into x0
>   put the height of this card/2 into y0
>   put 0 into  x
>   put 0 into  y
>   put  2 into tStep
>   put 0 into tAng
>   put pi/180 into radPerDeg
>   choose the pencil tool
>   -- BEGIN NEW
>   put "" into tLocked
>
>   repeat with tAng = 1 to 360
>     if tAng mod 8 <> 0 then -- HIGHER NUMBER = FASTER DRAW RATE
>       if not tLocked then
>         lock screen
>         put true into tLocked
>       end if
>     else
>       unlock screen
>       put false into tLocked
>     end if
>     -- END NEW
>     put tStep* cos(radPerDeg* tAng) into dx
>     put  tStep * sin(radPerDeg *  tAng) into dy
>     drag from round(x0+x),round(y0+y) to round(x0+x+dx), round(y0+y 
> +dy)
>     add dx to x
>     add dy to y
>   end repeat
>
>   choose the browse tool
>   put the ticks - tStartTime into msg box
> end mouseUp
>
> Regards,
>
> Scott Rossi
> Creative Director
> Tactile Media, Multimedia & Design

Thanks Scott. You suggestion is very helpful in speeding up this  
particular handler.

Unfortunately the handler was only meant to be an illustration of a  
problem that occurs in a wide variety of routines using the pencil  
tool to draw with.

This four-fold drop in speed is a serious blow to my Turtle Graphics  
programs.

I will submit a request to bugzilla that the pencil tool be  
resuscitate in 2.8.

Thanks,

Jim Hurley



More information about the use-livecode mailing list