Brush Tool in iOS

Scott Rossi scott at tactilemedia.com
Thu Oct 6 21:08:27 EDT 2011


I think because the LFs allow you place single points (dots) on the card
that simulate the appearance of paint.  Spaces in the point list of a
polygon allow you to create discontinuous segments/lines.  Without the LFs,
you would wind up with a messy close polygon.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design



Recently, tbodine wrote:

> 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-tp3804474p388
> 0386.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>






More information about the use-livecode mailing list