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
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Rectangle & Ellipse Module in Ruby
13 posts
• Page 1 of 2 • 1, 2
Rectangle & Ellipse Module in Ruby
Hello!
Today a was making some GUI in ruby and as a "Lession" i did a port of the old Rectangle & Ellipse Modules from Synthmaker V3 / FlowStone V2
As you see i also did properties for config
What is new is the Hatch-Brush.
If you have any ideas for updates/upgrades please write here
Base-Module - Free4Use in any Project.
For all Ruby nerds - please take a look how i did port all variables from te properties to the main module - maybe there is a better solution - if someone could do that
Best Regards
Today a was making some GUI in ruby and as a "Lession" i did a port of the old Rectangle & Ellipse Modules from Synthmaker V3 / FlowStone V2
As you see i also did properties for config
What is new is the Hatch-Brush.
If you have any ideas for updates/upgrades please write here
Base-Module - Free4Use in any Project.
For all Ruby nerds - please take a look how i did port all variables from te properties to the main module - maybe there is a better solution - if someone could do that
Best Regards
- Attachments
-
- rect&ell_v1.1.fsm
- (5.32 KiB) Downloaded 1286 times
Last edited by chackl on Tue Nov 05, 2013 3:46 pm, edited 1 time in total.
100% accuracy is the guarantee to your success. The value alters if you combine it with musical creativity.
-
chackl - Posts: 233
- Joined: Tue Aug 17, 2010 8:46 pm
- Location: Austria / Salzburg
Re: Rectangle & Ellipse Module in Ruby
very nice m8! cheers for these they will come in really handy! more please!
Best Regards
Best Regards
- Jay
- Posts: 276
- Joined: Tue Jul 13, 2010 5:42 pm
Re: Rectangle & Ellipse Module in Ruby
Very nice modules and coding chackl !
Thanks for sharing your work. These are items needed for most any project.
Thanks again !!
Thanks for sharing your work. These are items needed for most any project.
Thanks again !!
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: Rectangle & Ellipse Module in Ruby
Very handy at the moment...Thanks for sharing.
Cheers.
Cheers.
BV MUSIC SYDNEY AUSTRALIA..Songwriting and Software development
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
- billv
- Posts: 1157
- Joined: Tue Aug 31, 2010 3:34 pm
- Location: Australia
Re: Rectangle & Ellipse Module in Ruby
Hi chackl - nice stuff, bringing some of the new Ruby graphics options to a simple module.
Here's my version of the "options hasher". The @vals data is stored using the saveState/loadState methods, so there's no need for the 'input scanner, so there are far fewer events and triggers kicking about...
PS) Ruby instance variables (NOT local variables) can always be read, even before they are declared - returning nil if undefined. And there is a shorthand method for testing nils, ".nil?"
So...
...can be simply written as...
The "||=" that's used in my code is also very handy in situations like this. It's usually known as "OR-equals" - if the variable is undefined, nil or false, it gets assigned the right hand value, otherwise the old value is kept. Just take care if the variable is holding a boolean (true/false) value, though, as 'false' would be overwritten!
Here's my version of the "options hasher". The @vals data is stored using the saveState/loadState methods, so there's no need for the 'input scanner, so there are far fewer events and triggers kicking about...
PS) Ruby instance variables (NOT local variables) can always be read, even before they are declared - returning nil if undefined. And there is a shorthand method for testing nils, ".nil?"
So...
- Code: Select all
defined?(@vars) == nil
...can be simply written as...
- Code: Select all
@vars.nil?
The "||=" that's used in my code is also very handy in situations like this. It's usually known as "OR-equals" - if the variable is undefined, nil or false, it gets assigned the right hand value, otherwise the old value is kept. Just take care if the variable is holding a boolean (true/false) value, though, as 'false' would be overwritten!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Rectangle & Ellipse Module in Ruby
Thanks for the example i'll update it within the next version
And thanks for the little ruby lesson - I've just began to understand ruby and i'm now experimenting with custom objects and classes.
Thank you
And thanks for the little ruby lesson - I've just began to understand ruby and i'm now experimenting with custom objects and classes.
Thank you
100% accuracy is the guarantee to your success. The value alters if you combine it with musical creativity.
-
chackl - Posts: 233
- Joined: Tue Aug 17, 2010 8:46 pm
- Location: Austria / Salzburg
Re: Rectangle & Ellipse Module in Ruby
@chackl..... may have a little bug...
if change fill style to 'solid'
.no color changes possible.... no hatching either... ??..
if change fill style to 'solid'
.no color changes possible.... no hatching either... ??..
BV MUSIC SYDNEY AUSTRALIA..Songwriting and Software development
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
- billv
- Posts: 1157
- Joined: Tue Aug 31, 2010 3:34 pm
- Location: Australia
Re: Rectangle & Ellipse Module in Ruby
love the hatching brushes mr. Hackl
is it possible somehow to define the size of the hatches?
is it possible somehow to define the size of the hatches?
-
nix - Posts: 817
- Joined: Tue Jul 13, 2010 10:51 am
Re: Rectangle & Ellipse Module in Ruby
nix wrote:love the hatching brushes mr. Hackl
is it possible somehow to define the size of the hatches?
Thanks
Well i did not find anything - if someone finds a metode i can add it
100% accuracy is the guarantee to your success. The value alters if you combine it with musical creativity.
-
chackl - Posts: 233
- Joined: Tue Aug 17, 2010 8:46 pm
- Location: Austria / Salzburg
Re: Rectangle & Ellipse Module in Ruby
billv wrote:@chackl..... may have a little bug...
if change fill style to 'solid'
.no color changes possible.... no hatching either... ??..
Well a hatch allways needs 2 colors
So Hatch is an addition to solid/Linear/Radial.
100% accuracy is the guarantee to your success. The value alters if you combine it with musical creativity.
-
chackl - Posts: 233
- Joined: Tue Aug 17, 2010 8:46 pm
- Location: Austria / Salzburg
13 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: Google [Bot] and 75 guests