Millisecond Forums

White Rectangle on Black Background

https://forums.millisecond.com/Topic22394.aspx

By Rmoody - 9/3/2017

My dot probe task is currently set up to show a black fixation cross on the center of the screen, followed by a pair of images, and then a black text probe, all on a white background. I would like to change this to have the stimuli displayed on a white background but I do not want the entire screen to be white. Rather, I would like the background to have a black border surrounding a white rectangle  (50%, 80%) in the center of the screen (50%, 50%). Is there an easy way to configure the background to have a shape in the center of it? 




By Dave - 9/4/2017

Rmoody - Sunday, September 3, 2017
My dot probe task is currently set up to show a black fixation cross on the center of the screen, followed by a pair of images, and then a black text probe, all on a white background. I would like to change this to have the stimuli displayed on a white background but I do not want the entire screen to be white. Rather, I would like the background to have a black border surrounding a white rectangle  (50%, 80%) in the center of the screen (50%, 50%). Is there an easy way to configure the background to have a shape in the center of it? 





Set the /screencolor to black. Then define a white rectangular <shape> in the desired dimensions with /erase set to false, and either display that shape via the <trial>s' /stimulustimes (or -frames) or the <block>s' /bgstim. Putting it in the trials along with the other stimuli, should be the more robust option. I.e.

<defaults>
/ screencolor = black
...
</defaults>

<shape whitebg>
/ shape = rectangle
/ color = white
/ size = (95%, 90%)
/ position = (50%, 50%)
/ erase = false
</shape>

<trial exampletrial>
/ stimulustimes = [0=whitebg, fixation; 500=...]
...
</trial>

Hope this helps.