Scott Raney raney at metacard.com
Sat Feb 23 22:50:02 EST 2002

On Sat, 23 Feb 2002 Jim Hurley <jphurley at jps.net> wrote:


>   The pencil tool in MC is not the same as the pencil tool in HC. (The 
> above script draws an altogether different figure in HC.) In HC the 
> pencil tool draws black if the initial screen point is white and 
> white if the initial screen point is black--it acts like the "fat 
> bits tool." Fortunately, in MC it always draw whatever the pen color 
> is; the color of the starting point is irrelevant.

Right, it has to be that way.  You use a different mouse button
(control-click on the Mac) to erase instead of it picking up the start

> However, unlike 
> the line tool, it is not possible to vary the pen width--a small 
> price to pay for the increase in speed. Furthermore, unlike the line 
> tool, the drawing  speed is apparently unaffected by the card 
> dimensions. Drawing with the line  tool becomes increasing  slow as 
> the card dimensions increase.
> >Adding a "lock screen" reduced the overall time to 9 ticks --
> >virtually immediate.
> In most of my applications in education, it is important for the 
> student to see the path evolving in time and so locking  the screen 
> is not an option.
> I hope the other Scott will help us to understand the difference 
> between the  pencil and line tools and why the pencil tool is soooo 
> much faster.

It's rubberbanding: the pencil draws directly to the image, whereas
things like lines and circles and rects must be buffered so they can
show you the shape as they're being dragged out.  But this does point
to a possible optimization that could be made for drag with dragSpeed
set to 0, in which case it really doesn't need to do this step.
Optimizing it out might speed things up some, and I'll put
investigating this on the to-do list for 2.4.2.

> Jim Hurley

Scott Raney  raney at metacard.com  http://www.metacard.com
MetaCard: You know, there's an easier way to do that...

More information about the use-livecode mailing list