Implement stingy selection mode for tuning patterns.

This commit is contained in:
Jeff Young 2024-01-16 23:43:11 +00:00
parent 121271bd0a
commit be6a2d018d
1 changed files with 9 additions and 1 deletions

View File

@ -337,7 +337,15 @@ public:
bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy ) const override
{
return GetBoundingBox().Intersects( aRect );
BOX2I sel = aRect;
if ( aAccuracy )
sel.Inflate( aAccuracy );
if( aContained )
return sel.Contains( GetBoundingBox() );
return sel.Intersects( GetBoundingBox() );
}
const BOX2I ViewBBox() const override { return GetBoundingBox(); }