One or more rectangles or squares. Options for border and solid or transparent fill also allow rectangular frames. You can also fill the experiment window if you want to change background color for just part of a trial (see property size).
In the unusual case that you draw multiple rectangles in the same element and they overlap and have transparency, (properties color, borderColor below), you need to set backColor = <cds>"opaque"<cds> for accurate display.
If an element can end on its own, you don't need to set end conditions for it in property end (unless you want it to maybe end earlier).
No—runs until a condition you set in property end.
You can vary or allow the subject to adjust the following input properties of an object of this type in real time when it's running. If you need to make other properties adjustable, you can edit the element type code—see Element Type Programming Manual.
nn_eyes
rotation
colorMask
alpha
intensity
contrastMult
position
nn_eyes
rotation
colorMask
alpha
intensity
contrastMult
drawCodeVars
(None)
(None)
Default: a square with sides 5 deg
As a special case, you can set size = the number <cd>inf<cd> to fill the experiment window background with the rectangle. You can do this if you want to use it for background color for part of a trial (when the rectangle runs). Note in the common case that you want to set background color for a whole trial or the whole experiment, you can just use experiment object property backColor and/or trial object properties backColor and preTrialBackColor.
Default: white
A 1×3 RGB vector with numbers between 0–1 setting fill color. You can also use a 1×4 RGBA vector to give the fill transparency, and set A = 0 for no fill. Or an n×3/4 matrix for different colors/transparencies for different rectangles—see positions below.
Default: borderWidth = no border
Default: borderColor = white
borderColor is a 1×3 RGB vector with numbers between 0–1 setting border color. You can also use a 1×4 RGBA vector to give the border transparency. Or an n×3/4 matrix for different border colors/transparencies for different rectangles.
Default: show one rectangle centered at element position
If you show multiple rectangles then for each of the other properties above you can set one value for all of them, or you can set different values for different rectangles using a vector or matrix (see property).
<cd>[]<cd> = show one rectangle centered at element position.
PsychBench uses record properties to record information during experiments. You can't set record properties but you can see them in experiment results by listing them input property report.
PsychBench © 2017–2023 Giles Holland
Website © 2023 Giles Holland
End user license agreement