From 23b1569d8ba13f05c4f236ee010e61a72ee790e0 Mon Sep 17 00:00:00 2001 From: NichtJens Date: Mon, 5 Nov 2018 17:09:24 +0100 Subject: [PATCH] added missing other. for Point case in Shape.contains() --- pantograph/shapes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pantograph/shapes.py b/pantograph/shapes.py index 550eb0d..f220aa5 100644 --- a/pantograph/shapes.py +++ b/pantograph/shapes.py @@ -60,8 +60,8 @@ def intersects(self, other): def contains(self, other): if isinstance(other, Point): rect = self.get_bounding_rect() - return rect.left < x and rect.right > x and \ - rect.top < y and rect.bottom > y + return rect.left < other.x and rect.right > other.x and \ + rect.top < other.y and rect.bottom > other.y recta = self.get_bounding_rect()