# 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 />

```
public final 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/androidx/wear/watchface/style/WatchFaceLayer#BASE`, the `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot`s layer `https://developer.android.com/reference/androidx/wear/watchface/style/WatchFaceLayer#COMPLICATIONS`, and the layer above the complicationSlots `https://developer.android.com/reference/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/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/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 |
|---|
| `public final class https://developer.android.com/reference/androidx/wear/watchface/RenderParameters.HighlightLayer` **This class is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `public sealed class https://developer.android.com/reference/androidx/wear/watchface/RenderParameters.HighlightedElement` **This class is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `public static class https://developer.android.com/reference/androidx/wear/watchface/RenderParameters.HighlightedElement.AllComplicationSlots extends https://developer.android.com/reference/androidx/wear/watchface/RenderParameters.HighlightedElement` **This class is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `public final class https://developer.android.com/reference/androidx/wear/watchface/RenderParameters.HighlightedElement.ComplicationSlot extends https://developer.android.com/reference/androidx/wear/watchface/RenderParameters.HighlightedElement` **This class is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `public final class https://developer.android.com/reference/androidx/wear/watchface/RenderParameters.HighlightedElement.UserStyle extends https://developer.android.com/reference/androidx/wear/watchface/RenderParameters.HighlightedElement` **This class is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public fields |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/RenderParameters` | `https://developer.android.com/reference/androidx/wear/watchface/RenderParameters#DEFAULT_INTERACTIVE()` **This field is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public constructors |
|---|
| `[RenderParameters](https://developer.android.com/reference/androidx/wear/watchface/RenderParameters#RenderParameters(androidx.wear.watchface.DrawMode,kotlin.collections.Set,androidx.wear.watchface.RenderParameters.HighlightLayer,kotlin.collections.Map))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/DrawMode drawMode, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/WatchFaceLayer> watchFaceLayers, https://developer.android.com/reference/androidx/wear/watchface/RenderParameters.HighlightLayer highlightLayer, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/TapEvent> lastComplicationTapDownEvents )` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public methods |
|---|---|
| `boolean` | `[equals](https://developer.android.com/reference/androidx/wear/watchface/RenderParameters#equals(kotlin.Any))(https://developer.android.com/reference/java/lang/Object.html other)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/DrawMode` | `[getDrawMode](https://developer.android.com/reference/androidx/wear/watchface/RenderParameters#getDrawMode())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final https://developer.android.com/reference/androidx/wear/watchface/RenderParameters.HighlightLayer` | `[getHighlightLayer](https://developer.android.com/reference/androidx/wear/watchface/RenderParameters#getHighlightLayer())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/TapEvent>` | `[getLastComplicationTapDownEvents](https://developer.android.com/reference/androidx/wear/watchface/RenderParameters#getLastComplicationTapDownEvents())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/WatchFaceLayer>` | `[getWatchFaceLayers](https://developer.android.com/reference/androidx/wear/watchface/RenderParameters#getWatchFaceLayers())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `int` | `[hashCode](https://developer.android.com/reference/androidx/wear/watchface/RenderParameters#hashCode())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final boolean` | `[isForScreenshot](https://developer.android.com/reference/androidx/wear/watchface/RenderParameters#isForScreenshot())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

## Public fields

### DEFAULT_INTERACTIVE

```
public static final @NonNull RenderParameters DEFAULT_INTERACTIVE
```

> [!CAUTION]
> **This field 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

```
public [RenderParameters](https://developer.android.com/reference/androidx/wear/watchface/RenderParameters#RenderParameters(androidx.wear.watchface.DrawMode,kotlin.collections.Set,androidx.wear.watchface.RenderParameters.HighlightLayer,kotlin.collections.Map))(
    @NonNull DrawMode drawMode,
    @NonNull Set<@NonNull WatchFaceLayer> watchFaceLayers,
    RenderParameters.HighlightLayer highlightLayer,
    @NonNull Map<@NonNull Integer, @NonNull TapEvent> lastComplicationTapDownEvents
)
```

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

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/DrawMode drawMode` | The overall drawing parameters based on system state. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/style/WatchFaceLayer> watchFaceLayers` | The parts of the watch face to draw. |
| `https://developer.android.com/reference/androidx/wear/watchface/RenderParameters.HighlightLayer highlightLayer` | Optional `https://developer.android.com/reference/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/androidx/wear/watchface/RenderParameters#watchFaceLayers()`. If highlighting isn't needed this will be `null`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/TapEvent> lastComplicationTapDownEvents` | Map of `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot` id to the latest `https://developer.android.com/reference/androidx/wear/watchface/TapEvent` that ComplicationSlot received, if any. |

## Public methods

### equals

```
public boolean [equals](https://developer.android.com/reference/androidx/wear/watchface/RenderParameters#equals(kotlin.Any))(Object other)
```

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

### getDrawMode

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)

```
public final @NonNull DrawMode [getDrawMode](https://developer.android.com/reference/androidx/wear/watchface/RenderParameters#getDrawMode())()
```

> [!CAUTION]
> **This method 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.

### getHighlightLayer

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)

```
public final RenderParameters.HighlightLayer [getHighlightLayer](https://developer.android.com/reference/androidx/wear/watchface/RenderParameters#getHighlightLayer())()
```

> [!CAUTION]
> **This method 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/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/androidx/wear/watchface/RenderParameters#watchFaceLayers()`. If highlighting isn't needed this will be `null`.

### getLastComplicationTapDownEvents

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)

```
public final @NonNull Map<@NonNull Integer, @NonNull TapEvent> [getLastComplicationTapDownEvents](https://developer.android.com/reference/androidx/wear/watchface/RenderParameters#getLastComplicationTapDownEvents())()
```

> [!CAUTION]
> **This method 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/androidx/wear/watchface/ComplicationSlot` id to the latest `https://developer.android.com/reference/androidx/wear/watchface/TapEvent` that ComplicationSlot received, if any.

### getWatchFaceLayers

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)

```
public final @NonNull Set<@NonNull WatchFaceLayer> [getWatchFaceLayers](https://developer.android.com/reference/androidx/wear/watchface/RenderParameters#getWatchFaceLayers())()
```

> [!CAUTION]
> **This method 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.

### hashCode

```
public int [hashCode](https://developer.android.com/reference/androidx/wear/watchface/RenderParameters#hashCode())()
```

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

### 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)

```
public final boolean [isForScreenshot](https://developer.android.com/reference/androidx/wear/watchface/RenderParameters#isForScreenshot())()
```

> [!CAUTION]
> **This method 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/androidx/wear/watchface/Renderer.CanvasRenderer2` and `https://developer.android.com/reference/androidx/wear/watchface/Renderer.CanvasRenderer` always use software rendering for screenshots.