Polygon's share of its rectangle inconsistent?

David Epstein dfepstein at comcast.net
Sun Jun 9 20:55:23 EDT 2013


Although within(<point>,<object>) returns a significant number of  
false positives when a polygon is tested, I find that it gives much  
better results when testing an image.  I imported a snapshot of my  
graphic, then ran my "coverage" function on the image rather than the  
graphic itself.  ("coverage" reports the number of pixels that are  
within the object divided by the number of pixels that are within the  
object's rectangle).  For the image, "coverage" remains quite close  
to constant when you resize the image, or when you resize the graphic  
and then import and test a new snapshot.

David Epstein




More information about the Use-livecode mailing list