537
537
if (width / 2 < radius) {
538
538
if (height / 2 < radius) {
539
cairo_move_to (cr, x0, (y0 + y1) / 2);
540
cairo_curve_to (cr, x0 ,y0, x0, y0, (x0 + x1) / 2, y0);
541
cairo_curve_to (cr, x1, y0, x1, y0, x1, (y0 + y1) / 2);
542
cairo_curve_to (cr, x1, y1, x1, y1, (x1 + x0) / 2, y1);
543
cairo_curve_to (cr, x0, y1, x0, y1, x0, (y0 + y1) / 2);
539
cairo_move_to (cr, _x0, (_y0 + _y1) / 2);
540
cairo_curve_to (cr, _x0 ,_y0, _x0, _y0, (_x0 + x1) / 2, _y0);
541
cairo_curve_to (cr, x1, _y0, x1, _y0, x1, (_y0 + _y1) / 2);
542
cairo_curve_to (cr, x1, _y1, x1, _y1, (x1 + _x0) / 2, _y1);
543
cairo_curve_to (cr, _x0, _y1, _x0, _y1, _x0, (_y0 + _y1) / 2);
545
cairo_move_to (cr, x0, y0 + radius);
546
cairo_curve_to (cr, x0, y0, x0, y0, (x0 + x1) / 2, y0);
547
cairo_curve_to (cr, x1, y0, x1, y0, x1, y0 + radius);
548
cairo_line_to (cr, x1, y1 - radius);
549
cairo_curve_to (cr, x1, y1, x1, y1, (x1 + x0) / 2, y1);
550
cairo_curve_to (cr, x0, y1, x0, y1, x0, y1 - radius);
545
cairo_move_to (cr, _x0, _y0 + radius);
546
cairo_curve_to (cr, _x0, _y0, _x0, _y0, (_x0 + x1) / 2, _y0);
547
cairo_curve_to (cr, x1, _y0, x1, _y0, x1, _y0 + radius);
548
cairo_line_to (cr, x1, _y1 - radius);
549
cairo_curve_to (cr, x1, _y1, x1, _y1, (x1 + _x0) / 2, _y1);
550
cairo_curve_to (cr, _x0, _y1, _x0, _y1, _x0, _y1 - radius);
553
553
if (height / 2 < radius) {
554
cairo_move_to (cr, x0, (y0 + y1) / 2);
555
cairo_curve_to (cr, x0, y0, x0 , y0, x0 + radius, y0);
556
cairo_line_to (cr, x1 - radius, y0);
557
cairo_curve_to (cr, x1, y0, x1, y0, x1, (y0 + y1) / 2);
558
cairo_curve_to (cr, x1, y1, x1, y1, x1 - radius, y1);
559
cairo_line_to (cr, x0 + radius, y1);
560
cairo_curve_to (cr, x0, y1, x0, y1, x0, (y0 + y1) / 2);
554
cairo_move_to (cr, _x0, (_y0 + _y1) / 2);
555
cairo_curve_to (cr, _x0, _y0, _x0 , _y0, _x0 + radius, _y0);
556
cairo_line_to (cr, x1 - radius, _y0);
557
cairo_curve_to (cr, x1, _y0, x1, _y0, x1, (_y0 + _y1) / 2);
558
cairo_curve_to (cr, x1, _y1, x1, _y1, x1 - radius, _y1);
559
cairo_line_to (cr, _x0 + radius, _y1);
560
cairo_curve_to (cr, _x0, _y1, _x0, _y1, _x0, (_y0 + _y1) / 2);
562
cairo_move_to (cr, x0, y0 + radius);
563
cairo_curve_to (cr, x0 , y0, x0 , y0, x0 + radius, y0);
564
cairo_line_to (cr, x1 - radius, y0);
565
cairo_curve_to (cr, x1, y0, x1, y0, x1, y0 + radius);
566
cairo_line_to (cr, x1, y1 - radius);
567
cairo_curve_to (cr, x1, y1, x1, y1, x1 - radius, y1);
568
cairo_line_to (cr, x0 + radius, y1);
569
cairo_curve_to (cr, x0, y1, x0, y1, x0, y1 - radius);
562
cairo_move_to (cr, _x0, _y0 + radius);
563
cairo_curve_to (cr, _x0 , _y0, _x0 , _y0, _x0 + radius, _y0);
564
cairo_line_to (cr, x1 - radius, _y0);
565
cairo_curve_to (cr, x1, _y0, x1, _y0, x1, _y0 + radius);
566
cairo_line_to (cr, x1, _y1 - radius);
567
cairo_curve_to (cr, x1, _y1, x1, _y1, x1 - radius, _y1);
568
cairo_line_to (cr, _x0 + radius, _y1);
569
cairo_curve_to (cr, _x0, _y1, _x0, _y1, _x0, _y1 - radius);