I am new to svg and trying to understand the arches and curves. After reading the documentation I understand on how to build arches and curves with Q
and C
, but I can't quite get to the right result when I am trying to draw.
Here is the example of what I have drawn so far:
const width = Dimensions.get('window').width;
const firstStop = width / 2 - 20;
const secondStop = width / 2 + 20;
<Svg
style={{ position: 'absolute', bottom: 0 }}
fill-opacity='0.4'
fill='none'
height='70'
width={width}>
<Path
d={`
M${firstStop - 20},0 Q${firstStop},0 ${firstStop},15
M${secondStop + 20},0 Q${secondStop},0 ${secondStop},15
M 0 0
H ${firstStop - 20}
L ${firstStop} 15
V 30
H ${secondStop}
V 15
L ${secondStop + 20} 0
H ${width}
V 70
H 0 0
Z`}
fill='black'
stroke='red'
/>
</Svg>
which results in the picture below:
The problem is that I want to draw the curves on the other 2 angles that are positioned in the cut/hole of the black figure (kind of border radius on the sharp angles). however, if am I making the curve, the fill
is drawn on the inside of the curve and I don't want that.