l = 10;
t = 10;
r = 40;
b = 40;
for k = 1:30
DrawFormattedText(win, 'XX', 'center', 'center', tColor, [], [], [], 1.6, [], [l t r b]);
Screen('FillOval', win, 255, CenterRect([0 0 10 10], [l t r b]));
l = l + k;
t = t + k;
r = r + k;
b = b + k;
end
Instead of the expected outcome of XX and dots diagonally down the screen, the XX ends after five iterations. The ovals continue as expected.
This either a bug in the way DrawFormattedText handles a winRect argument or in my understanding of the limitations of DrawFormattedText.
Screen('DrawText'... does work as expected but I am going to have to figure out how to center arbitrary text within the [l t r b] rectangle.
Advice would be welcome.