<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>使用路径</title>
</head>
<body>
<canvas id="ourCanvas" width="500" height="500" style="border:3px dashed #0094ff;"></canvas>
<script>
var canvas = document.getElementById("ourCanvas");
var ctx = canvas.getContext("2d");
ctx.strokeStyle = "#163B62";
ctx.beginPath();
ctx.arc(70, 70, 40, Math.PI*0.3, Math.PI * 0.8, false);
ctx.stroke();
ctx.strokeStyle = "#000000";
ctx.beginPath();
ctx.arc(160, 70, 40, Math.PI * 0.55, Math.PI * 0.7, false);
ctx.stroke();
ctx.strokeStyle = "#000000";
ctx.beginPath();
ctx.arc(160, 70, 40, -Math.PI * 0.1, Math.PI * 0.1, false);
ctx.stroke();
ctx.strokeStyle = "#BF0628";
ctx.beginPath();
ctx.arc(250, 70, 40, Math.PI * 0.55, Math.PI * 0.7, false);
ctx.stroke();
</script>
</body>
</html>