AW: Can't pick the mousecolor with brush tool while mousedown

Tiemo Hollmann TB toolbook at kestner.de
Wed Jul 6 11:11:26 EDT 2011


Hallo Björnke,
good approach, I never would have thought about this. I am still struggeling
with the funny (but understandable) zebra effect, but perhaps I'll find a
way. I think I have to find a way to check if I am already outside of the
range of the pixels (size of the brush tool) I just have drawn, before I do
a new color comparison.
Thank you
Tiemo

> -----Ursprüngliche Nachricht-----
> Von: use-livecode-bounces at lists.runrev.com [mailto:use-livecode-
> bounces at lists.runrev.com] Im Auftrag von Björnke von Gierke
> Gesendet: Mittwoch, 6. Juli 2011 15:23
> An: How to use LiveCode
> Betreff: Re: Can't pick the mousecolor with brush tool while mousedown
> 
> the described behaviour is maybe not ideal, but it's how things are
supposed
> to work, so it's a lack of features, not a  bug.
> 
> If you want full control over the mouse, you probably will need to fake
the
> drawing tool by using the drag command within a repeat loop. However, then
you
> also need to accommodate for the problem that you are drawing in the
opposite
> color, and somehow disalow the brush from becoming a zebra stripes
creation
> tool. See this example for what I mean (drag slowly for problem):
> 
> on mouseDown --works only with pointer tool
>    put the mouseLoc into theCurrent
>    repeat while the mouse is down
>       --wait with messages --uncomment if slow, allowing messages can help
>       --add check to disallow zebra stripes here
>       if the mousecolor is "255,255,255" then
>          set the brushcolor to black
>       else
>          set the brushcolor to white
>       end if
> 
>       choose brush tool
>       drag from theCurrent to the mouseLoc
>       put the mouseLoc into theCurrent
>       choose browse tool
>    end repeat
>    pass mouseDown
> end mouseDown





More information about the use-livecode mailing list