Skip to content
Snippets Groups Projects
Commit 6ba726e0 authored by Rene Brun's avatar Rene Brun
Browse files

Fix suggested by Brett Wiren:

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.


git-svn-id: http://root.cern.ch/svn/root/trunk@4306 27541ba8-7e3a-0410-8455-c3a389f83636
parent 6e6e608b
No related branches found
No related tags found
No related merge requests found
// @(#)root/graf:$Name: $:$Id: TBox.cxx,v 1.9 2002/01/23 17:52:48 rdm Exp $
// @(#)root/graf:$Name: $:$Id: TBox.cxx,v 1.10 2002/01/24 11:39:28 rdm Exp $
// Author: Rene Brun 12/12/94
/*************************************************************************
......@@ -116,7 +116,7 @@ Int_t TBox::DistancetoPrimitive(Int_t px, Int_t py)
//*-*- Are we inside the box?
//*-* ======================
if (GetFillStyle()) {
if ( (px > pxl && px < pxt) && (py > pyl && py < pyt) ) return 0;
if ( (px >= pxl && px <= pxt) && (py >= pyl && py <= pyt) ) return 0;
else return 9999;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment