1 | import { NUM_DEFAULT } from './constants';
|
2 |
|
3 | export default function circle2Path(options) {
|
4 | var cx = options.cx || NUM_DEFAULT,
|
5 | cy = options.cy || NUM_DEFAULT,
|
6 | r = options.r || NUM_DEFAULT;
|
7 |
|
8 | return "M" + cx + "," + cy + " m" + (-r) + ",0 a" + r + "," + r + " 0 1,0 " + (r * 2) + ",0 a" + r + "," + r + " 0 1,0 " + (-r * 2) + ",0";
|
9 | }
|