Page 2 of 2
Re: Ruby Dropshadow Tool
Posted: Thu Mar 11, 2021 11:04 am
by adamszabo
Ah cool, the path gradient is also a clever solution!
Re: Ruby Dropshadow Tool
Posted: Thu Mar 11, 2021 11:56 am
by tulamide
adamszabo wrote:Ah cool, the path gradient is also a clever solution!
Yes, because (besides being faster and using less CPU) you can give the shadow any shape you like. I was just adding a rectangle, but it can take any complex shape you can imagine. That's what I wanted to show at first, but then it already took hours to set this schematic up and I didn't want to spend too much time on it.
Re: Ruby Dropshadow Tool
Posted: Tue Mar 16, 2021 5:37 pm
by HughBanton
Aha, I see you've used 'top:' and ':top', 'focus:' and ':focus' etc., which after googling I gather are Symbols. Your code here looks immensely elegant but atm I'm afraid I wouldn't have much idea how to use them elsewhere

.
Even my second-hand 600-page Ruby book (which no, I haven't read, but I do consult from time to time ..) only devotes three pages to Symbols, and begins the section by saying they tend to confuse most new users! Which doesn't exactly inspire ...
Any chance of a quick Symbolic descriptive tour?
H
Re: Ruby Dropshadow Tool
Posted: Thu Mar 18, 2021 7:14 am
by tulamide
HughBanton wrote:Aha, I see you've used 'top:' and ':top', 'focus:' and ':focus' etc., which after googling I gather are Symbols. Your code here looks immensely elegant but atm I'm afraid I wouldn't have much idea how to use them elsewhere

.
Even my second-hand 600-page Ruby book (which no, I haven't read, but I do consult from time to time ..) only devotes three pages to Symbols, and begins the section by saying they tend to confuse most new users! Which doesn't exactly inspire ...
Any chance of a quick Symbolic descriptive tour?
H
Well, quick not so much (if I start once, I always find more to explain

), but hopefully helpful! See here:
http://www.dsprobotics.com/support/viewtopic.php?f=2&t=75722