Function
makeCirclePath
(x, y, radius, direction)
Source from the content-addressed store, hash-verified
| 3 | import { Path } from 'react-native-svg'; |
| 4 | |
| 5 | function makeCirclePath(x, y, radius, direction) { |
| 6 | const reverseFlag = direction === 'counter-clockwise' ? 0 : 1; |
| 7 | |
| 8 | return `M${x} ${y} |
| 9 | m${radius} 0 |
| 10 | a${radius} ${radius} 0 0 ${reverseFlag} 0 ${radius * 2} |
| 11 | a${radius} ${radius} 0 0 ${reverseFlag} 0 ${radius * -2}`; |
| 12 | } |
| 13 | |
| 14 | export default class Circle extends Component { |
| 15 | static propTypes = { |
Tested by
no test coverage detected