# RenderParameters

Artifact: [androidx.wear.watchface:watchface](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/RenderParameters.kt+class:androidx.wear.watchface.RenderParameters) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.3.0-alpha07](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.3.0-alpha07)

*** ** * ** ***

<br />

```
class RenderParameters
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Used to parameterize watch face rendering.

Watch face rendering is split up in a number of layers: the base layer `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/WatchFaceLayer#BASE`, the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot`s layer `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/WatchFaceLayer#COMPLICATIONS`, and the layer above the complicationSlots `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/WatchFaceLayer#COMPLICATIONS_OVERLAY`. These layers are always drawn in this order, one on top of the previous one. These are the layers that are used to render the watch face itself.

An additional layer, the highlight layer, can be drawn during editing the watch face to highlight different elements of the watch face, namely a set of `https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot`s (which may be a single ComplicationSlot) or the area of the watch face that is affected by a single user style setting.

The watch face should provide a way to highlight any of the above combinations so that its own editor, or the one provided by the Wear OS companion phone app is able to highlight the editable part of the watch face to the user. If an individual user style setting is meant to affect the entire watch face (e.g. an overall color setting),then the entire watch face should be highlighted.

The watch face layers and highlight layer can be configured independently, so that it is possible to draw only the highlight layer by passing an empty set of `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters#watchFaceLayers()`.

The semantics of rendering different layers is such that if each individual layer is rendered independently and the resulting images are composited with alpha blending, the result is identical to rendering all of the layers in a single request.

use Watch Face Format instead

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters.HighlightLayer` **This class is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `sealed class https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters.HighlightedElement` **This class is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `object https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters.HighlightedElement.AllComplicationSlots : https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters.HighlightedElement` **This object is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `class https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters.HighlightedElement.ComplicationSlot : https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters.HighlightedElement` **This class is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `class https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters.HighlightedElement.UserStyle : https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters.HighlightedElement` **This class is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public companion properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters#DEFAULT_INTERACTIVE()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public constructors |
|---|
| `[RenderParameters](https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters#RenderParameters(androidx.wear.watchface.DrawMode,kotlin.collections.Set,androidx.wear.watchface.RenderParameters.HighlightLayer,kotlin.collections.Map))( drawMode: https://developer.android.com/reference/kotlin/androidx/wear/watchface/DrawMode, watchFaceLayers: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/WatchFaceLayer>, highlightLayer: https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters.HighlightLayer?, lastComplicationTapDownEvents: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, https://developer.android.com/reference/kotlin/androidx/wear/watchface/TapEvent> )` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `[equals](https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters#equals(kotlin.Any))(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `[hashCode](https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters#hashCode())()` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/DrawMode` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters#drawMode()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters.HighlightLayer?` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters#highlightLayer()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters#isForScreenshot()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, https://developer.android.com/reference/kotlin/androidx/wear/watchface/TapEvent>` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters#lastComplicationTapDownEvents()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/WatchFaceLayer>` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters#watchFaceLayers()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

## Public companion properties

### DEFAULT_INTERACTIVE

```
val DEFAULT_INTERACTIVE: RenderParameters
```

> [!CAUTION]
> **This property is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Default RenderParameters which draws everything in interactive mode.

## Public constructors

### RenderParameters

```
[RenderParameters](https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters#RenderParameters(androidx.wear.watchface.DrawMode,kotlin.collections.Set,androidx.wear.watchface.RenderParameters.HighlightLayer,kotlin.collections.Map))(
    drawMode: DrawMode,
    watchFaceLayers: Set<WatchFaceLayer>,
    highlightLayer: RenderParameters.HighlightLayer? = null,
    lastComplicationTapDownEvents: Map<Int, TapEvent> = emptyMap()
)
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

| Parameters |
|---|---|
| `drawMode: https://developer.android.com/reference/kotlin/androidx/wear/watchface/DrawMode` | The overall drawing parameters based on system state. |
| `watchFaceLayers: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/WatchFaceLayer>` | The parts of the watch face to draw. |
| `highlightLayer: https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters.HighlightLayer? = null` | Optional `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters.HighlightLayer` used by editors to visually highlight an aspect of the watch face. Rendered last on top of `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters#watchFaceLayers()`. If highlighting isn't needed this will be `null`. |
| `lastComplicationTapDownEvents: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, https://developer.android.com/reference/kotlin/androidx/wear/watchface/TapEvent> = emptyMap()` | Map of `https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot` id to the latest `https://developer.android.com/reference/kotlin/androidx/wear/watchface/TapEvent` that ComplicationSlot received, if any. |

## Public functions

### equals

```
open operator fun [equals](https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters#equals(kotlin.Any))(other: Any?): Boolean
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

### hashCode

```
open fun [hashCode](https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters#hashCode())(): Int
```

> [!CAUTION]
> **This function is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

## Public properties

### drawMode

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

```
val drawMode: DrawMode
```

> [!CAUTION]
> **This property is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The overall drawing parameters based on system state.

### highlightLayer

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

```
val highlightLayer: RenderParameters.HighlightLayer?
```

> [!CAUTION]
> **This property is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Optional `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters.HighlightLayer` used by editors to visually highlight an aspect of the watch face. Rendered last on top of `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters#watchFaceLayers()`. If highlighting isn't needed this will be `null`.

### isForScreenshot

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

```
val isForScreenshot: Boolean
```

> [!CAUTION]
> **This property is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Whether or not we're rendering for a screenshot. Some watch faces with animations may need to make adjustments when a screen shot is taken to achieve the best result.

Note `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer2` and `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer` always use software rendering for screenshots.

### lastComplicationTapDownEvents

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

```
val lastComplicationTapDownEvents: Map<Int, TapEvent>
```

> [!CAUTION]
> **This property is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

Map of `https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot` id to the latest `https://developer.android.com/reference/kotlin/androidx/wear/watchface/TapEvent` that ComplicationSlot received, if any.

### watchFaceLayers

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

```
val watchFaceLayers: Set<WatchFaceLayer>
```

> [!CAUTION]
> **This property is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The parts of the watch face to draw.