Created
November 30, 2022 14:08
-
-
Save fostyfost/abcf0ba65c79c5b4afeb714e8842080b to your computer and use it in GitHub Desktop.
SVG: Get circle path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const getCirclePath = (cx: number | undefined = 0, cy: number | undefined = 0, r: number | undefined = 0): string => { | |
return `M ${cx - r}, ${cy} a ${r}, ${r} 0 1,0 ${r * 2},0 a ${r},${r} 0 1,0 ${r * -2},0` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment