Why does DrawFormattedText 'clip' words when they are flipped to screen (in psychtoolbox)?
20 ビュー (過去 30 日間)
古いコメントを表示
Hi there,
I've written a piece of code using psychtoolbox that appears to 'clip' only the top half of the instructions when they are flipped to screen. Below is an example of the code:
%load basic parameters for psychotoolbox
PsychDefaultSetup(2);
Screen('Preference', 'SkipSyncTests', 1);
screens = Screen('Screens');
screenNumber = max(screens)
white = WhiteIndex(screenNumber); black = BlackIndex(screenNumber);
[window, windowRect] = PsychImaging('OpenWindow', screenNumber, black);
[screenXpixels, screenYpixels] = Screen('WindowSize', window);
[xCenter, yCenter] = RectCenter(windowRect);
Screen('BlendFunction', window, 'GL_SRC_ALPHA', 'GL_ONE_MINUS_SRC_ALPHA');
%Flip text to screen
[nx, ny, textbounds, wordbounds] = DrawFormattedText(window, 'Hello genius!', 'center', 'center', white);
Screen('Flip', window);
KbStrokeWait; sca;
I've included the global function for disabling the clipping but this doesn't seem to work (ptb_drawformattedtext_disableClipping = 1; ). Clipping appears for every row of my instructions flipped to screen. Does anyone know what is going on?
I'm using matlab 9.4.0.813654 (R2018a), psychtoolbox 3.0.15.
Many thanks!
0 件のコメント
回答 (1 件)
Grace Steward
2019 年 7 月 12 日
Hello,
I had a similar problem, and it turns out that PsychToolbox doesn't handle display scaling well at all. So you might be getting clipping due to your display screen being scaled to something above 100%. You can change that in your display settings panel.
Hope that helps.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!