Why does DrawFormattedText 'clip' words when they are flipped to screen (in psychtoolbox)?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
KJG
am 5 Mär. 2019
Kommentiert: Kourosh
am 2 Okt. 2024
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 Kommentare
Akzeptierte Antwort
Grace Steward
am 12 Jul. 2019
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.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Timing and presenting 2D and 3D stimuli finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!