---
title: Path
framework: swiftui
role: symbol
role_heading: Structure
path: swiftui/path
---

# Path

The outline of a 2D shape.

## Declaration

```swift
@frozen struct Path
```

## Topics

### Creating a path

- [init()](swiftui/path/init().md)
- [init(_:)](swiftui/path/init(_:).md)
- [init(ellipseIn:)](swiftui/path/init(ellipsein:).md)
- [init(roundedRect:cornerRadius:style:)](swiftui/path/init(roundedrect:cornerradius:style:).md)
- [init(roundedRect:cornerSize:style:)](swiftui/path/init(roundedrect:cornersize:style:).md)
- [init(roundedRect:cornerRadii:style:)](swiftui/path/init(roundedrect:cornerradii:style:).md)

### Getting the path’s characteristics

- [boundingRect](swiftui/path/boundingrect.md)
- [cgPath](swiftui/path/cgpath.md)
- [contains(_:eoFill:)](swiftui/path/contains(_:eofill:).md)
- [currentPoint](swiftui/path/currentpoint.md)
- [description](swiftui/path/description.md)
- [isEmpty](swiftui/path/isempty.md)

### Drawing a path

- [move(to:)](swiftui/path/move(to:).md)
- [addArc(center:radius:startAngle:endAngle:clockwise:transform:)](swiftui/path/addarc(center:radius:startangle:endangle:clockwise:transform:).md)
- [addArc(tangent1End:tangent2End:radius:transform:)](swiftui/path/addarc(tangent1end:tangent2end:radius:transform:).md)
- [addCurve(to:control1:control2:)](swiftui/path/addcurve(to:control1:control2:).md)
- [addEllipse(in:transform:)](swiftui/path/addellipse(in:transform:).md)
- [addLine(to:)](swiftui/path/addline(to:).md)
- [addLines(_:)](swiftui/path/addlines(_:).md)
- [addPath(_:transform:)](swiftui/path/addpath(_:transform:).md)
- [addQuadCurve(to:control:)](swiftui/path/addquadcurve(to:control:).md)
- [addRect(_:transform:)](swiftui/path/addrect(_:transform:).md)
- [addRects(_:transform:)](swiftui/path/addrects(_:transform:).md)
- [addRelativeArc(center:radius:startAngle:delta:transform:)](swiftui/path/addrelativearc(center:radius:startangle:delta:transform:).md)
- [addRoundedRect(in:cornerSize:style:transform:)](swiftui/path/addroundedrect(in:cornersize:style:transform:).md)
- [closeSubpath()](swiftui/path/closesubpath().md)

### Transforming the path

- [applying(_:)](swiftui/path/applying(_:).md)
- [offsetBy(dx:dy:)](swiftui/path/offsetby(dx:dy:).md)
- [trimmedPath(from:to:)](swiftui/path/trimmedpath(from:to:).md)

### Performing operations on the path

- [addRoundedRect(in:cornerSize:style:transform:)](swiftui/path/addroundedrect(in:cornersize:style:transform:).md)
- [intersection(_:eoFill:)](swiftui/path/intersection(_:eofill:).md)
- [lineIntersection(_:eoFill:)](swiftui/path/lineintersection(_:eofill:).md)
- [lineSubtraction(_:eoFill:)](swiftui/path/linesubtraction(_:eofill:).md)
- [normalized(eoFill:)](swiftui/path/normalized(eofill:).md)
- [subtracting(_:eoFill:)](swiftui/path/subtracting(_:eofill:).md)
- [symmetricDifference(_:eoFill:)](swiftui/path/symmetricdifference(_:eofill:).md)
- [union(_:eoFill:)](swiftui/path/union(_:eofill:).md)

### Operating over path elements

- [forEach(_:)](swiftui/path/foreach(_:).md)
- [Path.Element](swiftui/path/element.md)

### Applying a style

- [strokedPath(_:)](swiftui/path/strokedpath(_:).md)

### Instance Methods

- [addRoundedRect(in:cornerRadii:style:transform:)](swiftui/path/addroundedrect(in:cornerradii:style:transform:).md)

## Relationships

### Conforms To

- [Animatable](swiftui/animatable.md)
- [Copyable](swift/copyable.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [LosslessStringConvertible](swift/losslessstringconvertible.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [Shape](swiftui/shape.md)
- [View](swiftui/view.md)
