[ROOT] TBox::DistancetoPrimitive missing small, filled TBoxes

From: Brett Viren (bv@bnl.gov)
Date: Wed Apr 03 2002 - 21:38:56 MEST


Hi,

The test for "insideness" in TBox::DistancetoPrimitive in the case of
a filled TBox misses the TBox's very edge.  This causes 1 pixel
wide/tall TBoxes to be invisible to pointer interactions.

Changing:

      if ( (px > pxl && px < pxt) && (py > pyl && py < pyt) ) return 0;
to:
      if ( (px >= pxl && px <= pxt) && (py >= pyl && py <= pyt) ) return 0;

fixes this.


Also, (and I know I originally complained against this feature), can
we have filled TBoxes return the actual distance instead of just the
values 0 or 9999 so that fgMaxPickDistance can do its magic?

Thanks,
-Brett.



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:48 MET