From c55f142ad055a9b40064a4d1f5399b8361c779c6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 31 Aug 2011 17:22:05 +0000 Subject: Fix meter colour gradients (mid and top were swapped). I removed the double stop around the knee because... well, this is the way I figured out that actually follows the colour configuration as expected. It may be less correct for some reason, but it looks like what I expect when twiddling the colours, anyway. git-svn-id: svn://localhost/ardour2/branches/3.0@10041 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/gtkmm2ext/fastmeter.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'libs/gtkmm2ext/fastmeter.cc') diff --git a/libs/gtkmm2ext/fastmeter.cc b/libs/gtkmm2ext/fastmeter.cc index b5a9502156..79d2871459 100644 --- a/libs/gtkmm2ext/fastmeter.cc +++ b/libs/gtkmm2ext/fastmeter.cc @@ -116,14 +116,11 @@ FastMeter::generate_meter_pattern ( /* cairo coordinate space goes downwards as y value goes up, so invert * knee-based positions by using (1.0 - y) - * - * also, double-stop the knee point, so that we get a hard transition */ cairo_pattern_add_color_stop_rgb (_p, 0.0, r3/255.0, g3/255.0, b3/255.0); // bottom - cairo_pattern_add_color_stop_rgb (_p, 1.0 - (knee/(2.0 * height)), r2/255.0, g2/255.0, b2/255.0); // mid-point to knee - cairo_pattern_add_color_stop_rgb (_p, 1.0 - (knee/(double)height), r0/255.0, g0/255.0, b0/255.0); // knee - cairo_pattern_add_color_stop_rgb (_p, 1.0 - (knee/(double)height), r1/255.0, g1/255.0, b1/255.0); // double-stop @ knee + cairo_pattern_add_color_stop_rgb (_p, 1.0 - (knee/(double)height), r2/255.0, g2/255.0, b2/255.0); // mid-point to knee + cairo_pattern_add_color_stop_rgb (_p, 1.0 - (knee/(2.0 * height)), r1/255.0, g1/255.0, b1/255.0); // knee to top cairo_pattern_add_color_stop_rgb (_p, 1.0, r0/255.0, g0/255.0, b0/255.0); // top Cairo::RefPtr p (new Cairo::Pattern (_p, false)); -- cgit v1.2.3