蒙版和透明度

发布于 2024-07-14 14:58:39 字数 364 浏览 5 评论 0原文

我对鞋子相当陌生,遇到了两个问题。

首先,我想使用部分透明的 png 设置遮罩,如下所示:

mask do
    image "images/stencilMask.png"
end

这是否可能以某种方式或只能使用矢量形状?

除此之外,当我尝试将透明颜色设置为任何类型的文本上的笔划时,我注意到一个小错误(?),如下所示:

title "Hello", :stroke => rgb(1.0, 0.0, 0.0, 0.5)

透明度根本没有应用。 我做错了什么吗,或者这实际上是一个错误?

干杯并感谢所有答案

I'm fairly new to Shoes and ran into two problems.

First I want to set a mask using a partially transparent png, like this:

mask do
    image "images/stencilMask.png"
end

Is this possible somehow or can only vector shapes be used?

Apart from that, I noticed a small bug(?) when trying to set a transparent color as a stroke on any kind of text, like this:

title "Hello", :stroke => rgb(1.0, 0.0, 0.0, 0.5)

The transparency simply isn't applied. Am I doing anything wrong, or is this actually a bug?

Cheers and thanks for all answers

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

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

发布评论

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

评论(1

心如狂蝶 2024-07-21 14:58:39

关于蒙版,在我的测试中,我发现它适用于 GIF,但不适用于 Windows 上的 PNG:

Shoes.app do
    banner "hello this is a very long string", :top => 200
    mask do
        image "test.gif", :top => 0
    end
end

我的 test.gif 是一个 480x320 的图像,中间有一个实心椭圆形。 图像的其余部分是透明的。 这使得文本出现在图像中实心椭圆形的位置。

关于笔划/透明度问题。 这是一个错误/缺失的功能。 请参阅此问题:在 Shoes.app 中使文本透明

Regarding masks, In my testing I've found it works with GIFs, but not PNGs on Windows:

Shoes.app do
    banner "hello this is a very long string", :top => 200
    mask do
        image "test.gif", :top => 0
    end
end

My test.gif was a 480x320 image with a solid oval in the middle. The rest of the image was transparent. This left the text appearing where the solid oval was in the image.

Regarding the stroke/transparency question. This is a bug/missing feature. See this question: Make text transparent in Shoes.app

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