# RoundedCornerCompat

# RoundedCornerCompat

Artifact:[androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core)  
[View Source](https://cs.android.com/search?q=file:androidx/core/view/RoundedCornerCompat.java+class:androidx.core.view.RoundedCornerCompat)  
Added in[1.16.0](https://developer.android.com/jetpack/androidx/releases/core#1.16.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/view/RoundedCornerCompat "View this page in Java")

<br />

```
class RoundedCornerCompat
```

<br />

*** ** * ** ***

Represents a rounded corner of the display.

Note: The center coordinates and radius are an approximation of the actual display corner (based on the display's rounded corner shape).

[RoundedCornerCompat](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat)is immutable.

## Summary

|                                    ### Constants                                    |
|-------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [POSITION_BOTTOM_LEFT](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat#POSITION_BOTTOM_LEFT())` = 3` The rounded corner is at the bottom-left of the screen.    |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [POSITION_BOTTOM_RIGHT](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat#POSITION_BOTTOM_RIGHT())` = 2` The rounded corner is at the bottom-right of the screen. |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [POSITION_TOP_LEFT](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat#POSITION_TOP_LEFT())` = 0` The rounded corner is at the top-left of the screen.             |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [POSITION_TOP_RIGHT](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat#POSITION_TOP_RIGHT())` = 1` The rounded corner is at the top-right of the screen.          |

|                                ### Public functions                                 |
|-------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat#equals(java.lang.Object))`(o: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`!)`                                                                                                             |
| [Point](https://developer.android.com/reference/android/graphics/Point.html)        | [getCenter](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat#getCenter())`()` Returns the circle center of a quarter circle approximation of this[RoundedCornerCompat](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat).                       |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [getCenterX](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat#getCenterX())`()` Returns the x-coordinate of the circle center of a quarter circle approximation of this[RoundedCornerCompat](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat). |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [getCenterY](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat#getCenterY())`()` Returns the y-coordinate of the circle center of a quarter circle approximation of this[RoundedCornerCompat](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat). |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [getPosition](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat#getPosition())`()` Get the position of this[RoundedCornerCompat](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat).                                                              |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [getRadius](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat#getRadius())`()` Returns the radius of a quarter circle approximation of this[RoundedCornerCompat](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat).                              |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [hashCode](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat#hashCode())`()`                                                                                                                                                                                                          |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)   | [toString](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat#toString())`()`                                                                                                                                                                                                          |

## Constants

### POSITION_BOTTOM_LEFT

Added in[1.16.0](https://developer.android.com/jetpack/androidx/releases/core#1.16.0)  

```
const val POSITION_BOTTOM_LEFT = 3: Int
```

The rounded corner is at the bottom-left of the screen.  

### POSITION_BOTTOM_RIGHT

Added in[1.16.0](https://developer.android.com/jetpack/androidx/releases/core#1.16.0)  

```
const val POSITION_BOTTOM_RIGHT = 2: Int
```

The rounded corner is at the bottom-right of the screen.  

### POSITION_TOP_LEFT

Added in[1.16.0](https://developer.android.com/jetpack/androidx/releases/core#1.16.0)  

```
const val POSITION_TOP_LEFT = 0: Int
```

The rounded corner is at the top-left of the screen.  

### POSITION_TOP_RIGHT

Added in[1.16.0](https://developer.android.com/jetpack/androidx/releases/core#1.16.0)  

```
const val POSITION_TOP_RIGHT = 1: Int
```

The rounded corner is at the top-right of the screen.  

## Public functions

### equals

```
fun equals(o: Any!): Boolean
```  

### getCenter

Added in[1.16.0](https://developer.android.com/jetpack/androidx/releases/core#1.16.0)  

```
fun getCenter(): Point
```

Returns the circle center of a quarter circle approximation of this[RoundedCornerCompat](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat).  

|                                   Returns                                    |
|------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Point](https://developer.android.com/reference/android/graphics/Point.html) | the center point of this[RoundedCornerCompat](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat)in the coordinates of the window. |

### getCenterX

Added in[1.16.0](https://developer.android.com/jetpack/androidx/releases/core#1.16.0)  

```
fun getCenterX(): Int
```

Returns the x-coordinate of the circle center of a quarter circle approximation of this[RoundedCornerCompat](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat).  

|                                   Returns                                   |
|-----------------------------------------------------------------------------|----------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | the x-coordinate of the circle center. |

### getCenterY

Added in[1.16.0](https://developer.android.com/jetpack/androidx/releases/core#1.16.0)  

```
fun getCenterY(): Int
```

Returns the y-coordinate of the circle center of a quarter circle approximation of this[RoundedCornerCompat](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat).  

|                                   Returns                                   |
|-----------------------------------------------------------------------------|----------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | the y-coordinate of the circle center. |

### getPosition

Added in[1.16.0](https://developer.android.com/jetpack/androidx/releases/core#1.16.0)  

```
fun getPosition(): Int
```

Get the position of this[RoundedCornerCompat](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat).  

|                                                                See also                                                                |
|----------------------------------------------------------------------------------------------------------------------------------------|---|
| [POSITION_TOP_LEFT](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat#POSITION_TOP_LEFT())         |   |
| [POSITION_TOP_RIGHT](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat#POSITION_TOP_RIGHT())       |   |
| [POSITION_BOTTOM_RIGHT](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat#POSITION_BOTTOM_RIGHT()) |   |
| [POSITION_BOTTOM_LEFT](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat#POSITION_BOTTOM_LEFT())   |   |

### getRadius

Added in[1.16.0](https://developer.android.com/jetpack/androidx/releases/core#1.16.0)  

```
fun getRadius(): Int
```

Returns the radius of a quarter circle approximation of this[RoundedCornerCompat](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat).  

|                                   Returns                                   |
|-----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | the rounded corner radius of this[RoundedCornerCompat](https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat). Returns 0 if there is no rounded corner. |

### hashCode

```
fun hashCode(): Int
```  

### toString

```
fun toString(): String
```