> 22. feb. 2021 kl. 21:14 skrev Richard Gaskin via use-livecode
> <[email protected]>:
>
> jbv wrote:
>> I have a graphic made of a list of points. This graphic is opaque
>> and invisible, its filled property is set to true (according to
>> the doc).
>> In my card script I have something like :
>> on mousedown
>> put within(grc "mygraphic", the clickloc)
>> end mousedown
>> but it always returns false, even when I click
>> inside the clickable area of the graphic...
>> What am I missing ?
>
> IIRC invisible objects are removed from not only the rendering queue, but
> hit-testing as well.
>
Since the properties of the arc is available even if it is invisible, this will
work though:
on mouseDown
put isWithin("myGraphic",the clickLoc)
end mouseDown
function isWithin pGraphic pClickLoc
if pClickLoc is within the rect of grc pGraphic then
return true
else
return false
end if
end isWithin
Best regards
TORE NILSEN
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode