Check whether a particular x,y coordinate falls within the circle
I found this:
To check whether a particular
x,y coordinate falls within the bounding rectangle of an element, you can use
my_mouse = Mouse(visible=True) my_canvas = Canvas() my_canvas['rect'] = Rect(-100, -100, 200, 200) my_canvas.show() button, (x, y), time = my_mouse.get_click() if (x, y) in my_canvas['rect']: print('Clicked in rectangle') else: print('Clicked outside of rectangle')
However, this does not work for circles, right?
Do I have to change something if i try this for circles? Is there a workaround apart from using rectangles?