# BackgroundComplicationTapFilter

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/ComplicationSlot.kt+class:androidx.wear.watchface.BackgroundComplicationTapFilter) 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)

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/androidx/wear/watchface/BackgroundComplicationTapFilter "View this page in Java")


```
class BackgroundComplicationTapFilter : ComplicationTapFilter
```

<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

Default `https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationTapFilter` for `https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlotBoundsType#BACKGROUND()` complicationSlots.

use Watch Face Format instead

## Summary

| ### Public constructors |
|---|
| `[BackgroundComplicationTapFilter](https://developer.android.com/reference/kotlin/androidx/wear/watchface/BackgroundComplicationTapFilter#BackgroundComplicationTapFilter())()` **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/-boolean/index.html` | `[hitTest](https://developer.android.com/reference/kotlin/androidx/wear/watchface/BackgroundComplicationTapFilter#hitTest(androidx.wear.watchface.ComplicationSlot,android.graphics.Rect,kotlin.Int,kotlin.Int,kotlin.Boolean))( complicationSlot: https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot, screenBounds: https://developer.android.com/reference/android/graphics/Rect.html, 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, includeMargins: 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. |

| ### Inherited functions |
|---|
| From [androidx.wear.watchface.ComplicationTapFilter](https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationTapFilter) |---|---| | `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `[hitTest](https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationTapFilter#hitTest(androidx.wear.watchface.ComplicationSlot,android.graphics.Rect,kotlin.Int,kotlin.Int))( complicationSlot: https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot, screenBounds: https://developer.android.com/reference/android/graphics/Rect.html, 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.** hitTest without specifying includeMargins is deprecated | |

## Public constructors

### BackgroundComplicationTapFilter

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)

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

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

### hitTest

```
open fun [hitTest](https://developer.android.com/reference/kotlin/androidx/wear/watchface/BackgroundComplicationTapFilter#hitTest(androidx.wear.watchface.ComplicationSlot,android.graphics.Rect,kotlin.Int,kotlin.Int,kotlin.Boolean))(
    complicationSlot: ComplicationSlot,
    screenBounds: Rect,
    x: @Px Int,
    y: @Px Int,
    includeMargins: Boolean
): 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

Performs a hit test, returning `true` if the supplied coordinates in pixels are within the the provided `https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationTapFilter#hitTest(androidx.wear.watchface.ComplicationSlot,android.graphics.Rect,kotlin.Int,kotlin.Int,kotlin.Boolean)` scaled to `https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationTapFilter#hitTest(androidx.wear.watchface.ComplicationSlot,android.graphics.Rect,kotlin.Int,kotlin.Int,kotlin.Boolean)`.

| Parameters |
|---|---|
| `complicationSlot: https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot` | The `https://developer.android.com/reference/kotlin/androidx/wear/watchface/ComplicationSlot` to perform a hit test for. |
| `screenBounds: https://developer.android.com/reference/android/graphics/Rect.html` | A `https://developer.android.com/reference/android/graphics/Rect.html` describing the bounds of the display. |
| `x: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The screen space X coordinate in pixels. |
| `y: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The screen space Y coordinate in pixels. |
| `includeMargins: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether or not the margins should be included |