summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext/utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/gtkmm2ext/utils.cc')
-rw-r--r--libs/gtkmm2ext/utils.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/libs/gtkmm2ext/utils.cc b/libs/gtkmm2ext/utils.cc
index 77ed843896..0f04b8cfe7 100644
--- a/libs/gtkmm2ext/utils.cc
+++ b/libs/gtkmm2ext/utils.cc
@@ -415,6 +415,13 @@ Gtkmm2ext::rounded_bottom_half_rectangle (Cairo::RefPtr<Cairo::Context> context,
{
rounded_bottom_half_rectangle (context->cobj(), x, y, w, h, r);
}
+
+void
+Gtkmm2ext::rounded_left_half_rectangle (Cairo::RefPtr<Cairo::Context> context, double x, double y, double w, double h, double r)
+{
+ rounded_left_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)
{
@@ -435,6 +442,19 @@ Gtkmm2ext::rounded_rectangle (cairo_t* cr, double x, double y, double w, double
}
void
+Gtkmm2ext::rounded_left_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_line_to (cr, x+w, y); // tr
+ cairo_line_to (cr, x+w, y + h); // br
+ cairo_arc (cr, x + r, y + h - r, r, 90 * degrees, 180 * degrees); //bl
+ cairo_arc (cr, x + r, y + r, r, 180 * degrees, 270 * degrees); //tl
+ 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;