esdalmaijer / PyGaze

an open-source, cross-platform toolbox for minimal-effort programming of eye tracking experiments
www.pygaze.org
GNU General Public License v3.0
670 stars 211 forks source link

draw_text parametrizable wrapWidth #151

Closed zouharvi closed 3 years ago

zouharvi commented 3 years ago

draw_text makes an implicit assumption, that the wrapWidth should be loaded from the defaults (500px). This can not be fixed with the current parameter list. This PR simply adds a wrapWidth parameter, which defaults to None. If that is the case, the whole display screen width is used (basically no wrap). If it is supplied, it is passed on to TextStim.

You may want to omit the defaulting to display width, which will make it default to 500px again. For our purposes, however, display width was the more sensible solution.