diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-06-05 16:03:08 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-06-05 16:33:01 -0400 |
commit | 7b2f2a1f6a58c73c64a66dcbaf7cc3765d5379d2 (patch) | |
tree | 61ffda253ba16da678255111b187d3164d7e4bfb /gtk2_ardour/utils.cc | |
parent | 9d3aba30c48e39dd075d1f181bd71538e437fad5 (diff) |
new color utility functions to convert between uint32_t and Gdk::Color
Diffstat (limited to 'gtk2_ardour/utils.cc')
-rw-r--r-- | gtk2_ardour/utils.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index c1de612c9f..6ad6d9bb3c 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -264,6 +264,22 @@ ARDOUR_UI_UTILS::get_font_for_style (string widgetname) return Pango::FontDescription (pfd); /* make a copy */ } +Gdk::Color +ARDOUR_UI_UTILS::gdk_color_from_rgb (uint32_t rgb) +{ + Gdk::Color c; + set_color_from_rgb (c, rgb); + return c; +} + +Gdk::Color +ARDOUR_UI_UTILS::gdk_color_from_rgba (uint32_t rgba) +{ + Gdk::Color c; + set_color_from_rgb (c, rgba); + return c; +} + void ARDOUR_UI_UTILS::set_color_from_rgb (Gdk::Color& c, uint32_t rgb) { |