A modest proposal for a new property

Richard Gaskin ambassador at fourthworld.com
Tue Sep 26 12:58:55 EDT 2017


Certainly doable in a script, but consider the simplicity of this with a 
polygon as complex and even self-intersecting as you'd like:

on mouseMove
    put within(grc 1, the mouseLoc )
end mouseMove

--
  Richard Gaskin
  Fourth World Systems


hh wrote:
> I asked because I thought QL's proposal might be based on a new algorithm?
> 
> There are already (partial) solutions to that:
> 
> In LCS getting "transparency" clicks of cross-layered objects is hard but
> possible for a big class of regions (see stack #47 = "pointInShape" of
> the Raspi stacks collection, July 2015).
> 
> For LCB I already implemented "transparency clicks" for rotated rectangular
> shapes in my last two (already shared) widgets. Just now also for a bit more
> complicated shapes (-> LC Global, Nov).
> 
> Both methods are based on the subdivison algorithm by MShimrat (Aug 1962).
> This algorithm is in LCB/LC 9.0.0-dp9 *very* fast, by the way, usable in a
> mouseDown handler for checking regions defined by several hundred points.
> 
> For more general regions (closed polygons), as Quentin L. suggests, this
> algorithm is also applicable, *without change* as long as the region-polygons
> are not self-intersecting.




More information about the use-livecode mailing list