rectangle

 elements

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 need to set a background color for part of a trial (see property size).

For each trial you define in an experiment script, you can make one or more 

rectangle

 objects using 

rectangle

Object and input them to addTrial.

For each trial you define in an experiment script, you can make one or more 

rectangle

 objects using 

rectangle

Object and input them to addTrial.

Input properties

Adjustable properties

You can allow the subject to adjust the following input properties of an object of this type during the experiment using an adjuster element. If you need to make other properties adjustable, you can copy the element type using newPbType and edit it.

position
nn_eyes
rotation
opacity

(None)

(None)

size

Default: a square with sides 5 deg

A number that is side length for a square, or a vector [width height] for a rectangle (deg). Or you can use multiple rows (a column vector or matrix) for different sizes for multiple rectangles—see positions below.

As a special case, you can set size = the number <cd>inf<cd> to fill the experiment window with the rectangle. Typically do this if you want to use it as background color for part of the trial (when the rectangle runs). In this case you also need to set layer to a sufficiently high number to layer the rectangle behind all other elements running at the same time (or just set layer = <cd>inf<cd>). Note in the common case that you want to set background color for the whole trial or experiment, just use experiment object property backColor, and/or trial object properties backColor and preTrialBackColor instead.

showFill
color

Default: showFill = solid rectangle
Default: color = white

showFill is <cd>true<cd>/<cd>false<cd>. <cd>false<cd> = inside is transparent but you can still show a border for a rectangular frame effect (property showBorder below). Or a 1×n vector for different values for multiple rectangles—see positions below.

color is a 1×3 RGB vector with numbers between 0–1 setting fill color. Or an n×3 matrix for different colors for multiple rectangles—see positions below.

showBorder
borderWidth
borderColor

Default: showBorder = no border
Default: borderWidth = 0.1 deg
Default: borderColor = white

showBorder = <cd>true<cd>/<cd>false<cd>. If you show a border the dimensions set in size above are its outer dimensions. Or a 1×n vector for different values for multiple rectangles—see positions below.

borderWidth is a number (deg). Or a 1×n vector for different border widths for multiple rectangles—see positions below.

borderColor is a 1×3 RGB vector with numbers between 0–1. Or an n×3 matrix for different border colors for multiple rectangles—see positions below.

positions

Default: show one rectangle centered at element position

If you want to show multiple rectangles, you can set that here. This is more efficient than using separate rectangle elements with the same timing. positions is a 2-column matrix setting centers for the rectangles, with rows corresponding to rectangles and columns to [x y] coordinates (deg). Positions are relative to element position, which you can set in position (default screen center).

If you set multiple rectangles then for each of the other properties above, you can continue to specify one value for all of them. OR you can specify multiple values if you want different values for different rectangles. To specify multiple values, the property becomes a vector or matrix—see above.

<cd>[]<cd> = show one rectangle centered at element position.

Input properties all visual elements have

position

Input properties all adjuster elements have

adjust

Input properties all objects have

report
info

Record properties

PsychBench uses record properties to record information during experiments. You can't set record properties but you can see them in experiment results using input property report.