Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
キャンバス要素に一種の円グラフの形を作ろうとしていますが、それだけでこれを行う関数が見つからないようです。完全な円とセグメントしか描画できないようです。これを行う簡単な方法はありますか?
(参照:サークル用語に関するウィキペディア)
以下が機能するはずです。
context.moveTo(cx,cy); context.arc(cx,cy,radius,startangle,endangle); context.lineTo(cx,cy); context.stroke(); // or context.fill()
、cxはcy円弧の中心です。
cx
cy