Drawing a Graphice Segment
bonnmike at gmail.com
Sat Jul 25 11:02:45 EDT 2015
Would something like this work? I set up a pixel sized graphic and have it
follow the mouseloc. Set the visible of it to false so you don't see a
little dot trailing after the mouse, then use intersect to check when the
pixel is over a non-transparent part of a graphic.
set the loc of grc 1 to the mouseloc -- follow the mouse around
Repeat with i = 2 to (the number of graphics in this stack) -- the dot
is the first grc
if intersect(grc 1,grc i,"pixels") then -- cycle through the graphics
and check for intersect
put the long id of grc i -- if there is one, put the id into the
put empty -- else empty the msg box
I don't recall who to give credit to for this method, but i've seen it in
the forums somewhere.
On Sat, Jul 25, 2015 at 7:05 AM, Terence Heaford <t.heaford at icloud.com>
> Thanks for the suggestion.
> I have tried it and sometimes it works but on other occasions not.
> When I display the mouseColor against the check colour sometimes they are
> I have assumed they are different because all the pixels in a given
> segment on the screen are not the same colour?
> The purpose for doing this is to try and identify the segment the mouse is
> over in a pie chart.
> > On 25 Jul 2015, at 12:37, dunbarx at aol.com wrote:
> > I remember suggesting using the mouseColor function with the mouseMove
> All the best
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode