フィルターのクリア

Why does DrawFormattedText 'clip' words when they are flipped to screen (in psychtoolbox)?

20 ビュー (過去 30 日間)
KJG
KJG 2019 年 3 月 5 日
回答済み: Grace Steward 2019 年 7 月 12 日
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!

回答 (1 件)

Grace Steward
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.

カテゴリ

Help Center および File ExchangeTiming and presenting 2D and 3D stimuli についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by