A modest proposal for a new property
mark at livecode.com
Wed Sep 27 12:33:02 EDT 2017
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
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
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.
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
More information about the Use-livecode