# BrushCoat.Builder

Artifact: [androidx.ink:ink-brush](https://developer.android.com/jetpack/androidx/releases/ink) [View Source](https://cs.android.com/search?q=file:androidx/ink/brush/BrushCoat.kt+class:androidx.ink.brush.BrushCoat.Builder) Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

*** ** * ** ***


```
public final class BrushCoat.Builder
```

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/androidx/ink/brush/BrushCoat`.

For Java developers, use `BrushCoat.Builder` to construct a `https://developer.android.com/reference/androidx/ink/brush/BrushCoat` with default values, overriding only as needed. For example: `BrushCoat coat = BrushCoat.builder().setTip(presetBrushTip).build();`

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/ink/brush/BrushCoat.Builder#Builder()()` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushCoat.Builder` | `https://developer.android.com/reference/androidx/ink/brush/BrushCoat.Builder#addPaintPreference(androidx.ink.brush.BrushPaint)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint paint)` Adds a brush paint preference to this brush coat. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushCoat` | `https://developer.android.com/reference/androidx/ink/brush/BrushCoat.Builder#build()()` Constructs a `https://developer.android.com/reference/androidx/ink/brush/BrushCoat` from this `https://developer.android.com/reference/androidx/ink/brush/BrushCoat.Builder`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushCoat.Builder` | `https://developer.android.com/reference/androidx/ink/brush/BrushCoat.Builder#setPaintPreferences(kotlin.collections.List)( @https://developer.android.com/reference/androidx/annotation/Size(min = 1) @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushPaint> paintPreferences )` Sets the list of paint preferences for this brush coat (replacing any previously-added paint preferences). |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushCoat.Builder` | `https://developer.android.com/reference/androidx/ink/brush/BrushCoat.Builder#setTip(androidx.ink.brush.BrushTip)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/BrushTip tip)` Sets the brush tip for this brush coat. |

## Public constructors

### Builder

Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
public Builder()
```

## Public methods

### addPaintPreference

Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
public final @NonNull BrushCoat.Builder addPaintPreference(@NonNull BrushPaint paint)
```

Adds a brush paint preference to this brush coat.

### build

Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
public final @NonNull BrushCoat build()
```

Constructs a `https://developer.android.com/reference/androidx/ink/brush/BrushCoat` from this `https://developer.android.com/reference/androidx/ink/brush/BrushCoat.Builder`.

### setPaintPreferences

Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
public final @NonNull BrushCoat.Builder setPaintPreferences(
    @Size(min = 1) @NonNull List<@NonNull BrushPaint> paintPreferences
)
```

Sets the list of paint preferences for this brush coat (replacing any previously-added paint preferences).

### setTip

Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
public final @NonNull BrushCoat.Builder setTip(@NonNull BrushTip tip)
```

Sets the brush tip for this brush coat.