# Renderer.CanvasRenderer

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/Renderer.kt+class:androidx.wear.watchface.Renderer.CanvasRenderer) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0)

*** ** * ** ***


```
abstract class Renderer.CanvasRenderer : Renderer
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.wear.watchface.Renderer](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer) ||
|   | ↳ | [androidx.wear.watchface.Renderer.CanvasRenderer](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer) |

Known direct subclasses [ListenableCanvasRenderer](https://developer.android.com/reference/kotlin/androidx/wear/watchface/ListenableCanvasRenderer), [Renderer.CanvasRenderer2](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer2)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/ListenableCanvasRenderer` | **This class is deprecated.** Use ListenableCanvasRenderer2 instead |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer2` | **This class is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

Known indirect subclasses [ListenableCanvasRenderer2](https://developer.android.com/reference/kotlin/androidx/wear/watchface/ListenableCanvasRenderer2)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/ListenableCanvasRenderer2` | **This class is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> CanvasRenderer is deprecated, use this instead:
>
> ```kotlin
> CanvasRenderer2
> ```

Watch faces that require `https://developer.android.com/reference/android/graphics/Canvas.html` rendering should extend their `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer` from this class or `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer2` if they can take advantage of `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.SharedAssets` to save memory when editing (there can be more than once WatchFace instance when editing).

A CanvasRenderer is expected to be constructed on the background thread associated with `https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchFaceService#getBackgroundThreadHandler()` inside a call to `https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchFaceService#createWatchFace(android.view.SurfaceHolder,androidx.wear.watchface.WatchState,androidx.wear.watchface.ComplicationSlotsManager,androidx.wear.watchface.style.CurrentUserStyleRepository)`. All rendering is be done on the UiThread. There is a memory barrier between construction and rendering so no special threading primitives are required.

In Java it may be easier to extend `https://developer.android.com/reference/kotlin/androidx/wear/watchface/ListenableCanvasRenderer` instead.

## Summary

| ### Public constructors |
|---|
| `@https://developer.android.com/reference/kotlin/androidx/annotation/WorkerThread [CanvasRenderer](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#CanvasRenderer(android.view.SurfaceHolder,androidx.wear.watchface.style.CurrentUserStyleRepository,androidx.wear.watchface.WatchState,kotlin.Int,kotlin.Long,kotlin.Boolean))( surfaceHolder: https://developer.android.com/reference/android/view/SurfaceHolder.html, currentUserStyleRepository: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/CurrentUserStyleRepository, watchState: https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchState, canvasType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, interactiveDrawModeUpdateDelayMillis: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0, to = 60000) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, clearWithBackgroundTintBeforeRenderingHighlightLayer: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public functions |
|---|---|
| `open suspend https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/UiThread [init](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#init())()` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onDump](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#onDump(java.io.PrintWriter))(writer: https://developer.android.com/reference/java/io/PrintWriter.html)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/UiThread [render](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#render(android.graphics.Canvas,android.graphics.Rect,java.time.ZonedDateTime))(canvas: https://developer.android.com/reference/android/graphics/Canvas.html, bounds: https://developer.android.com/reference/android/graphics/Rect.html, zonedDateTime: https://developer.android.com/reference/java/time/ZonedDateTime.html)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/UiThread [renderHighlightLayer](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#renderHighlightLayer(android.graphics.Canvas,android.graphics.Rect,java.time.ZonedDateTime))( canvas: https://developer.android.com/reference/android/graphics/Canvas.html, bounds: https://developer.android.com/reference/android/graphics/Rect.html, zonedDateTime: https://developer.android.com/reference/java/time/ZonedDateTime.html )` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#clearWithBackgroundTintBeforeRenderingHighlightLayer()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

### Inherited functions

From [androidx.wear.watchface.Renderer](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer) `open https://developer.android.com/reference/android/graphics/Rect.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/UiThread
[getMainClockElementBounds](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#getMainClockElementBounds())()`

**This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/UiThread
[invalidate](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#invalidate())()`

**This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/UiThread
[onDestroy](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#onDestroy())()`

**This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/UiThread
[onRenderParametersChanged](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#onRenderParametersChanged(androidx.wear.watchface.RenderParameters))(renderParameters: https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters)`

**This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[postInvalidate](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#postInvalidate())()`

**This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[sendPreviewImageNeedsUpdateRequest](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#sendPreviewImageNeedsUpdateRequest())()`

**This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/UiThread
[shouldAnimate](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#shouldAnimate())()`

**This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.

### Inherited properties

From [androidx.wear.watchface.Renderer](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-pair/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, https://developer.android.com/reference/kotlin/androidx/wear/watchface/ContentDescriptionLabel>>` `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#additionalContentDescriptionLabels()`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`@https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#centerX()`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`@https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#centerY()`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`@https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0, to = 60000) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#interactiveDrawModeUpdateDelayMillis()`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters` `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#renderParameters()`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`https://developer.android.com/reference/android/graphics/Rect.html` `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#screenBounds()`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`https://developer.android.com/reference/android/view/SurfaceHolder.html` `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#surfaceHolder()`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchFaceColors?` `@https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchFaceExperimental
https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#watchfaceColors()`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.

## Public constructors

### CanvasRenderer

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

```
@WorkerThread
[CanvasRenderer](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#CanvasRenderer(android.view.SurfaceHolder,androidx.wear.watchface.style.CurrentUserStyleRepository,androidx.wear.watchface.WatchState,kotlin.Int,kotlin.Long,kotlin.Boolean))(
    surfaceHolder: SurfaceHolder,
    currentUserStyleRepository: CurrentUserStyleRepository,
    watchState: WatchState,
    canvasType: Int,
    interactiveDrawModeUpdateDelayMillis: @IntRange(from = 0, to = 60000) Long,
    clearWithBackgroundTintBeforeRenderingHighlightLayer: Boolean = false
)
```

> [!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 |
|---|---|
| `surfaceHolder: https://developer.android.com/reference/android/view/SurfaceHolder.html` | The `https://developer.android.com/reference/android/view/SurfaceHolder.html` from which a `https://developer.android.com/reference/android/graphics/Canvas.html` to will be obtained and passed into `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#render(android.graphics.Canvas,android.graphics.Rect,java.time.ZonedDateTime)`. |
| `currentUserStyleRepository: https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/CurrentUserStyleRepository` | The watch face's associated `https://developer.android.com/reference/kotlin/androidx/wear/watchface/style/CurrentUserStyleRepository`. |
| `watchState: https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchState` | The watch face's associated `https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchState`. |
| `canvasType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The `https://developer.android.com/reference/kotlin/androidx/wear/watchface/CanvasTypeIntDef` to request. Note even if `https://developer.android.com/reference/kotlin/androidx/wear/watchface/CanvasType#HARDWARE()` is used, screenshots will taken using the software rendering pipeline, as such `https://developer.android.com/reference/android/graphics/Bitmap.html`s with `https://developer.android.com/reference/android/graphics/Bitmap.Config.html#HARDWARE` must be avoided. Value is one of the following: - `0` - `1` <br /> |
| `interactiveDrawModeUpdateDelayMillis: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0, to = 60000) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The interval in milliseconds between frames in interactive `https://developer.android.com/reference/kotlin/androidx/wear/watchface/DrawMode`s. To render at 60hz set to 16. Note when battery is low, the frame rate will be clamped to 10fps. Watch faces are recommended to use lower frame rates if possible for better battery life. Variable frame rates can also help preserve battery life, e.g. if a watch face has a short animation once per second it can adjust the framerate inorder to sleep when not animating. |
| `clearWithBackgroundTintBeforeRenderingHighlightLayer: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | Whether the `https://developer.android.com/reference/android/graphics/Canvas.html` is cleared with `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters.HighlightLayer#backgroundTint()` before `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#renderHighlightLayer(android.graphics.Canvas,android.graphics.Rect,java.time.ZonedDateTime)` is called. Defaults to `false`. |

## Public functions

### init

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

```
@UiThread
open suspend fun [init](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#init())(): Unit
```

> [!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

Perform UiThread specific initialization. Will be called once during initialization before any subsequent calls to `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#render(android.graphics.Canvas,android.graphics.Rect,java.time.ZonedDateTime)`. If you need to override this method in java, consider using `https://developer.android.com/reference/kotlin/androidx/wear/watchface/ListenableCanvasRenderer` instead.

### onDump

```
open fun [onDump](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#onDump(java.io.PrintWriter))(writer: PrintWriter): Unit
```

> [!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

Called when adb shell dumpsys is invoked for the WatchFaceService, allowing the renderer to optionally record state for debugging purposes.

### render

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

```
@UiThread
abstract fun [render](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#render(android.graphics.Canvas,android.graphics.Rect,java.time.ZonedDateTime))(canvas: Canvas, bounds: Rect, zonedDateTime: ZonedDateTime): Unit
```

> [!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

Sub-classes should override this to implement their watch face rendering logic which should respect the current `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#renderParameters()`. Please note `https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchState#isAmbient()` may not match the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters#drawMode()` and should not be used to decide what to render. E.g. when editing from the companion phone while the watch is ambient, renders may be requested with `https://developer.android.com/reference/kotlin/androidx/wear/watchface/DrawMode#INTERACTIVE`.

Any highlights due to `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters#highlightLayer()` should be rendered by `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#renderHighlightLayer(android.graphics.Canvas,android.graphics.Rect,java.time.ZonedDateTime)` instead where possible. For correct behavior this function must use the supplied `https://developer.android.com/reference/java/time/ZonedDateTime.html` in favor of any other ways of getting the time.

Before any calls to render, `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#init()` will be called once.

| Parameters |
|---|---|
| `canvas: https://developer.android.com/reference/android/graphics/Canvas.html` | The `https://developer.android.com/reference/android/graphics/Canvas.html` to render into. Don't assume this is always the canvas from the `https://developer.android.com/reference/android/view/SurfaceHolder.html` backing the display |
| `bounds: https://developer.android.com/reference/android/graphics/Rect.html` | A `https://developer.android.com/reference/android/graphics/Rect.html` describing the bonds of the canvas to draw into |
| `zonedDateTime: https://developer.android.com/reference/java/time/ZonedDateTime.html` | The `https://developer.android.com/reference/java/time/ZonedDateTime.html` to render with |

### renderHighlightLayer

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

```
@UiThread
abstract fun [renderHighlightLayer](https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#renderHighlightLayer(android.graphics.Canvas,android.graphics.Rect,java.time.ZonedDateTime))(
    canvas: Canvas,
    bounds: Rect,
    zonedDateTime: ZonedDateTime
): Unit
```

> [!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

Sub-classes should override this to implement their watch face highlight layer rendering logic for the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters#highlightLayer()` aspect of `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer#renderParameters()`. Typically the implementation will clear `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#renderHighlightLayer(android.graphics.Canvas,android.graphics.Rect,java.time.ZonedDateTime)` to `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters.HighlightLayer#backgroundTint()` before rendering a transparent highlight or a solid outline around the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters.HighlightLayer#highlightedElement()`. This will be composited as needed on top of the results of `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#render(android.graphics.Canvas,android.graphics.Rect,java.time.ZonedDateTime)`. For correct behavior this function must use the supplied `https://developer.android.com/reference/java/time/ZonedDateTime.html` in favor of any other ways of getting the time.

Note if `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#clearWithBackgroundTintBeforeRenderingHighlightLayer()` is `true` then `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#renderHighlightLayer(android.graphics.Canvas,android.graphics.Rect,java.time.ZonedDateTime)` will cleared with `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters.HighlightLayer#backgroundTint()` before renderHighlightLayer is called. Otherwise it is up to the overridden function to clear the Canvas if necessary.

| Parameters |
|---|---|
| `canvas: https://developer.android.com/reference/android/graphics/Canvas.html` | The `https://developer.android.com/reference/android/graphics/Canvas.html` to render into. Don't assume this is always the canvas from the `https://developer.android.com/reference/android/view/SurfaceHolder.html` backing the display |
| `bounds: https://developer.android.com/reference/android/graphics/Rect.html` | A `https://developer.android.com/reference/android/graphics/Rect.html` describing the bonds of the canvas to draw into |
| `zonedDateTime: https://developer.android.com/reference/java/time/ZonedDateTime.html` | the `https://developer.android.com/reference/java/time/ZonedDateTime.html` to render with |

## Public properties

### clearWithBackgroundTintBeforeRenderingHighlightLayer

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

```
val clearWithBackgroundTintBeforeRenderingHighlightLayer: 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 the `https://developer.android.com/reference/android/graphics/Canvas.html` is cleared with `https://developer.android.com/reference/kotlin/androidx/wear/watchface/RenderParameters.HighlightLayer#backgroundTint()` before `https://developer.android.com/reference/kotlin/androidx/wear/watchface/Renderer.CanvasRenderer#renderHighlightLayer(android.graphics.Canvas,android.graphics.Rect,java.time.ZonedDateTime)` is called. Defaults to `false`.