From 42e0c0e9a3144d2f39273673d4c0a07f510b09e1 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 7 Mar 2012 14:03:49 +0000 Subject: [PATCH] remove unused mid-mask stuff from ArdourButton git-svn-id: svn://localhost/ardour2/branches/3.0@11616 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ardour_button.cc | 60 ------------------------------------ gtk2_ardour/ardour_button.h | 3 -- 2 files changed, 63 deletions(-) diff --git a/gtk2_ardour/ardour_button.cc b/gtk2_ardour/ardour_button.cc index d8a2e276bb..9cedeb997c 100644 --- a/gtk2_ardour/ardour_button.cc +++ b/gtk2_ardour/ardour_button.cc @@ -49,59 +49,6 @@ using namespace std; ArdourButton::Element ArdourButton::default_elements = ArdourButton::Element (ArdourButton::Edge|ArdourButton::Body|ArdourButton::Text); ArdourButton::Element ArdourButton::led_default_elements = ArdourButton::Element (ArdourButton::default_elements|ArdourButton::Indicator); ArdourButton::Element ArdourButton::just_led_default_elements = ArdourButton::Element (ArdourButton::Edge|ArdourButton::Body|ArdourButton::Indicator); -cairo_pattern_t* ArdourButton::mid_mask = 0; - -void -ArdourButton::create_mid_mask () -{ - cairo_surface_t *surface; - - surface = cairo_image_surface_create (CAIRO_FORMAT_A8, 32, 32); - - cairo_t* cr2 = cairo_create (surface); - - cairo_set_source_rgba (cr2, 1.0, 0.0, 0.0, 1.0); - cairo_set_line_join (cr2, CAIRO_LINE_JOIN_MITER); - - /* some of these lines extend outside the image surface - we just rely - * on cairo clipping them since it makes the math easier to visualize - * (at least for paul) - */ - - cairo_move_to (cr2, 0.0, 4.0); - cairo_line_to (cr2, 4.0, 0.0); - - cairo_move_to (cr2, 0.0, 12.0); - cairo_line_to (cr2, 12.0, 0.0); - - cairo_move_to (cr2, 0.0, 20.0); - cairo_line_to (cr2, 20.0, 0.0); - - cairo_move_to (cr2, 0.0, 28.0); - cairo_line_to (cr2, 28.0, 0.0); - - cairo_move_to (cr2, 0.0, 28.0); - cairo_line_to (cr2, 28.0, 0.0); - - cairo_move_to (cr2, 0.0, 36.0); - cairo_line_to (cr2, 36.0, 0.0); - - cairo_move_to (cr2, 0.0, 44.0); - cairo_line_to (cr2, 44.0, 0.0); - - cairo_move_to (cr2, 0.0, 52.0); - cairo_line_to (cr2, 52.0, 0.0); - - cairo_set_line_width (cr2, 3.0); - cairo_stroke (cr2); - - mid_mask = cairo_pattern_create_for_surface (surface); - cairo_pattern_set_extend (mid_mask, CAIRO_EXTEND_REPEAT); - cairo_pattern_set_filter (mid_mask, CAIRO_FILTER_NEAREST); - - cairo_surface_destroy (surface); - cairo_destroy (cr2); -} ArdourButton::ArdourButton (Element e) : _elements (e) @@ -124,9 +71,6 @@ ArdourButton::ArdourButton (Element e) , _hovering (false) { ColorsChanged.connect (sigc::mem_fun (*this, &ArdourButton::color_handler)); - if (!mid_mask) { - create_mid_mask (); - } } ArdourButton::ArdourButton (const std::string& str, Element e) @@ -148,10 +92,6 @@ ArdourButton::ArdourButton (const std::string& str, Element e) , _hovering (false) { set_text (str); - - if (!mid_mask) { - create_mid_mask (); - } } ArdourButton::~ArdourButton() diff --git a/gtk2_ardour/ardour_button.h b/gtk2_ardour/ardour_button.h index c09a05fc8c..a2c65006ff 100644 --- a/gtk2_ardour/ardour_button.h +++ b/gtk2_ardour/ardour_button.h @@ -151,9 +151,6 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable void action_sensitivity_changed (); void action_visibility_changed (); void action_tooltip_changed (); - - static cairo_pattern_t* mid_mask; - static void create_mid_mask (); }; #endif /* __gtk2_ardour_ardour_button_h__ */