If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Ruby Dropshadow Tool
14 posts
• Page 1 of 2 • 1, 2
Ruby Dropshadow Tool
Here is a tool for creating dropshadows for your shapes, instead of using photoshop. You can dynamically change it any way you like. I used it in my projects, I thought I'd share it with you all. Feel free to improve it
- Attachments
-
- adam_ruby_dropshadow_tool_306.fsm
- (17.79 KiB) Downloaded 854 times
- adamszabo
- Posts: 657
- Joined: Sun Jul 11, 2010 7:21 am
Re: Ruby Dropshadow Tool
Very impressive Adam!
Thank you for sharing!
Thank you for sharing!
-
Spogg - Posts: 3324
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Ruby Dropshadow Tool
Nice !
Thank you for sharing Adam
Thank you for sharing Adam
- RJHollins
- Posts: 1568
- Joined: Thu Mar 08, 2012 7:58 pm
Re: Ruby Dropshadow Tool
I feel like a father seeing his son going to college! I even have a tear in my eyes.
There are other ways to do it, and probably ways that are quicker, but this is a solid approach to the topic and I just love seeing it done by Adam! Good job!
There are other ways to do it, and probably ways that are quicker, but this is a solid approach to the topic and I just love seeing it done by Adam! Good job!
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2687
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Ruby Dropshadow Tool
Thanks guys, Im glad you like it
I would love to see a faster way for learning purposes
tulamide wrote:There are other ways to do it, and probably ways that are quicker
I would love to see a faster way for learning purposes
- adamszabo
- Posts: 657
- Joined: Sun Jul 11, 2010 7:21 am
Re: Ruby Dropshadow Tool
Thank you a lot, Adam. that's a great share
Am I wrong or this method can be used not only with Ruby own drawn shapes but also with png images?...
Am I wrong or this method can be used not only with Ruby own drawn shapes but also with png images?...
-
kortezzzz - Posts: 763
- Joined: Tue Mar 19, 2013 4:21 pm
Re: Ruby Dropshadow Tool
kortezzzz wrote:Thank you a lot, Adam. that's a great share
Am I wrong or this method can be used not only with Ruby own drawn shapes but also with png images?...
hmm I am not sure, I havent tried it, but I guess it could be possible to draw png images over each other and it can change its opacity to create the shadow effect.
- adamszabo
- Posts: 657
- Joined: Sun Jul 11, 2010 7:21 am
Re: Ruby Dropshadow Tool
adamszabo wrote:I guess it could be possible to draw png images over each other and it can change its opacity to create the shadow effect.
Interesting idea
So what's actually needed is a Ruby command that may darken the second duplicated image. Guess maybe one of our experts here knows if something like that is achieveable?
-
kortezzzz - Posts: 763
- Joined: Tue Mar 19, 2013 4:21 pm
Re: Ruby Dropshadow Tool
kortezzzz wrote:adamszabo wrote:I guess it could be possible to draw png images over each other and it can change its opacity to create the shadow effect.
Interesting idea
So what's actually needed is a Ruby command that may darken the second duplicated image. Guess maybe one of our experts here knows if something like that is achieveable?
No. But you can pre-edit your images to a darkened version and use that.
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2687
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Ruby Dropshadow Tool
adamszabo wrote:I would love to see a faster way for learning purposes
Here you are. Note, that it is just a prototype. Lots of knobs to play with and lots of code to explore (mostly helper methods). The core is using GDI+ to calculate everything, so it's as fast as it gets. One exception is the shadow_transform() method. Unfortunately Flowstone doesn't provide access to the results of matrix manipulations (like translate) and so I had to do all the calculations manually to have access to the results. It's not much though (but if there are any takers to optimize my rather straight-forward math, go for it).
- Attachments
-
- drop_shadow.fsm
- (87.59 KiB) Downloaded 845 times
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2687
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
14 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 52 guests