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

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Apr 04 2002 - 09:13:01 MEST


Hi Brett,

I implemented your first suggestion. Your second suggestion equivalent
to ignore the case of filled boxes cannot be implemented.

Rene Brun

Brett Viren wrote:
> 
> 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