diff options
author | Robin Gareus <robin@gareus.org> | 2017-07-17 18:34:35 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-07-17 21:06:04 +0200 |
commit | 601c317d70a03190257577bd867cefc2c70d3275 (patch) | |
tree | 077071290f084431a912414c4e87b6127c586677 /gtk2_ardour/export_report.cc | |
parent | 1f5ebc54853446a786925941bd014666e75221d2 (diff) |
Clean up library inheritance (colors.h, utils.h)
make libwidget independent of libcanvas.
Confine basics to pbd and gtkmm2ext.
Diffstat (limited to 'gtk2_ardour/export_report.cc')
-rw-r--r-- | gtk2_ardour/export_report.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/gtk2_ardour/export_report.cc b/gtk2_ardour/export_report.cc index 200b2c3340..5840597554 100644 --- a/gtk2_ardour/export_report.cc +++ b/gtk2_ardour/export_report.cc @@ -25,10 +25,9 @@ #include "pbd/openuri.h" #include "pbd/basename.h" + #include "gtkmm2ext/utils.h" -#include "gtkmm2ext/utils.h" -#include "canvas/utils.h" -#include "canvas/colors.h" +#include "gtkmm2ext/colors.h" #include "audiographer/general/analyser.h" @@ -530,8 +529,8 @@ ExportReport::init (const AnalysisResults & ar, bool with_file) rint ((g + 59.0) * 10.0 - h * .5), 5, h + 2, w + 2, 4); const float pk = (g + 59.0) / 54.0; - ArdourCanvas::Color c = ArdourCanvas::hsva_to_color (252 - 260 * pk, .9, .3 + pk * .4, .6); - ArdourCanvas::set_source_rgba (cr, c); + Gtkmm2ext::Color c = Gtkmm2ext::hsva_to_color (252 - 260 * pk, .9, .3 + pk * .4, .6); + Gtkmm2ext::set_source_rgba (cr, c); cr->fill (); cr->save (); @@ -731,8 +730,8 @@ ExportReport::init (const AnalysisResults & ar, bool with_file) for (size_t x = 0 ; x < width; ++x) { for (size_t y = 0 ; y < height; ++y) { const float pk = p->spectrum[x][y]; - ArdourCanvas::Color c = ArdourCanvas::hsva_to_color (252 - 260 * pk, .9, sqrt(pk)); - ArdourCanvas::set_source_rgba (cr, c); + Gtkmm2ext::Color c = Gtkmm2ext::hsva_to_color (252 - 260 * pk, .9, sqrt(pk)); + Gtkmm2ext::set_source_rgba (cr, c); cr->rectangle (m_l + x - .5, y - .5, 1, 1); cr->fill (); } @@ -792,8 +791,8 @@ ExportReport::init (const AnalysisResults & ar, bool with_file) for (size_t y = 0 ; y < innerheight - 2; ++y) { const float pk = 1.0 - (float) y / innerheight; - ArdourCanvas::Color c = ArdourCanvas::hsva_to_color (252 - 260 * pk, .9, sqrt(pk)); - ArdourCanvas::set_source_rgba (cr, c); + Gtkmm2ext::Color c = Gtkmm2ext::hsva_to_color (252 - 260 * pk, .9, sqrt(pk)); + Gtkmm2ext::set_source_rgba (cr, c); cr->rectangle (2, innertop + y + .5, m_r - 4 - anw, 1); cr->fill (); } |