title: Shadow offset with SwiftUI Shape
body: <p>I am trying to draw a circle in SwiftUI using a Shape, Geometry reader and Path, I want a shadow to sit right underneath the circle but the shadow is coming out offset and I can't seem to get it to draw where it should:</p>
  
  <p><a href="https://i.stack.imgur.com/UqATN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UqATN.png" alt="shadow offset problem"></a></p>
  
  <pre><code>
  struct ContentView: View {
  
      var body: some View {
  
           return  GeometryReader { geometry in
  
              VStack(alignment: .center) {
              BackgroundRing()
                  .stroke(Color.red, style:  StrokeStyle(lineWidth: geometry.size.width &lt; geometry.size.height ? geometry.size.width / 12.0 :  geometry.size.height / 12))
                  .padding()
                  .shadow(color: .gray, radius: 1.0, x: 0.0, y: 0.0)
              }
           }
      }
  }
  
  struct BackgroundRing : Shape {
       func path(in rect: CGRect) -&gt; Path {
          var path: Path = Path()
  
                  let radiusOfRing: CGFloat = (rect.width &lt; rect.height ? rect.width/2 - rect.width / 12 : rect.height/2 - rect.height / 12)
          path.addRelativeArc(center: CGPoint(x: rect.width/2, y: rect.height/2),
                                  radius: radiusOfRing,
                                  startAngle: Angle(radians: 0.0),
                                  delta: Angle(radians: Double.pi * 2.0 ))
  
          return path
      }
  }
  
  
  
  
  </code></pre>