gpt4 book ai didi

string - 如何在 Matlab 中为文本添加轮廓?

转载 作者:行者123 更新时间:2023-12-05 07:58:45 25 4
gpt4 key购买 nike

我添加了一个 textbox annotationimage , 但如果我不使用背景,很难阅读文本。如果我确实使用背景,我会模糊图像。我已经研究了一种可能的解决方案,它并不优雅:

  • 为注释背景添加透明度。这不是内置的,需要 kluge .

我想尝试的一种可能的替代方法是为文本添加大纲。有人知道怎么做吗?

编辑

我应该更具体地说明“为文本添加大纲”的意思。我指的是 Microsoft Word 对大纲的定义。

Image of a text outline.

最佳答案

根据您的编辑,您不只需要一个文本框。我不确定如何修复文本,但基于我的问题的答案 here ,可以设置框的透明度。

plot(sin(rand(10)))
a = annotation('textbox', [0.5 0.5 0.1 0.1], 'String', 'Some Random Text');
b = annotation('textbox', get(a,'Position'));
set(b, 'BackgroundColor', [0 0.5 0]);
set(b, 'FaceAlpha', 0.5);
uistack(a,'top')

这是一个例子:

enter image description here

关于string - 如何在 Matlab 中为文本添加轮廓?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23728431/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com