---
title: "Path.Element.line(to:)"
framework: swiftui
role: symbol
role_heading: Case
path: "swiftui/path/element/line(to:)"
---

# Path.Element.line(to:)

A line from the previous current point to the given point, which becomes the new current point.

## Declaration

```swift
case line(to: CGPoint)
```

## See Also

### Getting path elements

- [Path.Element.closeSubpath](swiftui/path/element/closesubpath.md)
- [Path.Element.curve(to:control1:control2:)](swiftui/path/element/curve(to:control1:control2:).md)
- [Path.Element.move(to:)](swiftui/path/element/move(to:).md)
- [Path.Element.quadCurve(to:control:)](swiftui/path/element/quadcurve(to:control:).md)
