29.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 blue filled ellipse with a red stroked outlined as illustrated in Figure 29-5: