G D
F****E
*/
- context->move_to(x+r,y); // Move to A
- context->line_to(x+w-r,y); // Straight line to B
- context->curve_to(x+w,y,x+w,y,x+w,y+r); // Curve to C, Control points are both at Q
- context->line_to(x+w,y+h-r); // Move to D
- context->curve_to(x+w,y+h,x+w,y+h,x+w-r,y+h); // Curve to E
- context->line_to(x+r,y+h); // Line to F
- context->curve_to(x,y+h,x,y+h,x,y+h-r); // Curve to G
- context->line_to(x,y+r); // Line to H
- context->curve_to(x,y,x,y,x+r,y); // Curve to A
+ rounded_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)
+{
+ /* renders small shapes better than most others */
+
+/* A****BQ
+ H C
+ * *
+ G D
+ F****E
+*/
+ cairo_move_to (cr, x+r,y); // Move to A
+ cairo_line_to (cr, x+w-r,y); // Straight line to B
+ cairo_curve_to (cr, x+w,y,x+w,y,x+w,y+r); // Curve to C, Control points are both at Q
+ cairo_line_to (cr, x+w,y+h-r); // Move to D
+ cairo_curve_to (cr, x+w,y+h,x+w,y+h,x+w-r,y+h); // Curve to E
+ cairo_line_to (cr, x+r,y+h); // Line to F
+ cairo_curve_to (cr, x,y+h,x,y+h,x,y+h-r); // Curve to G
+ cairo_line_to (cr, x,y+r); // Line to H
+ cairo_curve_to (cr, x,y,x,y,x+r,y); // Curve to A
}
#else