psychopy.org | Reference | Downloads | Github

Is it possible to draw a shape stimulus from the top left of it?

The parameter ‘pos’ in ShapeStim statement stands for the position of the center of the stimulus. Is it possible to set the positition of the stimulus by the top left of it instead of its center? In Pygame, for example, shapes can be draw from top left through statement"pygame.draw.rect(window, color, (topleft_X, topleft_Y, width, height))".

The choice of drawing origin is an arbitrary one (eg bottom left is as natural as anything else), so selecting another is left up to the user, by applying simple geometry.

In this case, just add half the width of the object to your preferred x component of the position, and subtract half its height from the y component.