Docs @ Psychtoolbox Wiki : TextBounds

Search PTB Function help:
homepsychtoolbox.orgpage updateslogin

Screen('TextBounds')

PsychtoolboxScreen.{mex*,dll} subfunction

Usage
[normBoundsRect, offsetBoundsRect]= Screen('TextBounds', windowPtr, text [,x] [,y] [,yPositionIsBaseline] [,swapTextDirection]);

Accepts a window pointer and a 'text' string. Return in 'normBoundsRect' a rect
defining the size of the text in units of pixels. Returns in 'offsetBoundsRect'
offsets of the text bounds from the origin, assuming that the text will be drawn
at the current position of the text drawing cursor. Only the default high
quality text renderers returns a perfect bounding box. The optionally selectable
low-quality, fast renderers on Windows and Linux return a bounding box which
doesn't take letters with descenders into account - Descenders are outside the
returned box.
See help for Screen('DrawText') for info about accepted text string formats and
all additional parameters...


Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.1201 seconds