在 Shoes.app 中使文本透明

发布于 2024-07-29 13:24:42 字数 259 浏览 4 评论 0原文

Shoes 有没有办法让文字显示透明? 我有:

Shoes.app{
  para "Text", :stroke => rgb(1.0,0.0,0.0,0.5), :size => 100
}

但它只是显示 100% 红色。 我知道不透明度适用于填充,它也适用于描边吗? (我正在 Mac OS X 10.4.11 上使用 Shoes Raisins Revision 1134 进行开发) 提前致谢

Is there a way in Shoes to have text show up transparent?
I have:

Shoes.app{
  para "Text", :stroke => rgb(1.0,0.0,0.0,0.5), :size => 100
}

But it's just showing up 100% red. I know opacity works for fill, does it also work for stroke?
(I am developing with Shoes Raisins Revision 1134 on Mac OS X 10.4.11)
Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

最佳男配角 2024-08-05 13:24:42

Alpha 适用于描边和填充,但不适用于文本。 例如,此代码将在文本上绘制一个 50% 透明的蓝色圆圈:

Shoes.app do
  para "Text", :stroke => rgb(1.0,0.0,0.0,0.5), :fill => rgb(0, 1.0, 0, 0.5), :size => 100
  stroke rgb(0,0,1.0,0.5)
  strokewidth 4
  nofill
  oval 10, 10, 50
end

请注意,不仅 para 的描边不透明,而且填充也不透明。 据我所知,没有办法从 Shoes 中获取透明文本,尽管我想如果您事先将文本制作成透明图像并加载它,它可能是透明的。 不过,我还没有尝试过,即使它有效,它的用处也可能有限。

Alpha works on both stroke and fill, but not for text. For example, this code will draw a 50% transparent blue circle over the text:

Shoes.app do
  para "Text", :stroke => rgb(1.0,0.0,0.0,0.5), :fill => rgb(0, 1.0, 0, 0.5), :size => 100
  stroke rgb(0,0,1.0,0.5)
  strokewidth 4
  nofill
  oval 10, 10, 50
end

Note that not only is the para's stroke not transparent, but neither is the fill. To my knowledge there is no way to get transparent text out of Shoes, although I suppose if you made the text into a transparent image beforehand and loaded it, it might be transparent. I haven't tried that, though, and even if it works, it's probably of limited usefulness.

一念一轮回 2024-08-05 13:24:42

以下是 _why 存档。 您可以使用遮罩层上的文本和透明填充块来获取实际的透明文本。

Shoes.app do
  20.times do |i|
    strokewidth 4
    stroke rgb((0.0..0.5).rand, (0.0..1.0).rand, (0.0..0.3).rand)
    line 0, i * 4, 400, i * 4
  end

  mask do
    title "Shoes"
  end
end

Here is a workaround from the _why archive. You can use text on a mask layer and a transparent fill block to get actual transparent text.

Shoes.app do
  20.times do |i|
    strokewidth 4
    stroke rgb((0.0..0.5).rand, (0.0..1.0).rand, (0.0..0.3).rand)
    line 0, i * 4, 400, i * 4
  end

  mask do
    title "Shoes"
  end
end
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文