Brush Tool in iOS

tbodine lvhdgc7 at gmail.com
Thu Oct 6 20:30:50 EDT 2011


Hope you don't mind a LC newbie coder question. In the code below, why does
the graphic need a linefeed (LF constant)? Or does LF have some other
meaning?
Thanks,
Tom Bodine


John Craig-4 wrote:
> 
> Here's a simple example using a graphic.  Just create a new 
> stack, add a line graphic called 'draw', set it's lineSize to 10 then 
> put the following script into the card script.  Double click clears the 
> drawing, and each mouseDown starts a new line.
> 
> 
> local sDrawing
> 
> 
> on mouseDoubleUp
>     set the points of grc "draw" to empty
> end mouseDoubleUp
> 
> 
> on mouseDown
>     put true into sDrawing
> end mouseDown
> 
> 
> on mouseMove
>     if sDrawing then
>        set the points of grc "draw" to the points of grc "draw" & LF & 
> the mouseLoc
>     end if
> end mouseMove
> 
> 
> on mouseUp
>     put false into sDrawing
>     set the points of grc "draw" to the points of grc "draw" & LF & LF
> end mouseUp
> 
> 


--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Brush-Tool-in-iOS-tp3804474p3880386.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list