| Reference | Downloads | Github

`visual.Circle()` and `Mouse.isPressedIn()` not working

Hi there,

I’ve been trying to use Mouse.isPressedIn(visual.Circle()) unsuccessfully. If I understand correctly, Circle should inherit contains from ShapeStim, but it doesn’t seem to function properly.

Has anyone else had this issue?

The only workaround I can think of is using ImageStim with a png of a circle instead, though not ideal because I normally would just update the color of the stim and that solution would require loading a new image.


Hi @alxndr.martin, would you expand on how the function is not working properly?

Attached is a version created using builder, where the circle is created using a polygon shapestim rather than a circle shape stim.pressedIn.psyexp (4.7 KB)

Cheers, though I don’t really know how to use the Builder interface.

I think the issue I am having is actually unrelated to Circle in the end. Basically Mouse is not registering as being contained in the Circle, but I was able to reproduce the error with other shapes, and am led to believe this is a retina issue (with pos that is displayed and pos that is actually counted aren’t quite the same) rather than an issue with the function.

Sorry for the bother!