Contents

ShapeView

A view that provides a shape that you can use for drawing operations.

Declaration

protocol ShapeView<Content> : View, _RemoveGlobalActorIsolation

Overview

Use this type with the drawing methods on Shape to apply multiple fills and/or strokes to a shape. For example, the following code applies a fill and stroke to a capsule shape:

Capsule()
    .fill(.yellow)
    .stroke(.blue, lineWidth: 8)

Topics

Getting the shape

Modify the shape

See Also

Defining shape behavior