diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-06-27 15:57:48 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-06-27 15:57:48 -0400 |
commit | 645878db97816d07e70a28bda36c69babc9e211f (patch) | |
tree | 8b872a39bb39e017b098849d3258c9a6a16f236c /gtk2_ardour/utils.cc | |
parent | 6618c9e4060da66964bd5707be442ba3f0f156ef (diff) |
remove dead code (we have git) plus add a comment
Diffstat (limited to 'gtk2_ardour/utils.cc')
-rw-r--r-- | gtk2_ardour/utils.cc | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index c0fc619f68..4df1793644 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -761,21 +761,10 @@ unique_random_color (list<Gdk::Color>& used_colors) s = (random() % 65535) / 65535.0; v = (random() % 65535) / 65535.0; -#if 0 - /* avoid neon/glowing tones by limiting them to the - "inner section" (paler) of a color wheel/circle. - */ - - const int32_t max_saturation = 48000; // 65535 would open up the whole color wheel - - newcolor.set_red (random() % max_saturation); - newcolor.set_blue (random() % max_saturation); - newcolor.set_green (random() % max_saturation); -#else s = min (0.5, s); /* not too saturated */ v = max (0.9, v); /* not too bright */ newcolor.set_hsv (h, s, v); -#endif + if (used_colors.size() == 0) { used_colors.push_back (newcolor); return newcolor; @@ -790,6 +779,7 @@ unique_random_color (list<Gdk::Color>& used_colors) gdelta = newcolor.get_green() - c.get_green(); if (sqrt (rdelta*rdelta + bdelta*bdelta + gdelta*gdelta) > 25.0) { + /* different enough */ used_colors.push_back (newcolor); return newcolor; } |