Ruby Dropshadow Tool

For general discussion related FlowStone
adamszabo
Posts: 667
Joined: Sun Jul 11, 2010 7:21 am

Re: Ruby Dropshadow Tool

Post by adamszabo »

Ah cool, the path gradient is also a clever solution!
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Ruby Dropshadow Tool

Post 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.
"There lies the dog buried" (German saying translated literally)
User avatar
HughBanton
Posts: 265
Joined: Sat Apr 12, 2008 3:10 pm
Location: Evesham, Worcestershire
Contact:

Re: Ruby Dropshadow Tool

Post 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 :oops: .

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
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Ruby Dropshadow Tool

Post 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 :oops: .

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 :lol: ), but hopefully helpful! See here: http://www.dsprobotics.com/support/viewtopic.php?f=2&t=75722
"There lies the dog buried" (German saying translated literally)
Post Reply