psychopy/psychopy — pull request #441 by isolver (2013-11-20 12:48:44+00:00)
Title: ENH: TextBox stim

* Added 2 methods to TextBox class:
+ getTextGridCellPlacement(): return a numpy array giving the pos, width,
and height of each textgrid cell inthe Textbox.
+ getGlyphPositionForTextIndex(i): return the bounding box for the text
character at index i within the text displayed. This is != to the
textgrid cell the char is in, instead is the bounding box of the draw
glyph itself.

* Changed examples:

- simple_textbox: straight forward TextBox use, showing 2 different uses
of common params.
- textbox_glypth_placement: displays the mouse cursor with the current
mouse x,y window position (in monitor units), useful for checking the
accuracy of the information returned by getGlyphPositionForTextIndex()
- textstim_vs_textbox.py: test different timing conditions for the
TextBox and TextStim, allowing a user to check what performance (and
differences) to expect with the two text stim types with a string of a
specified length.