---
title: CGLineCap
framework: coregraphics
role: symbol
role_heading: Enumeration
path: coregraphics/cglinecap
---

# CGLineCap

Styles for rendering the endpoint of a stroked line.

## Declaration

```swift
enum CGLineCap
```

## Overview

Overview A line cap specifies the method used by strokePath() to draw the endpoint of the line. To change the line cap style in a graphics context, you use the function setLineCap(_:).

## Topics

### Constants

- [CGLineCap.butt](coregraphics/cglinecap/butt.md)
- [CGLineCap.round](coregraphics/cglinecap/round.md)
- [CGLineCap.square](coregraphics/cglinecap/square.md)

### Initializers

- [init(rawValue:)](coregraphics/cglinecap/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
