Class: TextStim

visual.TextStim(options, alignHorizopt, alignVertopt, wrapWidth, flipHorizopt, flipVertopt)

new TextStim(options, alignHorizopt, alignVertopt, wrapWidth, flipHorizopt, flipVertopt)

Parameters:
Name Type Attributes Default Description
options Object
Properties
Name Type Attributes Default Description
name String the name used when logging messages from this stimulus
text string <optional>
"Hello World" the text to be rendered
font string <optional>
"Arial" the text font
pos Array.<number> <optional>
[0, 0] the position of the center of the text
color Color <optional>
Color('white') the background color
opacity number <optional>
1.0 the opacity
contrast number <optional>
1.0 the contrast
units string <optional>
"norm" the units of the text size and position
ori number the orientation (in degrees)
height number <optional>
the height of the text
bold boolean <optional>
false whether or not the text is bold
italic boolean <optional>
false whether or not the text is italic
alignHoriz string <optional>
'center' horizontal alignment
alignVert string <optional>
'center' vertical alignment
wrapWidth boolean whether or not to wrapthe text horizontally
flipHoriz boolean <optional>
false whether or not to flip the text horizontally
flipVert boolean <optional>
false whether or not to flip the text vertically
options.autoDraw boolean <optional>
false whether or not the stimulus should be automatically drawn on every frame flip
options.autoLog boolean <optional>
false whether or not to log
Mixes In:
  • ColorMixin
Source:
To Do:
  • vertical alignment, and orientation are currently NOT implemented

Extends

  • BaseVisualStim

Members

(private) _updateIfNeeded

Update the stimulus, if necessary.
Source:
To Do:
  • take size into account

contains

Determine whether an object is inside the bounding box of the text.
Source:
To Do:
  • this is currently NOT implemented

setAlignHoriz

Setter for the alignHoriz attribute.
Source:

setBold

Setter for the bold attribute.
Source:

setFlipHoriz

Setter for the flipHoriz attribute.
Source:

setFlipVert

Setter for the flipVert attribute.
Source:

setHeight

Setter for the height attribute.
Source:

setItalic

Setter for the italic attribute.
Source:

setText

Setter for the text attribute.
Source:

setWrapWidth

Setter for the wrapWidth attribute.
Source: