# 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)

*** ** * ** ***


```
@UnstableApi
public final 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 fields |
|---|---|
| `int` | `https://developer.android.com/reference/androidx/media3/common/util/GlRect#bottom()` |
| `int` | `https://developer.android.com/reference/androidx/media3/common/util/GlRect#left()` |
| `int` | `https://developer.android.com/reference/androidx/media3/common/util/GlRect#right()` |
| `int` | `https://developer.android.com/reference/androidx/media3/common/util/GlRect#top()` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/common/util/GlRect#GlRect(int,int)(int width, int height)` Creates an instance from (0, 0) to the specified width and height. |
| `https://developer.android.com/reference/androidx/media3/common/util/GlRect#GlRect(int,int,int,int)(int left, int bottom, int right, int top)` Creates an instance. |

## Public fields

### bottom

```
public int bottom
```

### left

```
public int left
```

### right

```
public int right
```

### top

```
public int top
```

## Public constructors

### GlRect

```
public GlRect(int width, int height)
```

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

### GlRect

```
public GlRect(int left, int bottom, int right, int top)
```

Creates an instance.