At 3:17 AM +1000 on 6/3/99, Dylan Just wrote:

>Will a click event on an unusually shaped object be generated for the
>rectangular bounding box of the shape or specifically within the bounds of
>the shape?
>
>I see the latter to be hard to implement.

Point-in-polygon testing is fairly easy. All you do is start with some
point known to be outside the polygon. Then draw a line from that ppoint to
the clicked point. Then count intersections. Odd # = inside; even # =
outside.

Reply via email to