# LayoutElementBuilders.ArcLine.Builder

# LayoutElementBuilders.ArcLine.Builder

Artifact:[androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout)  
[View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/LayoutElementBuilders.java+class:androidx.wear.protolayout.LayoutElementBuilders.ArcLine.Builder)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder "View this page in Java")

<br />

```
class LayoutElementBuilders.ArcLine.Builder
```

<br />

*** ** * ** ***

Builder for[ArcLine](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine).

## Summary

|                                                                                                                                 ### Public constructors                                                                                                                                  |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#Builder())`()` Creates an instance of[Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder). |

|                                                                  ### Public functions                                                                   |
|---------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [LayoutElementBuilders.ArcLine](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine)                 | [build](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#build())`()` Builds an instance with values accumulated in this Builder.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [LayoutElementBuilders.ArcLine.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 300)` [setArcDirection](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setArcDirection(int))`(arcDirection: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Sets the direction in which this line is drawn.                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| [LayoutElementBuilders.ArcLine.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 300)` [setArcDirection](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setArcDirection(androidx.wear.protolayout.LayoutElementBuilders.ArcDirectionProp))`(arcDirection: `[LayoutElementBuilders.ArcDirectionProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcDirectionProp)`)` Sets the direction in which this line is drawn.                                                                                                                                                                                                                                                                                                   |
| [LayoutElementBuilders.ArcLine.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 300)` [setBrush](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setBrush(androidx.wear.protolayout.ColorBuilders.Brush))`(brush: `[ColorBuilders.Brush](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.Brush)`)` Sets a brush used to draw this line.                                                                                                                                                                                                                                                                                                                                                                                            |
| [LayoutElementBuilders.ArcLine.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 0)` [setColor](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setColor(androidx.wear.protolayout.ColorBuilders.ColorProp))`(color: `[ColorBuilders.ColorProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.ColorProp)`)` Sets the color of this line.                                                                                                                                                                                                                                                                                                                                                                                          |
| [LayoutElementBuilders.ArcLine.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 200)` [setLayoutConstraintsForDynamicLength](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setLayoutConstraintsForDynamicLength(androidx.wear.protolayout.DimensionBuilders.AngularLayoutConstraint))`(` ` angularLayoutConstraint: `[DimensionBuilders.AngularLayoutConstraint](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.AngularLayoutConstraint) `)` Sets the bounding constraints for the layout affected by the dynamic value from[setLength](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setLength(androidx.wear.protolayout.DimensionBuilders.DegreesProp)). |
| [LayoutElementBuilders.ArcLine.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 0)` [setLength](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setLength(androidx.wear.protolayout.DimensionBuilders.DegreesProp))`(length: `[DimensionBuilders.DegreesProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DegreesProp)`)` Sets the length of this line, in degrees.                                                                                                                                                                                                                                                                                                                                                        |
| [LayoutElementBuilders.ArcLine.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 0)` [setModifiers](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setModifiers(androidx.wear.protolayout.ModifiersBuilders.ArcModifiers))`(modifiers: `[ModifiersBuilders.ArcModifiers](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.ArcModifiers)`)` Sets[androidx.wear.protolayout.ModifiersBuilders.Modifiers](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Modifiers)for this element.                                                                                                                                                                                                   |
| [LayoutElementBuilders.ArcLine.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 200)` [setStrokeCap](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setStrokeCap(int))`(strokeCap: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Sets the line stroke cap.                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [LayoutElementBuilders.ArcLine.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 200)` [setStrokeCap](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setStrokeCap(androidx.wear.protolayout.LayoutElementBuilders.StrokeCapProp))`(strokeCap: `[LayoutElementBuilders.StrokeCapProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.StrokeCapProp)`)` Sets the line stroke cap.                                                                                                                                                                                                                                                                                                                                           |
| [LayoutElementBuilders.ArcLine.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 0)` [setThickness](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setThickness(androidx.wear.protolayout.DimensionBuilders.DpProp))`(thickness: `[DimensionBuilders.DpProp](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/DimensionBuilders.DpProp)`)` Sets the thickness of this line.                                                                                                                                                                                                                                                                                                                                                                       |

## Public constructors

### Builder

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)  

```
Builder()
```

Creates an instance of[Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder).  

## Public functions

### build

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)  

```
fun build(): LayoutElementBuilders.ArcLine
```

Builds an instance with values accumulated in this Builder.  

### setArcDirection

Added in[1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.2.0)  

```
@RequiresSchemaVersion(major = 1, minor = 300)
fun setArcDirection(arcDirection: Int): LayoutElementBuilders.ArcLine.Builder
```

Sets the direction in which this line is drawn. If not set, defaults to ARC_DIRECTION_CLOCKWISE.  

### setArcDirection

Added in[1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.2.0)  

```
@RequiresSchemaVersion(major = 1, minor = 300)
fun setArcDirection(arcDirection: LayoutElementBuilders.ArcDirectionProp): LayoutElementBuilders.ArcLine.Builder
```

Sets the direction in which this line is drawn. If not set, defaults to ARC_DIRECTION_CLOCKWISE.  

### setBrush

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

```
@RequiresSchemaVersion(major = 1, minor = 300)
fun setBrush(brush: ColorBuilders.Brush): LayoutElementBuilders.ArcLine.Builder
```

Sets a brush used to draw this line. If set, the brush will be used instead of the color provided in`setColor()`.  

|                                                        Throws                                                         |
|-----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
| [java.lang.IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException.html) | if the brush is not a[SweepGradient](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ColorBuilders.SweepGradient). |

### setColor

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)  

```
@RequiresSchemaVersion(major = 1, minor = 0)
fun setColor(color: ColorBuilders.ColorProp): LayoutElementBuilders.ArcLine.Builder
```

Sets the color of this line.

While this field is statically accessible from 1.0, it's only bindable since version 1.2 and renderers supporting version 1.2 will use the dynamic value (if set).

If a brush is set, this color will not be used.  

### setLayoutConstraintsForDynamicLength

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)  

```
@RequiresSchemaVersion(major = 1, minor = 200)
fun setLayoutConstraintsForDynamicLength(
    angularLayoutConstraint: DimensionBuilders.AngularLayoutConstraint
): LayoutElementBuilders.ArcLine.Builder
```

Sets the bounding constraints for the layout affected by the dynamic value from[setLength](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.ArcLine.Builder#setLength(androidx.wear.protolayout.DimensionBuilders.DegreesProp)).  

### setLength

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)  

```
@RequiresSchemaVersion(major = 1, minor = 0)
fun setLength(length: DimensionBuilders.DegreesProp): LayoutElementBuilders.ArcLine.Builder
```

Sets the length of this line, in degrees. If not defined, defaults to 0.

While this field is statically accessible from 1.0, it's only bindable since version 1.2 and renderers supporting version 1.2 will use the dynamic value (if set).  

### setModifiers

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)  

```
@RequiresSchemaVersion(major = 1, minor = 0)
fun setModifiers(modifiers: ModifiersBuilders.ArcModifiers): LayoutElementBuilders.ArcLine.Builder
```

Sets[androidx.wear.protolayout.ModifiersBuilders.Modifiers](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ModifiersBuilders.Modifiers)for this element.  

### setStrokeCap

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)  

```
@RequiresSchemaVersion(major = 1, minor = 200)
fun setStrokeCap(strokeCap: Int): LayoutElementBuilders.ArcLine.Builder
```

Sets the line stroke cap. If not defined, defaults to STROKE_CAP_ROUND.  

### setStrokeCap

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)  

```
@RequiresSchemaVersion(major = 1, minor = 200)
fun setStrokeCap(strokeCap: LayoutElementBuilders.StrokeCapProp): LayoutElementBuilders.ArcLine.Builder
```

Sets the line stroke cap. If not defined, defaults to STROKE_CAP_ROUND.  

### setThickness

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)  

```
@RequiresSchemaVersion(major = 1, minor = 0)
fun setThickness(thickness: DimensionBuilders.DpProp): LayoutElementBuilders.ArcLine.Builder
```

Sets the thickness of this line. If not defined, defaults to 0.

Note that this field only supports static values.