---
title: ShapeView
framework: swiftui
role: symbol
role_heading: Protocol
path: swiftui/shapeview
---

# ShapeView

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

## Declaration

```swift
nonisolated protocol ShapeView<Content> : View
```

## Overview

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

- [shape](swiftui/shapeview/shape.md)
- [Content](swiftui/shapeview/content.md)

### Modify the shape

- [fill(_:style:)](swiftui/shapeview/fill(_:style:).md)
- [stroke(_:style:antialiased:)](swiftui/shapeview/stroke(_:style:antialiased:).md)
- [stroke(_:lineWidth:antialiased:)](swiftui/shapeview/stroke(_:linewidth:antialiased:).md)
- [strokeBorder(_:style:antialiased:)](swiftui/shapeview/strokeborder(_:style:antialiased:).md)
- [strokeBorder(_:lineWidth:antialiased:)](swiftui/shapeview/strokeborder(_:linewidth:antialiased:).md)

## Relationships

### Inherits From

- [View](swiftui/view.md)

### Conforming Types

- [FillShapeView](swiftui/fillshapeview.md)
- [StrokeBorderShapeView](swiftui/strokebordershapeview.md)
- [StrokeShapeView](swiftui/strokeshapeview.md)

## See Also

### Defining shape behavior

- [Shape](swiftui/shape.md)
- [AnyShape](swiftui/anyshape.md)
- [ShapeRole](swiftui/shaperole.md)
- [StrokeStyle](swiftui/strokestyle.md)
- [StrokeShapeView](swiftui/strokeshapeview.md)
- [StrokeBorderShapeView](swiftui/strokebordershapeview.md)
- [FillStyle](swiftui/fillstyle.md)
- [FillShapeView](swiftui/fillshapeview.md)
