2021-06-10 20:39:09 +08:00
|
|
|
export default function arcTo(ctx) {
|
2015-06-13 17:06:25 -07:00
|
|
|
ctx.beginPath();
|
|
|
|
ctx.moveTo(150, 20);
|
|
|
|
ctx.arcTo(150, 100, 50, 20, 30);
|
|
|
|
ctx.stroke();
|
|
|
|
|
|
|
|
ctx.fillStyle = 'blue';
|
|
|
|
// base point
|
|
|
|
ctx.fillRect(150, 20, 10, 10);
|
|
|
|
|
|
|
|
ctx.fillStyle = 'red';
|
|
|
|
// control point one
|
|
|
|
ctx.fillRect(150, 100, 10, 10);
|
|
|
|
// control point two
|
|
|
|
ctx.fillRect(50, 20, 10, 10);
|
|
|
|
};
|