Constructor
new TextStim(options)
- Source:
- Mixes In:
- ColorMixin
- To Do:
-
- vertical alignment, and orientation are currently NOT implemented
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
Extends
- VisualStim
Members
(protected, static, readonly) _defaultLetterHeightMap
- Source:
This map associates units to default letter height.
(protected, static, readonly) _defaultWrapWidthMap
- Source:
This map associates units to default wrap width.
Methods
(protected) _estimateBoundingBox()
- Source:
Estimate the bounding box.
(protected) _getAnchor() → {Array.<number>}
- Source:
Convert the alignment attributes into an anchor.
Returns:
- the anchor
- Type
- Array.<number>
(protected) _getDefaultLetterHeight()
- Source:
Get the default letter height given the stimulus' units.
(protected) _getDefaultWrapWidth()
- Source:
Get the default wrap width given the stimulus' units.
(protected) _getTextStyle()
- Source:
Get the PIXI Text Style applied to the PIXI.Text
(protected) _updateIfNeeded()
- Source:
Update the stimulus, if necessary.
(protected) getBoundingBox(tightopt) → {Array.<number>}
- Source:
Get the bounding gox.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
tight |
boolean |
<optional> |
false
|
whether or not to fit as closely as possible to the text |
Returns:
- the bounding box, in the units of this TextStim
- Type
- Array.<number>
getTextMetrics()
- Source:
Get the metrics estimated for the text and style.
Note: getTextMetrics does not require the PIXI representation of the stimulus to be instantiated, unlike getSize().
setColor(color, logopt)
- Source:
Setter for the color attribute.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
color |
undefined | null | number | the color |
||
log |
boolean |
<optional> |
false
|
whether of not to log |