[solved] two images by canvas function
Hi,
I'm now moving to inline scripting for making program. I have a simple question: how can I show two images simultaneously on screen by canvas.image function? I simply wrote:
(in preparation tab)
from openexp.canvas import canvas
my_canvas = canvas(exp)
path = exp.get_file('Stim.png')
my_canvas.image(path,-400,0)
my_canvas.image(path,400,0)
my_canvas.prepare
(in run tab)
my_canvas.show()
-
This showed only one image, but not two images. Please advice me if I mistake scripting!
Hiro
Comments
Hi Hiro,
You're running into a weird property of OpenSesame: In Python code,
0, 0is the top-left of the display, and not the center. So you're showing the first image outside the display boundaries.So you'll want to do something like (note also the parameters to
canvas.image):By the way, this annoyingly inconsistent behavior will be improved in OpenSesame 3.0.0!
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thanks! I can solve it.