微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

函数 TextBounds Matlab 中的 DrawformattedText 错误

如何解决函数 TextBounds Matlab 中的 DrawformattedText 错误

我的计算机上有一个解决的问题,我的代码在其他问题上可以正常工作。运行没有 DrawFormattedText代码是可以的(我在代码的其他部分显示了一些图片)。

这是显示文本的代码

Screen('Preference','SkipSyncTests',0);   %I tryed this part with 0 or 1 but none of them work.
ScreenNumber=max(Screen('Screens'));
[w,wrect] = Screen('OpenWindow',ScreenNumber(end),[0 0 0]);%2400 x 1040
cycleRefresh=Screen('GetFlipInterval',w);
vbl=Screen(w,'Flip');
[width,height]=Screen('WindowSize',w);
Screen('TextSize',w,25); % SET TEXT SIZE HERE
Screen('TextFont','Times');
Screen('TextStyle',1);
Textcolor=[255 255 255];
DrawFormattedText(w,'Start experiment','center',Textcolor);

这里是消息错误

赢 = 10

函数 TextBounds 中的错误:使用错误

外部文本渲染器插件无法渲染文本字符串 某些原因! % 很有帮助^^

使用屏幕使用时出错:

[normBoundsRect,offsetBoundsRect,textHeight,xAdvance] = Screen('TextBounds',windowPtr,text [,x] [,y][,yPositionIsBaseline] [,swapTextDirection]);

DrawFormattedText 中的错误(第 295 行) theight = RectHeight(Screen('TextBounds',win,tstring));

SCRIPT_PROSOC_CommentSerialObj 中的错误(第 102 行) DrawFormattedText(w,'开始实验',Textcolor);

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。