I've updated the BBox code to include a PointInside() method, so this:
if xy[0] > bb[0,0] and xy[0] < bb[1,0] and xy[1] < bb[1,1] and xy[1] > bb[0,1]:
can now be:
if bb.PointInside(xy):
It's in SVN, and enclosed.
By the way, if you can take a few minutes to refactor the FloatCanvas
code that it can optionally use the color-checking or bounding-box only
code, perhaps with a flag: FloatCanvas.UseOnlyBoundingBoxHitTest or
something, I'll try to include the patch if you provide it.
maybe a HitTestType flag would be better -- then we can add a third option some day....
-Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected]
BBox.py
Description: application/python
_______________________________________________ FloatCanvas mailing list [email protected] http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
