# GlRect

# GlRect

Artifact:[androidx.media3:media3-common](https://developer.android.com/jetpack/androidx/releases/media3)  
[View Source](https://cs.android.com/search?q=file:androidx/media3/common/util/GlRect.java+class:androidx.media3.common.util.GlRect)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/common/util/GlRect "View this page in Java")

<br />

```
@UnstableApi
class GlRect
```

<br />

*** ** * ** ***

Represents a rectangle by the coordinates of its 4 edges (left, bottom, right, top).

Note that the right and top coordinates are exclusive.

This class represents coordinates in the OpenGL coordinate convention:`left <= right`and`bottom <= top`.

## Summary

|                                                                                                                                                                                                                                     ### Public constructors                                                                                                                                                                                                                                      |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [GlRect](https://developer.android.com/reference/kotlin/androidx/media3/common/util/GlRect#GlRect(int,int))`(width: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, height: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Creates an instance from (0, 0) to the specified width and height.                                                                                                                                    |
| [GlRect](https://developer.android.com/reference/kotlin/androidx/media3/common/util/GlRect#GlRect(int,int,int,int))`(left: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, bottom: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, right: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, top: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Creates an instance. |

|                            ### Public properties                            |
|-----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [bottom](https://developer.android.com/reference/kotlin/androidx/media3/common/util/GlRect#bottom()) |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [left](https://developer.android.com/reference/kotlin/androidx/media3/common/util/GlRect#left())     |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [right](https://developer.android.com/reference/kotlin/androidx/media3/common/util/GlRect#right())   |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [top](https://developer.android.com/reference/kotlin/androidx/media3/common/util/GlRect#top())       |

## Public constructors

### GlRect

```
GlRect(width: Int, height: Int)
```

Creates an instance from (0, 0) to the specified width and height.  

### GlRect

```
GlRect(left: Int, bottom: Int, right: Int, top: Int)
```

Creates an instance.  

## Public properties

### bottom

```
val bottom: Int
```  

### left

```
val left: Int
```  

### right

```
val right: Int
```  

### top

```
val top: Int
```