
Please note that changing colorSpace does not change stimulus If None the default colorSpace for the stimulus is The name of the color space currently being usedįor strings and hex values this is not needed. (this will change to return in stimulus units) property color ¶Īlternative way of setting foreColor. NOTE: currently always returns the size in pixels Width of the margins, which might differ from the width of the text This differs from width in that the width represents the

(read only) attribute representing the bounding box of the text Make the text bold (True, False) (better to use a bold font name). Want to avoid swamping the log file with messages that aren’t likely to updating its position every frame) and you Whether every change in this stimulus should be auto logged. autoDraw ¶ĭetermines whether the stimulus should be automatically drawn The vertical alignment (‘top’, ‘bottom’ or ‘center’) of the boxĪllow antialiasing the text (True or False). The horizontal alignment (‘left’, ‘right’ or ‘center’) anchorVert ¶ See also anchorX to set alignment of the box itself relative to pos alignVert ¶ĭeprecated in PsychoPy 3.3. Use alignText and anchorHorizĪligns the text content within the bounding box (‘left’, ‘right’ or _borderPix from pos, size, ori,ĭeprecated in PsychoPy 3.3. Only used with pygame text - pyglet handles all from the draw() _updateVertices ( ) ¶ The user shouldn’t need this method since it gets calledĬhooses between using and not using shaders each call. Set the text to be rendered using the current font _updateList ( ) ¶ Use setAttribute() and val2array() instead. _set ( attrib, val, op = '', log = None ) ¶ _setCurrent() method which handles the switch. Requires self.rgb, lorSpace and ntrast _getPolyAsRendered ( ) ¶ĭEPRECATED. _calcSizeRendered ( ) ¶īy _updateVertices() and verticesPix _getDesiredRGB ( rgb, colorSpace, contrast ) ¶Ĭonvert color to RGB while adding contrast. This functionality is now handledīy _updateVertices() and verticesPix. Legacy property for setting the foreground color of a stimulus in RGB, instead use obj._foreColor.rgb TypeĭEPRECATED in 1.80.00. Such as Farsi or Urdu, that use Arabic-style alphabets. Linked form that depends on neighbouring characters, rather than

Will _reshape_ Arabic characters so they appear in the cursive, 'Arabic' applies the bidirectional algorithm but additionally.By applying the bidirectional algorithm, itĪllows mixing portions of left-to-right content (such as numbers 'RTL' will correctly display text in right-to-left languages.'LTR' is the default, for typical left-to-right, Latin-style.The following attribute can only be set at initialization (seeįurther down for a list of attributes which can be changed afterĪpply settings to correctly display content from some languages In general, other attributes which merely affect the presentation of ( myTextStim.text = myTextStim.text) when you’ve changed the You can make the draw() quick by calling re-setting the text draw() slower because that sets the text again. In general, it’s the attributes that affect the shapes of the letters: it takes longer to change some attributes. Performance OBS: in general, TextStim is slower than many other TextStim ( win, text = 'Hello World', font = '', pos = 0.0, 0.0, depth = 0, rgb = None, color = 1.0, 1.0, 1.0, colorSpace = 'rgb', opacity = 1.0, contrast = 1.0, units = '', ori = 0.0, height = None, antialias = True, bold = False, italic = False, alignHoriz = None, alignVert = None, alignText = 'center', anchorHoriz = 'center', anchorVert = 'center', fontFiles = (), wrapWidth = None, flipHoriz = False, flipVert = False, languageStyle = 'LTR', name = None, autoLog = None, autoDraw = False ) ¶Ĭlass of text stimuli to be displayed in a
