Implement stingy selection mode for tuning patterns.

This commit is contained in:
Jeff Young
2024-01-17 00:34:22 +00:00
parent 121271bd0a
commit be6a2d018d
+9 -1
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(); }