# Paint.Cap

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Cap

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/graphics/Paint.Cap "View this page in Java")  

```
class Cap
```

|---|---|----------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                              |||
| ↳ | [kotlin.Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)\<[android.graphics.Paint.Cap](https://developer.android.com/reference/kotlin/android/graphics/Paint.Cap#)\> ||
|   | ↳ | [android.graphics.Paint.Cap](https://developer.android.com/reference/kotlin/android/graphics/Paint.Cap#) |

|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Direct Subclasses [Paint.Cap.BUTT](https://developer.android.com/reference/kotlin/android/graphics/Paint.Cap#ENUM_VALUE:BUTT),[Paint.Cap.ROUND](https://developer.android.com/reference/kotlin/android/graphics/Paint.Cap#ENUM_VALUE:ROUND),[Paint.Cap.SQUARE](https://developer.android.com/reference/kotlin/android/graphics/Paint.Cap#ENUM_VALUE:SQUARE) |-----------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------| | [Paint.Cap.BUTT](https://developer.android.com/reference/kotlin/android/graphics/Paint.Cap#ENUM_VALUE:BUTT)     | The stroke ends with the path, and does not project beyond it.                   | | [Paint.Cap.ROUND](https://developer.android.com/reference/kotlin/android/graphics/Paint.Cap#ENUM_VALUE:ROUND)   | The stroke projects out as a semicircle, with the center at the end of the path. | | [Paint.Cap.SQUARE](https://developer.android.com/reference/kotlin/android/graphics/Paint.Cap#ENUM_VALUE:SQUARE) | The stroke projects out as a square, with the center at the end of the path.     | |

The Cap specifies the treatment for the beginning and ending of stroked lines and paths. The default is BUTT.

## Summary

|                                                                                       Enum values                                                                                       ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [BUTT](https://developer.android.com/reference/kotlin/android/graphics/Paint.Cap#ENUM_VALUE:BUTT) The stroke ends with the path, and does not project beyond it.                     |
| [ROUND](https://developer.android.com/reference/kotlin/android/graphics/Paint.Cap#ENUM_VALUE:ROUND) The stroke projects out as a semicircle, with the center at the end of the path. |
| [SQUARE](https://developer.android.com/reference/kotlin/android/graphics/Paint.Cap#ENUM_VALUE:SQUARE) The stroke projects out as a square, with the center at the end of the path.   |

## Enum values

### BUTT

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val BUTT : Paint.Cap
```

The stroke ends with the path, and does not project beyond it.  

### ROUND

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val ROUND : Paint.Cap
```

The stroke projects out as a semicircle, with the center at the end of the path.  

### SQUARE

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val SQUARE : Paint.Cap
```

The stroke projects out as a square, with the center at the end of the path.