Stay organized with collections
Save and categorize content based on your preferences.
ARect
Rectangular window area.
Summary
This is the NDK equivalent of the android.graphics.Rect class in Java. It is used with ANativeActivityCallbacks::onContentRectChanged event callback and the ANativeWindow_lock() function.
In a valid ARect, left <= right and top <= bottom. ARect with left=0, top=10, right=1, bottom=11 contains only one pixel at x=0, y=10.
Public attributes
|
bottom
|
int32_t
Maximum Y coordinate of the rectangle.
|
left
|
int32_t
Minimum X coordinate of the rectangle.
|
right
|
int32_t
Maximum X coordinate of the rectangle.
|
top
|
int32_t
Minimum Y coordinate of the rectangle.
|
Public attributes
bottom
Declared in android/rect.h
int32_t ARect::bottom
Maximum Y coordinate of the rectangle.
left
Declared in android/rect.h
int32_t ARect::left
Minimum X coordinate of the rectangle.
right
Declared in android/rect.h
int32_t ARect::right
Maximum X coordinate of the rectangle.
top
Declared in android/rect.h
int32_t ARect::top
Minimum Y coordinate of the rectangle.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-11-19 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-19 UTC."],[],[],null,["# ARect Struct Reference\n\nARect\n=====\n\nRectangular window area.\n\nSummary\n-------\n\nThis is the NDK equivalent of the android.graphics.Rect class in Java. It is used with [ANativeActivityCallbacks::onContentRectChanged](/ndk/reference/struct/a-native-activity-callbacks#struct_a_native_activity_callbacks_1ab3d27ef8d2c5d0307127a81dc1b96022) event callback and the [ANativeWindow_lock()](/ndk/reference/group/a-native-window#group___a_native_window_1ga0b0e3b7d442dee83e1a1b42e5b0caee6) function.\n\nIn a valid [ARect](/ndk/reference/struct/a-rect#struct_a_rect), left \\\u003c= right and top \\\u003c= bottom. [ARect](/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.\n\n| ### Public attributes ||\n|-------------------------------------------------------------|--------------------------------------------------|\n| [bottom](#struct_a_rect_1a910571bfe9fdef7502b092e819d77f55) | `int32_t` Maximum Y coordinate of the rectangle. |\n| [left](#struct_a_rect_1ac5725bccc4d03aec82f8829f791008db) | `int32_t` Minimum X coordinate of the rectangle. |\n| [right](#struct_a_rect_1a519cf60478d938bf5a0b62ccccc5f98d) | `int32_t` Maximum X coordinate of the rectangle. |\n| [top](#struct_a_rect_1a1c71212555a876f4f3260bf18a374dbd) | `int32_t` Minimum Y coordinate of the rectangle. |\n\nPublic attributes\n-----------------\n\n### bottom\n\nDeclared in `android/rect.h` \n\n```scdoc\nint32_t ARect::bottom\n``` \nMaximum Y coordinate of the rectangle. \n\n### left\n\nDeclared in `android/rect.h` \n\n```scdoc\nint32_t ARect::left\n``` \nMinimum X coordinate of the rectangle. \n\n### right\n\nDeclared in `android/rect.h` \n\n```scdoc\nint32_t ARect::right\n``` \nMaximum X coordinate of the rectangle. \n\n### top\n\nDeclared in `android/rect.h` \n\n```scdoc\nint32_t ARect::top\n``` \nMinimum Y coordinate of the rectangle."]]