summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext/utils.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-01-10 16:25:31 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2013-01-10 16:25:31 +0000
commit7922ec1e9a8db2cf23b286f1dd39bca942d5122d (patch)
tree041cb876de92d422b54791aeace06def6d3111ed /libs/gtkmm2ext/utils.cc
parentb1029a3caf4153835b7faa8e1a689f4f4a05622b (diff)
remove rounded corners from non-mobile ends of pixfaders
git-svn-id: svn://localhost/ardour2/branches/3.0@13828 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext/utils.cc')
-rw-r--r--libs/gtkmm2ext/utils.cc18
1 files changed, 18 insertions, 0 deletions
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<Cairo::Context> context,
{
rounded_bottom_half_rectangle (context->cobj(), x, y, w, h, r);
}
+void
+Gtkmm2ext::rounded_right_half_rectangle (Cairo::RefPtr<Cairo::Context> 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)
@@ -428,6 +433,19 @@ Gtkmm2ext::rounded_rectangle (cairo_t* cr, double x, double y, double w, double
}
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)
{
double degrees = M_PI / 180.0;