Can't pick the mousecolor with brush tool while mousedown

Tiemo Hollmann TB toolbook at kestner.de
Wed Jul 6 05:01:27 EDT 2011


Hello,

I want to draw a line on an image with the brush tool. Depending on the
mousecolor I have to change the brushcolor to get a good contrast. Lets make
it easy with black and white. On the black parts of the image I want to draw
a white line and on the white parts of the image I want to draw a black
line. The thing is, that it must be a nonstop line, which changes
automatically it's color, depending on the background color of the image. So
no mousedowns or ups to pick a new mousecolor.

 

on mouseEnter

   choose brush tool

end mouseEnter

 

on mouseMove -- same with mouseStillDown

      if the mousecolor is "255,255,255" then

         set the brushcolor to black

      else

         set the brushcolor to white

      end if

end mouseMove

 

The problem is, that I get the mousecolor with the pointer tool (mouseUp and
mouseDown), but with the brush tool I get the mousecolor only while mouseUp.
So the color doesn't changes while drawing, only when I pick a new mouseup.

 

Has anybody experienced the same behavior and has found a workaround? Or any
idea what to try? Is it a bug, or am I missing something?

Thanks

Tiemo

 

 

 




More information about the use-livecode mailing list