This is kleinerm's git repository for development of Psychtoolbox-3. Regular end users should stay away from it, unless instructed by him otherwise, and use the official Psychtoolbox-3 GitHub page or distribution system for production releases.
104
stars
304
forks
source link
DrawFormattedText(): Add 'left' keyword to 'sx' argument, to position… #255
DrawFormattexText(), by default, or when given numeric sx or sy position arguments, ignores an optionally provided 'winRect' target rectangle, always positioning relative to the top-left corner of the onscreen window.
Add a new 'left' keyword for the 'sx' parameter, to left-align with the left border of an optional 'winRect'.
Note that the behaviour of numeric values ignoring 'winRect' can be considered a bit of a bug, as 'winRect' is taken into account for text clipping, so it can cause unexpected behaviour. Unfortunately we can't fix this, as it would break backwards compatibility.
Also some minor optimizations, and some minor doc improvements.
… text aligned with left
winRect
bound (#818)DrawFormattexText(), by default, or when given numeric sx or sy position arguments, ignores an optionally provided 'winRect' target rectangle, always positioning relative to the top-left corner of the onscreen window.
Add a new 'left' keyword for the 'sx' parameter, to left-align with the left border of an optional 'winRect'.
Note that the behaviour of numeric values ignoring 'winRect' can be considered a bit of a bug, as 'winRect' is taken into account for text clipping, so it can cause unexpected behaviour. Unfortunately we can't fix this, as it would break backwards compatibility.
Also some minor optimizations, and some minor doc improvements.
Co-authored-by: kleinerm mario.kleiner.de@gmail.com
Closes #817