On 2017-09-27 03:20, Mark Wieder via use-livecode wrote:
Been there.
When they're stacked on top of each other the transparent part of the
rect is still the object under the cursor, and so obscures what's
underneath.
Methinks that could be considered a bug :)
The graphic object does do hit-testing based on the content of the
graphic - but it is not complete/100% accurate for all graphic types.
For opaque rectangles: correct - it checks the point is within the rect.
For non-opaque rectangles: correct - it checks the point is within the
outline.
For rounded rectangles: incorrect - it uses the same code as rectangle
(so roundness of corners is not taken into account).
For regular polygons, polygons and curves: correct - it checks if the
point is within the outline and (if opaque) it checks the point is
within the polygon.
For lines: correct - it checks whether the point is on the line.
For ovals: incorrect! It checks the point is within the oval defined by
the rect *but* it does not take into account startangle or angle.
As a pie chart would be a stacked collection of oval graphics with
different angles/startangles - this is why it doesn't work.
Warmest Regards,
Mark.
--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode