MCPcopy
hub / github.com/oblador/react-native-progress / makeCirclePath

Function makeCirclePath

Shapes/Circle.js:5–12  ·  view source on GitHub ↗
(x, y, radius, direction)

Source from the content-addressed store, hash-verified

3import { Path } from 'react-native-svg';
4
5function 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
14export default class Circle extends Component {
15 static propTypes = {

Callers 1

renderMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected