Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/view/RoundedRectBlurRegion#pubctors) \| [Methods](https://developer.android.com/reference/android/view/RoundedRectBlurRegion#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/view/RoundedRectBlurRegion#inhmethods)

# RoundedRectBlurRegion

*** ** * ** ***


`
public

final

class
RoundedRectBlurRegion
`


`


`

`

extends https://developer.android.com/reference/android/view/BlurRegion


`

`


`

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.view.BlurRegion](https://developer.android.com/reference/android/view/BlurRegion) ||
|   | ↳ | android.view.RoundedRectBlurRegion |

<br />

*** ** * ** ***

Defines a rounded rectangular blur region on the SurfaceView.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/view/RoundedRectBlurRegion#RoundedRectBlurRegion()() ` Constructs a new `RoundedRectBlurRegion` with the default parameters. |
| ` https://developer.android.com/reference/android/view/RoundedRectBlurRegion#RoundedRectBlurRegion(android.graphics.RectF,%20float[],%20float,%20float)(https://developer.android.com/reference/android/graphics/RectF rect, float[] cornerRadii, float alpha, float blurRadius) ` Constructs a new `RoundedRectBlurRegion` with the specified rounded rectangle coordinates and corner radii. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/view/RoundedRectBlurRegion` | ` https://developer.android.com/reference/android/view/RoundedRectBlurRegion#copy()() ` Returns a deep copy of this blur region. |
| ` https://developer.android.com/reference/android/graphics/RectF` | ` https://developer.android.com/reference/android/view/RoundedRectBlurRegion#getBounds()() ` Returns the bounds of the blur region. |
| ` float[]` | ` https://developer.android.com/reference/android/view/RoundedRectBlurRegion#getCornerRadii()() ` Returns the corner radii for the blur region. |
| ` void` | ` https://developer.android.com/reference/android/view/RoundedRectBlurRegion#setBounds(android.graphics.RectF)(https://developer.android.com/reference/android/graphics/RectF rect) ` Sets the bounds of the blur region. |
| ` void` | ` https://developer.android.com/reference/android/view/RoundedRectBlurRegion#setCornerRadii(float[])(float[] cornerRadii) ` Sets the corner radii for the blur region. |
| ` void` | ` https://developer.android.com/reference/android/view/RoundedRectBlurRegion#setCornerRadii(float)(float cornerRadius) ` Sets the corner radius for all corners of the blur region. |

### Inherited methods

From class `

https://developer.android.com/reference/android/view/BlurRegion

` `
abstract


https://developer.android.com/reference/android/view/BlurRegion` `
https://developer.android.com/reference/android/view/BlurRegion#copy()()
`

Returns a deep copy of this blur region.


`


boolean` `
https://developer.android.com/reference/android/view/BlurRegion#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object o)
`

Indicates whether some other object is "equal to" this one.


`


float` `
https://developer.android.com/reference/android/view/BlurRegion#getAlpha()()
`

Returns the alpha for this region.


`


float` `
https://developer.android.com/reference/android/view/BlurRegion#getBlurRadius()()
`

Returns the blur radius for this region.


`


int` `
https://developer.android.com/reference/android/view/BlurRegion#hashCode()()
`

Returns a hash code value for the object.


`


void` `
https://developer.android.com/reference/android/view/BlurRegion#setAlpha(float)(float alpha)
`

Sets the alpha for this region.


`


void` `
https://developer.android.com/reference/android/view/BlurRegion#setBlurRadius(float)(float blurRadius)
`

Sets the blur radius for this region.


From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


## Public constructors

### RoundedRectBlurRegion

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public RoundedRectBlurRegion ()
```

Constructs a new `RoundedRectBlurRegion` with the default parameters.

The default bounds and all corner radii are 0.0f.

The default alpha is 1.0f and the default blur radius is 0.0f.

<br />

### RoundedRectBlurRegion

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public RoundedRectBlurRegion (RectF rect, 
                float[] cornerRadii, 
                float alpha, 
                float blurRadius)
```

Constructs a new `RoundedRectBlurRegion` with the specified rounded rectangle
coordinates and corner radii.

The `cornerRadii` values are ordered \[topLeftX, topLeftY, topRightX, topRightY,
bottomLeftX, bottomLeftY, bottomRightX, bottomRightY\].

<br />

| Parameters ||
|---|---|
| `rect` | `RectF`: bounds of the blur region. This value cannot be `null`. <br /> |
| `cornerRadii` | `float`: array of 8 floats representing the corner radii. This value cannot be `null`. <br /> |
| `alpha` | `float`: alpha value of the region \[0.0 - 1.0\]. Value is between 0.0f and 1.0f inclusive <br /> |
| `blurRadius` | `float`: the blur radius in pixels <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if `cornerRadii` is `null` or its length is not 8 or `rect` is `null` |

## Public methods

### copy

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public RoundedRectBlurRegion copy ()
```

Returns a deep copy of this blur region.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/RoundedRectBlurRegion` | This value cannot be `null`. <br /> |

### getBounds

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public RectF getBounds ()
```

Returns the bounds of the blur region.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/RectF` | `https://developer.android.com/reference/android/graphics/RectF` containing the bounds. This value cannot be `null`. <br /> |

### getCornerRadii

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float[] getCornerRadii ()
```

Returns the corner radii for the blur region.

<br />

| Returns ||
|---|---|
| `float[]` | array of 8 floats representing the corner radii. This value cannot be `null`. <br /> |

### setBounds

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setBounds (RectF rect)
```

Sets the bounds of the blur region.

The default value is an empty rectangle.

<br />

| Parameters ||
|---|---|
| `rect` | `RectF`: the bounds of the blur region. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if `rect` is `null` |

### setCornerRadii

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCornerRadii (float[] cornerRadii)
```

Sets the corner radii for the blur region.

The `cornerRadii` values are ordered \[topLeftX, topLeftY, topRightX, topRightY,
bottomLeftX, bottomLeftY, bottomRightX, bottomRightY\].

The default value is all zeros.

<br />

| Parameters ||
|---|---|
| `cornerRadii` | `float`: array of 8 floats representing the corner radii. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if `cornerRadii` is `null` or its length is not 8 |

### setCornerRadii

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCornerRadii (float cornerRadius)
```

Sets the corner radius for all corners of the blur region.

<br />

| Parameters ||
|---|---|
| `cornerRadius` | `float`: radius in pixels. <br /> |