Question

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

Was it helpful?

Solution

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.

OTHER TIPS

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top