Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Update 3.3.10: Canvas and mouse coordinates not aligned

edited September 2021 in OpenSesame

'Hi,It seems that in the new update, canvas coordinates and mouse coordinates are not aligned in the PsychoPy backend. Here's a little code snippet to draw a circle around your mouse when you click:

my_mouse = mouse(timeout=20000)
my_mouse.show_cursor(show=True)#draw central fix dot
my_canvas = Canvas()
my_canvas.fixdot()
my_canvas.show()# draw circle at mouse position
button, (x,y), timestamp = my_mouse.get_click()
my_canvas.circle(x, y, 20)
my_canvas.show()
clock.sleep(2000)

It seems the origin (0,0) is shifted to the top corner when using PsychoPy, but everything's fine with other backends.'



Comments

Sign In or Register to comment.