Anchor for polygon not working on-line

OS (e.g. Win10): OSX 13.2
PsychoPy version (e.g. 1.84.x): v2022.2.5
Standard Standalone? (y/n) If not then what?: y

Hi Folks.

I need to draw polygons. LOTS of polygons. To use as invisible ‘hit areas’ on an image to participants can click on an image (and actually hit the invisible ploygon) and then… things happen.

Now this is going to be kind of intense coz I need to define different hit area positions and shapes for each different image - so will be specifying the location and shape of each polygon programatically from a conditions file - each set of ‘hit area’ polygons associated with a specific image.

And… I’ve encountered a snag.

I am desperately hoping to be able to define my polygons position (and shape) from the top left corner. Otherwise, if I have to use the centre there will just be a tonne of fiddly maths.

And I am realising the setting the ‘top left’ anchor parameter on each polygon appears to be ignored when I put the experiment online.


Any work arounds or words of wisdom here?

Pictured are the temporarily visibile ‘hit areas’ superimposed on the underlying image. They align with the image features perfectly when run locally, but… not on Pav.

Thanks folks.

Can you add code to subtract half the width and add half the height to the coordinate?

I haven’t tried anchor online for polygons but I’m not surprised that it doesn’t work online.

Hi @wakecarter.

Thanks for your response! :slight_smile: Ok. Yeah - I’ll do a little transformation for each screen location.


I’ve come across these kinds of screen location issues a few times before in various different components - and specifically when moving experiments on-line. Things not aligning properly, or tags/attributes being ignored etc… Are these issues something that will eventually be fixed?