Drawing a Graphice Segment

Mike Bonner bonnmike at gmail.com
Sat Jul 25 17:28:47 EDT 2015


Hey Terry, heres a working example of the method I mentioned if you'd like
to try it.  https://dl.dropboxusercontent.com/u/11957935/mouseover.livecode

On Sat, Jul 25, 2015 at 12:44 PM, J. Landman Gay <jacque at hyperactivesw.com>
wrote:

> On 7/25/2015 5:41 AM, Terence Heaford wrote:
>
>> I want to only receive a mouseEnter & mouseLeave when the mouse
>> leaves the coloured segment not the overall rect used in creating the
>> segment.
>>
>
> This happens automatically if the graphic is a filled, opaque polygon. It
> also works with an oval if the arcAngle is 360 (full circle) but fails if
> it's anything else. It's interesting to note that the mouseEnter and
> mouseLeave are sent correctly if you approach the pie slice from the curved
> edge of the virtual circle; it only fails if approaching from the "cut"
> edges.
>
> There are two ways to write most functions, and in the case of "within"
> the behavior is slightly different. If you use "is within" then the test is
> done against the entire rectangle of the control. If you use "within()" the
> test is done against only the filled portion. "Within()" fails in the same
> way as the mouse messages when applied to an arc. I'd say it's a bug.
>
> The color test should work if you don't use a gradient or other graphic
> effects, just a solid fill. Or you might be able to do something fancy by
> faking a pie slice using a freehand graphic with lots of points along the
> curved edge, but that's more math than I can do.
>
> --
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.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