Dear Psychtoolbox experts,
I'm trying to estimate the pixel size of 'x' by Screen('TextBounds').
Unfortunately, even though the aspect ratio of 'x' is roughly 1 on my computer screen,
the returned x-height is almost 2.5 times larger than the returned x-width.
For example, when I run the following code:
===
clear all; close all;
w=Screen('OpenWindow',0,[0 0 0]);
SCREEN(w, 'TextFont','Times Roman');
SCREEN(w,'TextSize',100);
Screen(w,'TextBounds','x')
Screen(w,'DrawText','x',500,500,[255 255 255]);
screen(w,'Flip');
pause;
Screen('CloseAll');
==
I get [0 0 53 133] as the bounding box of 'x'.
Am I making any mistakes here?
My environment is Mac OSX 10.4.11 + Matlab 7.4.0 (R2007a) + Psychtoolbox 3.0.8.
Thanks!
Tren
--
Tren Huang, Ph.D.
Research Associate
Vision Sciences Lab
Department of Psychology
Boston University
I'm trying to estimate the pixel size of 'x' by Screen('TextBounds').
Unfortunately, even though the aspect ratio of 'x' is roughly 1 on my computer screen,
the returned x-height is almost 2.5 times larger than the returned x-width.
For example, when I run the following code:
===
clear all; close all;
w=Screen('OpenWindow',0,[0 0 0]);
SCREEN(w, 'TextFont','Times Roman');
SCREEN(w,'TextSize',100);
Screen(w,'TextBounds','x')
Screen(w,'DrawText','x',500,500,[255 255 255]);
screen(w,'Flip');
pause;
Screen('CloseAll');
==
I get [0 0 53 133] as the bounding box of 'x'.
Am I making any mistakes here?
My environment is Mac OSX 10.4.11 + Matlab 7.4.0 (R2007a) + Psychtoolbox 3.0.8.
Thanks!
Tren
--
Tren Huang, Ph.D.
Research Associate
Vision Sciences Lab
Department of Psychology
Boston University