I wanna highlight the border of rectangle with dashed line

hi everyone,
Does the current version of psychopy consist of the function that visual.Rect(…) can picture the dashed line border or dotted line border of rectangle? I only find the solid one. I really needs the function to highlight the special choice( and to distinct the solid one). thanks very much!

Not that I know of. You could either use an array of dash polygon objects or an image of the dashed rectangle behind the stimulus.

hi wakecarter,
Thanks for your reply! Do you mean create an array of four dashed lines? Or any other solutions?
Because I want to achieve the aim that if participant press the ‘left’ key, and then the border of left components appears to be solid dark.
In contrast, the right part appears to dashed grey to indicate the counterfactual outcome.
I have 4 rectangles and two other highlights rectangles. That means I need to calculate (4+2)*4 positions in order to create the dashed border. That’s truly a disaster:(
Looking forward to your reply, thanks a lot!

Kate

I think easiest would be generating at least the dashed outline offline in another program (Inkscape?) and showing that as an image.

At one point I thought about trying to add line stippling to PsychoPy (see this branch), but I don’t know if it’s a good long-term solution, given it uses a legacy OpenGL API…

Hi, AFORREN
Thanks for your reply! Maybe I could only picture it behind the stimulus >_<. Hope you have a nice day!