# ComplicationDrawable

Artifact: [androidx.wear.watchface:watchface-complications-rendering](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/complications/rendering/ComplicationDrawable.kt+class:androidx.wear.watchface.complications.rendering.ComplicationDrawable) 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 ComplicationDrawable : Drawable
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) ||
|   | ↳ | [androidx.wear.watchface.complications.rendering.ComplicationDrawable](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable) |

*** ** * ** ***

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

A styleable drawable object that draws complicationSlots. You can create a ComplicationDrawable from XML inflation or by using one of the constructor methods.

<br />

### Constructing a ComplicationDrawable

<br />

To construct a ComplicationDrawable programmatically, use the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable` constructor. Afterwards, styling attributes you want to modify can be set via set methods.

```kotlin
val complicationDrawable = ComplicationDrawable(context)
complicationDrawable.activeStyle.backgroundColor = backgroundColor
complicationDrawable.activeStyle.textColor = textColor
```

<br />

### Constructing a ComplicationDrawable from XML

<br />

Constructing a ComplicationDrawable from an XML file makes it easier to modify multiple styling attributes at once without calling any set methods. You may also use different XML files to switch between different styles your watch face supports.

To construct a ComplicationDrawable from a drawable XML file, you may create an XML file in your project's `res/drawable` folder. A ComplicationDrawable with red text and white title in active mode, and white text and white title in ambient mode would look like this:

```kotlin
<?xml version="1.0" encoding="utf-8"?>
<android.support.wearable.complication.rendering.ComplicationDrawable
xmlns:app="http://schemas.android.com/apk/res-auto"
app:textColor="#FFFF0000"
app:titleColor="#FFFFFFFF">
<ambient
app:textColor="#FFFFFFFF" />
</android.support.wearable.complication.rendering.ComplicationDrawable>
```

A top-level `drawable` tag with the `class` attribute may also be used to construct a ComplicationDrawable from an XML file:

```kotlin
<?xml version="1.0" encoding="utf-8"?>
<drawable
class="android.support.wearable.complication.rendering.ComplicationDrawable"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:textColor="#FFFF0000"
app:titleColor="#FFFFFFFF">
<ambient
app:textColor="#FFFFFFFF" />
</drawable>
```

To inflate a ComplicationDrawable from XML file, use the .getDrawable method. ComplicationDrawable needs access to the current context in order to style and draw the complication.

```kotlin
public void onCreate(SurfaceHolder holder) {
...
ComplicationDrawable complicationDrawable = (ComplicationDrawable)
getDrawable(R.drawable.complication);
complicationDrawable.setContext(WatchFaceService.this);
...
}
```

<br />

#### Syntax:

<br />

```kotlin
<?xml version="1.0" encoding="utf-8"?>
<android.support.wearable.complication.rendering.ComplicationDrawable
xmlns:app="http://schemas.android.com/apk/res-auto"
app:backgroundColor="color"
app:backgroundDrawable="drawable"
app:borderColor="color"
app:borderDashGap="dimension"
app:borderDashWidth="dimension"
app:borderRadius="dimension"
app:borderStyle="none|solid|dashed"
app:borderWidth="dimension"
app:highlightColor="color"
app:iconColor="color"
app:rangedValuePrimaryColor="color"
app:rangedValueProgressHidden="boolean"
app:rangedValueRingWidth="dimension"
app:rangedValueSecondaryColor="color"
app:textColor="color"
app:textSize="dimension"
app:textTypeface="string"
app:titleColor="color"
app:titleSize="dimension"
app:titleTypeface="string">
<ambient
app:backgroundColor="color"
app:backgroundDrawable="drawable"
app:borderColor="color"
app:borderDashGap="dimension"
app:borderDashWidth="dimension"
app:borderRadius="dimension"
app:borderStyle="none|solid|dashed"
app:borderWidth="dimension"
app:highlightColor="color"
app:iconColor="color"
app:rangedValuePrimaryColor="color"
app:rangedValueRingWidth="dimension"
app:rangedValueSecondaryColor="color"
app:textColor="color"
app:textSize="dimension"
app:textTypeface="string"
app:titleColor="color"
app:titleSize="dimension"
app:titleTypeface="string" />
</android.support.wearable.complication.rendering.ComplicationDrawable>
```

Attributes of the top-level tag apply to both active and ambient modes while attributes of the inner `ambient` tag only apply to ambient mode. As an exception, top-level only `rangedValueProgressHidden` attribute applies to both modes, and cannot be overridden in ambient mode. To hide ranged value in only one of the active or ambient modes, you may consider setting `rangedValuePrimaryColor` and `rangedValueSecondaryColor` to `https://developer.android.com/reference/android/graphics/Color.html#TRANSPARENT` instead.

<br />

### Drawing a ComplicationDrawable

<br />

Depending on the size and shape of the bounds, the layout of the complication may change. For instance, a short text complication with an icon that is drawn on square bounds would draw the icon above the short text, but a short text complication with an icon that is drawn on wide rectangular bounds might draw the icon to the left of the short text instead.

use Watch Face Format instead

## Summary

| ### Public companion functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable?` | `[getDrawable](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getDrawable(android.content.Context,kotlin.Int))(context: https://developer.android.com/reference/android/content/Context.html, id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public constructors |
|---|
| `[ComplicationDrawable](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#ComplicationDrawable())()` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `[ComplicationDrawable](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#ComplicationDrawable(android.content.Context))(context: https://developer.android.com/reference/android/content/Context.html)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `[ComplicationDrawable](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#ComplicationDrawable(androidx.wear.watchface.complications.rendering.ComplicationDrawable))(drawable: https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public functions |
|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[draw](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#draw(android.graphics.Canvas))(canvas: https://developer.android.com/reference/android/graphics/Canvas.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` | `[getOpacity](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getOpacity())()` **This function is deprecated.** This method is no longer used in graphics optimizations |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[inflate](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#inflate(android.content.res.Resources,org.xmlpull.v1.XmlPullParser,android.util.AttributeSet,android.content.res.Resources.Theme))( r: https://developer.android.com/reference/android/content/res/Resources.html, parser: https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html, attrs: https://developer.android.com/reference/android/util/AttributeSet.html, theme: https://developer.android.com/reference/android/content/res/Resources.Theme.html? )` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `[onTap](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#onTap(kotlin.Int,kotlin.Int))(x: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, y: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/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/-unit/index.html` | `[setAlpha](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setAlpha(kotlin.Int))(alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0, to = 255) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/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/-unit/index.html` | `[setColorFilter](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setColorFilter(android.graphics.ColorFilter))(colorFilter: https://developer.android.com/reference/android/graphics/ColorFilter.html?)` **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` | `[setComplicationData](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setComplicationData(androidx.wear.watchface.complications.data.ComplicationData,kotlin.Boolean))( complicationData: https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData, loadDrawablesAsync: 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. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[setContext](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setContext(android.content.Context))(context: https://developer.android.com/reference/android/content/Context.html)` **This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Protected functions |
|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onBoundsChange](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#onBoundsChange(android.graphics.Rect))(bounds: https://developer.android.com/reference/android/graphics/Rect.html)` **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/complications/rendering/ComplicationStyle` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#activeStyle()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationStyle` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#ambientStyle()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#complicationData()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://developer.android.com/reference/android/content/Context.html?` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#context()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#currentTime()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#highlightDuration()` **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/complications/rendering/ComplicationDrawable#isBurnInProtectionOn()` **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/complications/rendering/ComplicationDrawable#isHighlighted()` **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/complications/rendering/ComplicationDrawable#isInAmbientMode()` **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/complications/rendering/ComplicationDrawable#isLowBitAmbient()` **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/complications/rendering/ComplicationDrawable#isRangedValueProgressHidden()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#noDataText()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#opacity()` **This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

### Inherited functions

From [android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[applyTheme](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#applyTheme(android.content.res.Resources.Theme))(t: https://developer.android.com/reference/android/content/res/Resources.Theme.html)`

**This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[canApplyTheme](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#canApplyTheme())()`

**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` `[clearColorFilter](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#clearColorFilter())()`

**This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`https://developer.android.com/reference/android/graphics/Rect.html` `[copyBounds](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#copyBounds())()`

**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` `[copyBounds](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#copyBounds(android.graphics.Rect))(bounds: https://developer.android.com/reference/android/graphics/Rect.html)`

**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` `[getHotspotBounds](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getHotspotBounds(android.graphics.Rect))(outRect: https://developer.android.com/reference/android/graphics/Rect.html)`

**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` `[getOutline](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getOutline(android.graphics.Outline))(outline: https://developer.android.com/reference/android/graphics/Outline.html)`

**This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[getPadding](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getPadding(android.graphics.Rect))(padding: https://developer.android.com/reference/android/graphics/Rect.html)`

**This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[hasFocusStateSpecified](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#hasFocusStateSpecified())()`

**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` `[inflate](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet))(r: https://developer.android.com/reference/android/content/res/Resources.html, parser: https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html, attrs: https://developer.android.com/reference/android/util/AttributeSet.html)`

**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` `[invalidateSelf](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#invalidateSelf())()`

**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` `[jumpToCurrentState](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#jumpToCurrentState())()`

**This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `[mutate](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#mutate())()`

**This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[onLayoutDirectionChanged](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onLayoutDirectionChanged(int))(layoutDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[onLevelChange](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onLevelChange(int))(level: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[onStateChange](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onStateChange(int[]))(state: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html)`

**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` `[scheduleSelf](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#scheduleSelf(java.lang.Runnable, long))(what: https://developer.android.com/reference/java/lang/Runnable.html, when: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`

**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` `[setBounds](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setBounds(int, int, int, int))(left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, right: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bottom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**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` `[setColorFilter](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setColorFilter(int, android.graphics.PorterDuff.Mode))(color: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, mode: https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)`

**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` `[setDither](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setDither(boolean))(dither: 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.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setHotspot](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setHotspot(float, float))(x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`

**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` `[setHotspotBounds](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setHotspotBounds(int, int, int, int))(left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, right: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bottom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**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` `[setTint](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTint(int))(tintColor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**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` `[setTintBlendMode](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintBlendMode(android.graphics.BlendMode))(blendMode: https://developer.android.com/reference/android/graphics/BlendMode.html?)`

**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` `[setTintList](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintList(android.content.res.ColorStateList))(tint: https://developer.android.com/reference/android/content/res/ColorStateList.html?)`

**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` `[setTintMode](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintMode(android.graphics.PorterDuff.Mode))(tintMode: https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html?)`

**This function is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[setVisible](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setVisible(boolean, boolean))(visible: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, restart: 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.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[unscheduleSelf](https://developer.android.com/reference/android/graphics/drawable/Drawable.html#unscheduleSelf(java.lang.Runnable))(what: https://developer.android.com/reference/java/lang/Runnable.html)`

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

### Inherited properties

From [android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#alpha`

**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/android/graphics/drawable/Drawable.html#bounds`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`open https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html?` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#callback`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#changingConfigurations`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`open https://developer.android.com/reference/android/graphics/ColorFilter.html?` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#colorFilter`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`open https://developer.android.com/reference/android/graphics/drawable/Drawable.ConstantState.html?` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#constantState`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`open https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#current`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`open https://developer.android.com/reference/android/graphics/Rect.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#dirtyBounds`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#intrinsicHeight`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#intrinsicWidth`

**This property 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/android/graphics/drawable/Drawable.html#isAutoMirrored`

**This property 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/android/graphics/drawable/Drawable.html#isFilterBitmap`

**This property 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/android/graphics/drawable/Drawable.html#isProjected`

**This property 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/android/graphics/drawable/Drawable.html#isStateful`

**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/android/graphics/drawable/Drawable.html#isVisible`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#layoutDirection`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#level`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#minimumHeight`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#minimumWidth`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`open https://developer.android.com/reference/android/graphics/Insets.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#opticalInsets`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#state`

**This property is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead.
`open https://developer.android.com/reference/android/graphics/Region.html?` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#transparentRegion`

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

## Public companion functions

### getDrawable

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)

```
fun [getDrawable](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getDrawable(android.content.Context,kotlin.Int))(context: Context, id: Int): ComplicationDrawable?
```

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

Creates a ComplicationDrawable from a resource.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html` | The `https://developer.android.com/reference/android/content/Context.html` to load the resource from |
| `id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The id of the resource to load |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable?` | The `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable` loaded from the specified resource id or null if it doesn't exist. |

## Public constructors

### ComplicationDrawable

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)

```
[ComplicationDrawable](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#ComplicationDrawable())()
```

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

Default constructor.

### ComplicationDrawable

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)

```
[ComplicationDrawable](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#ComplicationDrawable(android.content.Context))(context: Context)
```

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

Creates a ComplicationDrawable using the given context. If this constructor is used, calling `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setContext(android.content.Context)` may not be necessary.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html` | The `https://developer.android.com/reference/android/content/Context.html` used to render the complication. |

### ComplicationDrawable

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)

```
[ComplicationDrawable](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#ComplicationDrawable(androidx.wear.watchface.complications.rendering.ComplicationDrawable))(drawable: ComplicationDrawable)
```

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

### draw

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)

```
open fun [draw](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#draw(android.graphics.Canvas))(canvas: Canvas): 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

Draws the complication for the last known time. Last known time is derived from ComplicationDrawable#setCurrentTimeMillis(long)}.

| Parameters |
|---|---|
| `canvas: https://developer.android.com/reference/android/graphics/Canvas.html` | Canvas for the complication to be drawn onto |

### getOpacity

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

```
open fun [getOpacity](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getOpacity())(): Int
```

> [!CAUTION]
> **This function is deprecated.**   
> This method is no longer used in graphics optimizations

### inflate

```
open fun [inflate](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#inflate(android.content.res.Resources,org.xmlpull.v1.XmlPullParser,android.util.AttributeSet,android.content.res.Resources.Theme))(
    r: Resources,
    parser: XmlPullParser,
    attrs: AttributeSet,
    theme: Resources.Theme?
): 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

Inflates this ComplicationDrawable from an XML resource. This can't be called more than once for each ComplicationDrawable. Note that framework may have called this once to create the ComplicationDrawable instance from an XML resource.

| Parameters |
|---|---|
| `r: https://developer.android.com/reference/android/content/res/Resources.html` | Resources used to resolve attribute values |
| `parser: https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html` | XML parser from which to inflate this ComplicationDrawable |
| `attrs: https://developer.android.com/reference/android/util/AttributeSet.html` | Base set of attribute values |
| `theme: https://developer.android.com/reference/android/content/res/Resources.Theme.html?` | Ignored by ComplicationDrawable |

### onTap

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)

```
fun [onTap](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#onTap(kotlin.Int,kotlin.Int))(x: @Px Int, y: @Px Int): 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

Sends the tap action for the complication if tap coordinates are inside the complication bounds.

This method will also highlight the complication. The highlight duration is 300 milliseconds by default but can be modified using the .setHighlightDuration method.

If `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData` has the type `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationType#NO_PERMISSION`, this method will launch an intent to request complication permission for the watch face. This will only work if the context set by `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#getDrawable(android.content.Context,kotlin.Int)` or the constructor is an instance of WatchFaceService.

| Parameters |
|---|---|
| `x: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | X coordinate of the tap relative to screen origin |
| `y: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Y coordinate of the tap relative to screen origin |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the action was successful, `false` if complication data is not set, the complication has no tap action, the tap action (i.e. `https://developer.android.com/reference/android/app/PendingIntent.html`) is cancelled, or the given x and y are not inside the complication bounds. |

### setAlpha

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)

```
open fun [setAlpha](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setAlpha(kotlin.Int))(alpha: @IntRange(from = 0, to = 255) Int): 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

This function is not supported in `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable`.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unsupported-operation-exception/index.html` | when called. |

### setColorFilter

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)

```
open fun [setColorFilter](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setColorFilter(android.graphics.ColorFilter))(colorFilter: ColorFilter?): 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

This function is not supported in `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable`. Use `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationStyle#imageColorFilter()` instead to apply color filter to small and large images.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unsupported-operation-exception/index.html` | when called. |

### setComplicationData

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)

```
fun [setComplicationData](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setComplicationData(androidx.wear.watchface.complications.data.ComplicationData,kotlin.Boolean))(
    complicationData: ComplicationData,
    loadDrawablesAsync: Boolean
): 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

Sets the complication data to be drawn.

| Parameters |
|---|---|
| `complicationData: https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData` | The `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData` to set |
| `loadDrawablesAsync: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | If true any drawables should be loaded asynchronously, otherwise they will be loaded synchronously. |

### setContext

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)

```
fun [setContext](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setContext(android.content.Context))(context: Context): 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

Sets the `https://developer.android.com/reference/android/content/Context.html` used to render the complication. If a context is not set, ComplicationDrawable will throw an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` if one of `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#draw(android.graphics.Canvas)`, `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setBounds(android.graphics.Rect)`, or `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#setComplicationData(androidx.wear.watchface.complications.data.ComplicationData,kotlin.Boolean)` is called.

While this can be called from any context, ideally, a `https://developer.android.com/reference/kotlin/androidx/wear/watchface/WatchFaceService` object should be passed here to allow creating permission dialogs by the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#onTap(kotlin.Int,kotlin.Int)` method, in case current watch face doesn't have the permission to receive complication data.

If this ComplicationDrawable is retrieved using `https://developer.android.com/reference/android/content/res/Resources.html#getDrawable(int)`, this method must be called before calling any of the methods mentioned above.

If this ComplicationDrawable is not inflated from an XML file, this method will reset the style to match the default values, so if ComplicationDrawable(drawable: ComplicationDrawable) is used to construct a ComplicationDrawable, this method should be called right after.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html` | The `https://developer.android.com/reference/android/content/Context.html` used to render the complication. |

## Protected functions

### onBoundsChange

```
protected open fun [onBoundsChange](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#onBoundsChange(android.graphics.Rect))(bounds: Rect): 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

## Public properties

### activeStyle

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 activeStyle: ComplicationStyle
```

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

Returns complication style for active mode.

### ambientStyle

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 ambientStyle: ComplicationStyle
```

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

Returns complication style for ambient mode.

### complicationData

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 complicationData: ComplicationData
```

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

Returns the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData` to be drawn by this ComplicationDrawable. This defaults to `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/NoDataComplicationData`.

### context

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 context: Context?
```

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

Returns the `https://developer.android.com/reference/android/content/Context.html` used to render the complication.

### currentTime

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)

```
var currentTime: Instant
```

> [!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 time in milliseconds since the epoch used for rendering `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData` with time dependent text.

### highlightDuration

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)

```
var highlightDuration: Long
```

> [!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 duration for the complication to stay highlighted after calling the `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/rendering/ComplicationDrawable#onTap(kotlin.Int,kotlin.Int)` method. Default value is 300 milliseconds. Setting highlight duration to 0 disables highlighting.

### isBurnInProtectionOn

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)

```
var isBurnInProtectionOn: 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 complication, when rendering in ambient mode, should apply a style suitable for display on devices with burn in protection.

### isHighlighted

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)

```
var isHighlighted: 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 complication is currently highlighted. This may be called by a watch face when a complication is tapped.

If watch face is in ambient mode, highlight will not be visible even if this is set to `true`, because it may cause burn-in or power inefficiency.

### isInAmbientMode

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)

```
var isInAmbientMode: 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 complication is rendered in ambient mode.

### isLowBitAmbient

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)

```
var isLowBitAmbient: 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 complication, when rendering in ambient mode, should apply a style suitable for low bit ambient mode.

### isRangedValueProgressHidden

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)

```
var isRangedValueProgressHidden: 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

If the ranged value progress should be hidden when `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData` is of type `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationType#RANGED_VALUE`.

ref androidx.wear.watchface.complicationSlots.rendering.R .styleable#ComplicationDrawable_rangedValueProgressHidden

### noDataText

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)

```
var noDataText: CharSequence?
```

> [!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 text to be rendered when `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationData` is of type `https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationType#NO_DATA`. If `noDataText` is null, an empty text will be rendered.

### opacity

Added in 1.0.0 Deprecated in 1.0.0

```
open val opacity: Int
```

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