We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4361064 commit 927f4ebCopy full SHA for 927f4eb
src/graphic/helper/roundRect.js
@@ -70,17 +70,11 @@ export function buildPath(ctx, shape) {
70
}
71
ctx.moveTo(x + r1, y);
72
ctx.lineTo(x + width - r2, y);
73
- r2 !== 0 && ctx.quadraticCurveTo(
74
- x + width, y, x + width, y + r2
75
- );
+ r2 !== 0 && ctx.arc(x + width - r2, y + r2, r2, -Math.PI / 2, 0);
76
ctx.lineTo(x + width, y + height - r3);
77
- r3 !== 0 && ctx.quadraticCurveTo(
78
- x + width, y + height, x + width - r3, y + height
79
+ r3 !== 0 && ctx.arc(x + width - r3, y + height - r3, r3, 0, Math.PI / 2);
80
ctx.lineTo(x + r4, y + height);
81
- r4 !== 0 && ctx.quadraticCurveTo(
82
- x, y + height, x, y + height - r4
83
+ r4 !== 0 && ctx.arc(x + r4, y + height - r4, r4, Math.PI / 2, Math.PI);
84
ctx.lineTo(x, y + r1);
85
- r1 !== 0 && ctx.quadraticCurveTo(x, y, x + r1, y);
+ r1 !== 0 && ctx.arc(x + r1, y + r1, r1, Math.PI, Math.PI * 1.5);
86
0 commit comments