From 7922ec1e9a8db2cf23b286f1dd39bca942d5122d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 10 Jan 2013 16:25:31 +0000 Subject: remove rounded corners from non-mobile ends of pixfaders git-svn-id: svn://localhost/ardour2/branches/3.0@13828 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/gtkmm2ext/utils.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'libs/gtkmm2ext/utils.cc') diff --git a/libs/gtkmm2ext/utils.cc b/libs/gtkmm2ext/utils.cc index 61f93234ff..83ad4537a2 100644 --- a/libs/gtkmm2ext/utils.cc +++ b/libs/gtkmm2ext/utils.cc @@ -413,6 +413,11 @@ Gtkmm2ext::rounded_bottom_half_rectangle (Cairo::RefPtr context, { rounded_bottom_half_rectangle (context->cobj(), x, y, w, h, r); } +void +Gtkmm2ext::rounded_right_half_rectangle (Cairo::RefPtr context, double x, double y, double w, double h, double r) +{ + rounded_right_half_rectangle (context->cobj(), x, y, w, h, r); +} void Gtkmm2ext::rounded_rectangle (cairo_t* cr, double x, double y, double w, double h, double r) @@ -427,6 +432,19 @@ Gtkmm2ext::rounded_rectangle (cairo_t* cr, double x, double y, double w, double cairo_close_path (cr); } +void +Gtkmm2ext::rounded_right_half_rectangle (cairo_t* cr, double x, double y, double w, double h, double r) +{ + double degrees = M_PI / 180.0; + + cairo_new_sub_path (cr); + cairo_arc (cr, x + w - r, y + r, r, -90 * degrees, 0 * degrees); //tr + cairo_arc (cr, x + w - r, y + h - r, r, 0 * degrees, 90 * degrees); //br + cairo_line_to (cr, x, y + h); // bl + cairo_line_to (cr, x, y); // tl + cairo_close_path (cr); +} + void Gtkmm2ext::rounded_top_half_rectangle (cairo_t* cr, double x, double y, double w, double h, double r) { -- cgit v1.2.3