35.3 Using Overlays
When drawing a shape, it is not possible to combine the fill and stroke modifiers to render a filled shape with a stroked outline. This effect can, however, be achieved by overlaying a stroked view on top of the filled shape, for example:
Ellipse()
.fill(Color.red)
.overlay(Ellipse()
.stroke(Color.blue, lineWidth: 10))
.frame(width: 250, height: 150)
The above example draws a red filled ellipse with a blue stroked outline as illustrated in Figure 35-5:
Figure 35-5