mouse within oval filled area

John Dixon dixonja at hotmail.co.uk
Sat Nov 12 15:38:46 EST 2011


Yes, it would... but a gradient wasn't mentioned... we could throw spanners into the works all night!

> From: gbojsza at gmail.com
> Date: Sat, 12 Nov 2011 13:34:32 -0700
> Subject: Re: mouse within oval filled area
> To: use-livecode at lists.runrev.com
> 
> This would be very difficult to implement if the graphic had a gradient.
> 
> 
> 
> On Sat, Nov 12, 2011 at 1:09 PM, John Dixon <dixonja at hotmail.co.uk> wrote:
> 
> >
> > OK then...
> >
> > on mouseWithin
> >   put the backgroundcolor of me into colorCheck
> >   if the mouseColor = colorCheck then
> >      put  "I am inside the coloured bit of control ID no" && the short id
> > of me
> >   end if
> > end mouseWithin
> >
> >
> >
> > > From: admin at FlexibleLearning.com
> > > To: use-livecode at lists.runrev.com
> > > Subject: RE: mouse within oval filled area
> > > Date: Sat, 12 Nov 2011 19:25:16 +0000
> > >
> > > Indeed, John, but not a unique object identifier if more than one grc
> > uses
> > > the same color. I think I am back to polar coordinates (unfortunately).
> > >
> > > The current engine behaviour is painfully inconsistent with other
> > controls
> > > whose transparency is immune from mouse events.
> > >
> > > Hugh Senior
> > > FLCo
> > >
> > >
> > > John Dixon wrote:
> > >
> > > > Use the mouseColor ?
> > >
> > >
> > > Original message:
> > >
> > > > Has anyone worked out how to test if the mouseLoc is within the filled
> > > area
> > > > of an oval graphic (defined by startAngle and arcAngle)? I was thinking
> > > > polar coordinates, but this assumes a circle and a fixed radius which
> > is
> > > not
> > > > necessarily the case. A btter math brain than mine is needed!
> > > >
> > > > Hugh Senior
> > > > FLCo
> > >
> > >
> > > _______________________________________________
> > > 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
> >
> > _______________________________________________
> > 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
> >
> _______________________________________________
> 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