# ARect

Rectangular window area.

## Summary

This is the NDK equivalent of the android.graphics.Rect class in Java. It is used with [ANativeActivityCallbacks::onContentRectChanged](https://developer.android.com/ndk/reference/struct/a-native-activity-callbacks#struct_a_native_activity_callbacks_1ab3d27ef8d2c5d0307127a81dc1b96022) event callback and the [ANativeWindow_lock()](https://developer.android.com/ndk/reference/group/a-native-window#group___a_native_window_1gae08841e6125415ef4c23da62c9b2f9b8) function.

In a valid [ARect](https://developer.android.com/ndk/reference/struct/a-rect#struct_a_rect), left \<= right and top \<= bottom. [ARect](https://developer.android.com/ndk/reference/struct/a-rect#struct_a_rect) with left=0, top=10, right=1, bottom=11 contains only one pixel at x=0, y=10.

| ### Public attributes ||
|---|---|
| `https://developer.android.com/ndk/reference/struct/a-rect#struct_a_rect_1a910571bfe9fdef7502b092e819d77f55` | `int32_t` Maximum Y coordinate of the rectangle. |
| `https://developer.android.com/ndk/reference/struct/a-rect#struct_a_rect_1ac5725bccc4d03aec82f8829f791008db` | `int32_t` Minimum X coordinate of the rectangle. |
| `https://developer.android.com/ndk/reference/struct/a-rect#struct_a_rect_1a519cf60478d938bf5a0b62ccccc5f98d` | `int32_t` Maximum X coordinate of the rectangle. |
| `https://developer.android.com/ndk/reference/struct/a-rect#struct_a_rect_1a1c71212555a876f4f3260bf18a374dbd` | `int32_t` Minimum Y coordinate of the rectangle. |

## Public attributes

### bottom

Declared in `android/rect.h`

```scdoc
int32_t ARect::bottom
```
Maximum Y coordinate of the rectangle.

### left

Declared in `android/rect.h`

```scdoc
int32_t ARect::left
```
Minimum X coordinate of the rectangle.

### right

Declared in `android/rect.h`

```scdoc
int32_t ARect::right
```
Maximum X coordinate of the rectangle.

### top

Declared in `android/rect.h`

```scdoc
int32_t ARect::top
```
Minimum Y coordinate of the rectangle.