# RoundRectComplicationTapFilter

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.RoundRectComplicationTapFilter) 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 class RoundRectComplicationTapFilter implements 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/androidx/wear/watchface/ComplicationTapFilter` for `https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlotBoundsType#ROUND_RECT()` complicationSlots.

use Watch Face Format instead

## Summary

| ### Public constructors |
|---|
| `[RoundRectComplicationTapFilter](https://developer.android.com/reference/androidx/wear/watchface/RoundRectComplicationTapFilter#RoundRectComplicationTapFilter())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public methods |
|---|---|
| `boolean` | `[hitTest](https://developer.android.com/reference/androidx/wear/watchface/RoundRectComplicationTapFilter#hitTest(androidx.wear.watchface.ComplicationSlot,android.graphics.Rect,kotlin.Int,kotlin.Int,kotlin.Boolean))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot complicationSlot, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Rect.html screenBounds, @https://developer.android.com/reference/androidx/annotation/Px int x, @https://developer.android.com/reference/androidx/annotation/Px int y, boolean includeMargins )` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Inherited methods |
|---|
| From [androidx.wear.watchface.ComplicationTapFilter](https://developer.android.com/reference/androidx/wear/watchface/ComplicationTapFilter) |---|---| | `boolean` | `[hitTest](https://developer.android.com/reference/androidx/wear/watchface/ComplicationTapFilter#hitTest(androidx.wear.watchface.ComplicationSlot,android.graphics.Rect,kotlin.Int,kotlin.Int))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/watchface/ComplicationSlot complicationSlot, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Rect.html screenBounds, @https://developer.android.com/reference/androidx/annotation/Px int x, @https://developer.android.com/reference/androidx/annotation/Px int y )` **This method is deprecated.** hitTest without specifying includeMargins is deprecated | |

## Public constructors

### RoundRectComplicationTapFilter

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 [RoundRectComplicationTapFilter](https://developer.android.com/reference/androidx/wear/watchface/RoundRectComplicationTapFilter#RoundRectComplicationTapFilter())()
```

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

## Public methods

### hitTest

```
public boolean [hitTest](https://developer.android.com/reference/androidx/wear/watchface/RoundRectComplicationTapFilter#hitTest(androidx.wear.watchface.ComplicationSlot,android.graphics.Rect,kotlin.Int,kotlin.Int,kotlin.Boolean))(
    @NonNull ComplicationSlot complicationSlot,
    @NonNull Rect screenBounds,
    @Px int x,
    @Px int y,
    boolean includeMargins
)
```

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

Performs a hit test, returning `true` if the supplied coordinates in pixels are within the the provided `https://developer.android.com/reference/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/androidx/wear/watchface/ComplicationTapFilter#hitTest(androidx.wear.watchface.ComplicationSlot,android.graphics.Rect,kotlin.Int,kotlin.Int,kotlin.Boolean)`.

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