From 645878db97816d07e70a28bda36c69babc9e211f Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 27 Jun 2013 15:57:48 -0400 Subject: remove dead code (we have git) plus add a comment --- gtk2_ardour/utils.cc | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'gtk2_ardour/utils.cc') 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& 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& 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; } -- cgit v1.2.3