Home
last modified time | relevance | path

Searched refs:rect (Results 1 – 25 of 232) sorted by relevance

12345678910

/frameworks/native/opengl/tests/hwc/
DhwcRects.cpp297 Rectangle rect = parseRect(rectDesc); in main() local
300 rectangle.push_back(rect); in main()
368 Rectangle rect; in parseRect() local
381 rect.format = format->format; in parseRect()
384 rect.displayFrame = hwcTestParseHwcRect(in, error); in parseRect()
393 rect.sourceDim = HwcTestDim(rect.displayFrame.right in parseRect()
394 - rect.displayFrame.left, in parseRect()
395 rect.displayFrame.bottom in parseRect()
396 - rect.displayFrame.top); in parseRect()
397 rect.sourceCrop.left = 0; in parseRect()
[all …]
/frameworks/base/cmds/uiautomator/library/core-src/com/android/uiautomator/core/
DUiObject.java242 Rect rect = getVisibleBounds(); in swipeUp() local
243 if(rect.height() <= SWIPE_MARGIN_LIMIT * 2) in swipeUp()
245 return getInteractionController().swipe(rect.centerX(), in swipeUp()
246 rect.bottom - SWIPE_MARGIN_LIMIT, rect.centerX(), rect.top + SWIPE_MARGIN_LIMIT, in swipeUp()
270 Rect rect = getVisibleBounds(); in swipeDown() local
271 if(rect.height() <= SWIPE_MARGIN_LIMIT * 2) in swipeDown()
273 return getInteractionController().swipe(rect.centerX(), in swipeDown()
274 rect.top + SWIPE_MARGIN_LIMIT, rect.centerX(), in swipeDown()
275 rect.bottom - SWIPE_MARGIN_LIMIT, steps); in swipeDown()
298 Rect rect = getVisibleBounds(); in swipeLeft() local
[all …]
DUiScrollable.java421 Rect rect = new Rect(); in scrollForward() local
422 node.getBoundsInScreen(rect); in scrollForward()
432 int swipeAreaAdjust = (int)(rect.height() * getSwipeDeadZonePercentage()); in scrollForward()
434 downX = rect.centerX(); in scrollForward()
435 downY = rect.bottom - swipeAreaAdjust; in scrollForward()
436 upX = rect.centerX(); in scrollForward()
437 upY = rect.top + swipeAreaAdjust; in scrollForward()
439 int swipeAreaAdjust = (int)(rect.width() * getSwipeDeadZonePercentage()); in scrollForward()
442 downX = rect.right - swipeAreaAdjust; in scrollForward()
443 downY = rect.centerY(); in scrollForward()
[all …]
/frameworks/minikin/tests/unittest/
DLayoutTest.cpp68 MinikinRect rect; in TEST_F() local
83 layout.getBounds(&rect); in TEST_F()
84 EXPECT_EQ(0.0f, rect.mLeft); in TEST_F()
85 EXPECT_EQ(0.0f, rect.mTop); in TEST_F()
86 EXPECT_EQ(70.0f, rect.mRight); in TEST_F()
87 EXPECT_EQ(10.0f, rect.mBottom); in TEST_F()
102 layout.getBounds(&rect); in TEST_F()
103 EXPECT_EQ(0.0f, rect.mLeft); in TEST_F()
104 EXPECT_EQ(0.0f, rect.mTop); in TEST_F()
105 EXPECT_EQ(90.0f, rect.mRight); in TEST_F()
[all …]
/frameworks/base/graphics/java/android/graphics/
DLargeBitmap.java52 public Bitmap decodeRegion(Rect rect, BitmapFactory.Options options) { in decodeRegion() argument
54 if (rect.left < 0 || rect.top < 0 || rect.right > getWidth() || rect.bottom > getHeight()) in decodeRegion()
56 return nativeDecodeRegion(mNativeLargeBitmap, rect.left, rect.top, in decodeRegion()
57 rect.right - rect.left, rect.bottom - rect.top, options); in decodeRegion()
DOutline.java180 public void setRect(@NonNull Rect rect) { in setRect() argument
181 setRect(rect.left, rect.top, rect.right, rect.bottom); in setRect()
207 public void setRoundRect(@NonNull Rect rect, float radius) { in setRoundRect() argument
208 setRoundRect(rect.left, rect.top, rect.right, rect.bottom, radius); in setRoundRect()
269 public void setOval(@NonNull Rect rect) { in setOval() argument
270 setOval(rect.left, rect.top, rect.right, rect.bottom); in setOval()
DYuvImage.java214 private void adjustRectangle(Rect rect) { in adjustRectangle() argument
215 int width = rect.width(); in adjustRectangle()
216 int height = rect.height(); in adjustRectangle()
221 rect.left &= ~1; in adjustRectangle()
222 rect.top &= ~1; in adjustRectangle()
223 rect.right = rect.left + width; in adjustRectangle()
224 rect.bottom = rect.top + height; in adjustRectangle()
230 rect.left &= ~1; in adjustRectangle()
231 rect.right = rect.left + width; in adjustRectangle()
DBitmapRegionDecoder.java187 public Bitmap decodeRegion(Rect rect, BitmapFactory.Options options) { in decodeRegion() argument
191 if (rect.right <= 0 || rect.bottom <= 0 || rect.left >= getWidth() in decodeRegion()
192 || rect.top >= getHeight()) in decodeRegion()
194 return nativeDecodeRegion(mNativeBitmapRegionDecoder, rect.left, rect.top, in decodeRegion()
195 rect.right - rect.left, rect.bottom - rect.top, options); in decodeRegion()
/frameworks/native/libs/ui/
DGraphicBuffer.cpp229 status_t GraphicBuffer::lock(uint32_t inUsage, const Rect& rect, void** vaddr) in lock() argument
231 if (rect.left < 0 || rect.right > width || in lock()
232 rect.top < 0 || rect.bottom > height) { in lock()
234 rect.left, rect.top, rect.right, rect.bottom, in lock()
238 status_t res = getBufferMapper().lock(handle, inUsage, rect, vaddr); in lock()
249 status_t GraphicBuffer::lockYCbCr(uint32_t inUsage, const Rect& rect, in lockYCbCr() argument
252 if (rect.left < 0 || rect.right > width || in lockYCbCr()
253 rect.top < 0 || rect.bottom > height) { in lockYCbCr()
255 rect.left, rect.top, rect.right, rect.bottom, in lockYCbCr()
259 status_t res = getBufferMapper().lockYCbCr(handle, inUsage, rect, ycbcr); in lockYCbCr()
[all …]
/frameworks/support/v17/leanback/src/android/support/v17/leanback/graphics/
DBoundsRule.java116 public void calculateBounds(Rect rect, Rect result) { in calculateBounds() argument
118 result.left = rect.left; in calculateBounds()
120 result.left = doCalculate(rect.left, left, rect.width()); in calculateBounds()
124 result.right = rect.right; in calculateBounds()
126 result.right = doCalculate(rect.left, right, rect.width()); in calculateBounds()
130 result.top = rect.top; in calculateBounds()
132 result.top = doCalculate(rect.top, top, rect.height()); in calculateBounds()
136 result.bottom = rect.bottom; in calculateBounds()
138 result.bottom = doCalculate(rect.top, bottom, rect.height()); in calculateBounds()
/frameworks/base/libs/hwui/tests/unit/
DSnapshotTests.cpp33 ClipRect rect(Rect(0, 0, 75, 75)); in TEST() local
36 &rect, Matrix4::identity()); in TEST()
38 EXPECT_EQ(Rect(50, 50, 75, 75), intersectWithChild->rect) << "Expect intersect with child"; in TEST()
41 rect.intersectWithRoot = true; in TEST()
44 &rect, Matrix4::identity()); in TEST()
46 EXPECT_EQ(Rect(10, 10, 75, 75), intersectWithRoot->rect) << "Expect intersect with root"; in TEST()
55 ClipRect rect(Rect(0, 0, 75, 75)); in TEST() local
59 child->applyClip(&rect, Matrix4::identity()); in TEST()
66 rect.intersectWithRoot = true; in TEST()
69 child->applyClip(&rect, Matrix4::identity()); in TEST()
DVectorDrawableAtlasTests.cpp46 ASSERT_TRUE(VDRects[i].rect.width() == 10 && VDRects[i].rect.height() == 10); in RENDERTHREAD_SKIA_PIPELINE_TEST()
52 ASSERT_FALSE(VDRects[i].rect.intersect(VDRects[j].rect)); in RENDERTHREAD_SKIA_PIPELINE_TEST()
73 ASSERT_EQ(VDRects[i].rect, VDRect.rect); in RENDERTHREAD_SKIA_PIPELINE_TEST()
83 ASSERT_TRUE(VDRects[i].rect.width() == 10 && VDRects[i].rect.height() == 10); in RENDERTHREAD_SKIA_PIPELINE_TEST()
85 ASSERT_FALSE(VDRects[i].rect.intersect(VDRects[j].rect)); in RENDERTHREAD_SKIA_PIPELINE_TEST()
106 ASSERT_TRUE(VDRects[i].rect.width() == 10 && VDRects[i].rect.height() == 10); in RENDERTHREAD_SKIA_PIPELINE_TEST()
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/views/
DTaskViewTransform.java63 public RectF rect = new RectF(); field in TaskViewTransform
75 rect.set(tv.getLeft(), tv.getTop(), tv.getRight(), tv.getBottom()); in fillIn()
88 rect.set(other.rect); in copyFrom()
100 && rect.equals(other.rect); in isSame()
113 rect.setEmpty(); in reset()
130 return ((int) rect.left != v.getLeft()) || ((int) rect.right != v.getRight()) || in hasRectChangedFrom()
131 ((int) rect.top != v.getTop()) || ((int) rect.bottom != v.getBottom()); in hasRectChangedFrom()
156 v.setLeftTopRightBottom((int) rect.left, (int) rect.top, (int) rect.right, in applyToTaskView()
157 (int) rect.bottom); in applyToTaskView()
178 rect.round(toViewRect); in applyToTaskView()
[all …]
/frameworks/base/core/java/com/android/internal/widget/
DNotificationExpandButton.java59 private void extendRectToMinTouchSize(Rect rect) { in extendRectToMinTouchSize() argument
61 rect.left = rect.centerX() - touchTargetSize / 2; in extendRectToMinTouchSize()
62 rect.right = rect.left + touchTargetSize; in extendRectToMinTouchSize()
63 rect.top = rect.centerY() - touchTargetSize / 2; in extendRectToMinTouchSize()
64 rect.bottom = rect.top + touchTargetSize; in extendRectToMinTouchSize()
/frameworks/base/core/jni/
Dandroid_view_TextureView.cpp146 Rect rect(Rect::EMPTY_RECT); in android_view_TextureView_lockCanvas() local
148 rect.left = GET_INT(dirtyRect, gRectClassInfo.left); in android_view_TextureView_lockCanvas()
149 rect.top = GET_INT(dirtyRect, gRectClassInfo.top); in android_view_TextureView_lockCanvas()
150 rect.right = GET_INT(dirtyRect, gRectClassInfo.right); in android_view_TextureView_lockCanvas()
151 rect.bottom = GET_INT(dirtyRect, gRectClassInfo.bottom); in android_view_TextureView_lockCanvas()
153 rect.set(Rect(0x3FFF, 0x3FFF)); in android_view_TextureView_lockCanvas()
157 int32_t status = native_window_lock(window.get(), &buffer, &rect); in android_view_TextureView_lockCanvas()
173 nativeCanvas->clipRect(rect.left, rect.top, rect.right, rect.bottom, in android_view_TextureView_lockCanvas()
178 int(rect.left), int(rect.top), int(rect.right), int(rect.bottom)); in android_view_TextureView_lockCanvas()
/frameworks/native/services/vr/hardware_composer/aidl/android/dvr/
Dparcelable_composer_layer.cpp94 for (auto& rect: layer_.visible_regions) { in writeToParcel() local
95 ret = parcel->writeInt32(rect.left); in writeToParcel()
96 ret = parcel->writeInt32(rect.top); in writeToParcel()
97 ret = parcel->writeInt32(rect.right); in writeToParcel()
98 ret = parcel->writeInt32(rect.bottom); in writeToParcel()
105 for (auto& rect: layer_.damaged_regions) { in writeToParcel() local
106 ret = parcel->writeInt32(rect.left); in writeToParcel()
107 ret = parcel->writeInt32(rect.top); in writeToParcel()
108 ret = parcel->writeInt32(rect.right); in writeToParcel()
109 ret = parcel->writeInt32(rect.bottom); in writeToParcel()
[all …]
/frameworks/base/core/java/android/hardware/camera2/utils/
DParamsUtils.java64 public static Rect createRect(RectF rect) { in createRect() argument
65 checkNotNull(rect, "rect must not be null"); in createRect()
68 rect.roundOut(r); in createRect()
86 public static Rect mapRect(Matrix transform, Rect rect) { in mapRect() argument
88 checkNotNull(rect, "rect must not be null"); in mapRect()
90 RectF rectF = new RectF(rect); in mapRect()
105 public static Size createSize(Rect rect) { in createSize() argument
106 checkNotNull(rect, "rect must not be null"); in createSize()
108 return new Size(rect.width(), rect.height()); in createSize()
/frameworks/base/graphics/java/android/graphics/drawable/shapes/
DOvalShape.java37 canvas.drawOval(rect(), paint); in draw()
42 final RectF rect = rect(); in getOutline() local
43 outline.setOval((int) Math.ceil(rect.left), (int) Math.ceil(rect.top), in getOutline()
44 (int) Math.floor(rect.right), (int) Math.floor(rect.bottom)); in getOutline()
DRectShape.java43 final RectF rect = rect(); in getOutline() local
44 outline.setRect((int) Math.ceil(rect.left), (int) Math.ceil(rect.top), in getOutline()
45 (int) Math.floor(rect.right), (int) Math.floor(rect.bottom)); in getOutline()
56 protected final RectF rect() { in rect() method in RectShape
/frameworks/base/libs/hwui/
DRect.h76 inline Rect(const SkIRect& rect): // NOLINT, implicit in Rect() argument
77 left(rect.fLeft), in Rect()
78 top(rect.fTop), in Rect()
79 right(rect.fRight), in Rect()
80 bottom(rect.fBottom) { in Rect()
83 inline Rect(const SkRect& rect): // NOLINT, implicit in Rect() argument
84 left(rect.fLeft), in Rect()
85 top(rect.fTop), in Rect()
86 right(rect.fRight), in Rect()
87 bottom(rect.fBottom) { in Rect()
[all …]
DSkiaCanvasProxy.cpp86 void SkiaCanvasProxy::onDrawOval(const SkRect& rect, const SkPaint& paint) { in onDrawOval() argument
87 mCanvas->drawOval(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, paint); in onDrawOval()
90 void SkiaCanvasProxy::onDrawRect(const SkRect& rect, const SkPaint& paint) { in onDrawRect() argument
91 mCanvas->drawRect(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, paint); in onDrawRect()
96 const SkRect& rect = roundRect.rect(); in onDrawRRect() local
98 mCanvas->drawRoundRect(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, in onDrawRRect()
107 void SkiaCanvasProxy::onDrawArc(const SkRect& rect, SkScalar startAngle, SkScalar sweepAngle, in onDrawArc() argument
109 mCanvas->drawArc(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, in onDrawArc()
218 SkRect rect; in getSaveLayerStrategy() local
220 rect = *saveLayerRec.fBounds; in getSaveLayerStrategy()
[all …]
/frameworks/base/core/tests/coretests/src/android/widget/scroll/
DRequestRectangleVisible.java43 final Rect rect = new Rect(); in onCreate() local
61 rect.set(0, 0, childToMakeVisible.getLeft(), childToMakeVisible.getHeight()); in onCreate()
62 childToMakeVisible.requestRectangleOnScreen(rect, true); in onCreate()
69 rect.set(0, 0, topBlob.getWidth(), topBlob.getHeight()); in onCreate()
70 topBlob.requestRectangleOnScreen(rect, true); in onCreate()
77 rect.set(0, 0, childToMakeVisible.getLeft(), childToMakeVisible.getHeight()); in onCreate()
78 childToMakeVisible.requestRectangleOnScreen(rect, true); in onCreate()
85 rect.set(0, 0, bottomBlob.getWidth(), bottomBlob.getHeight()); in onCreate()
86 bottomBlob.requestRectangleOnScreen(rect, true); in onCreate()
/frameworks/base/core/java/android/view/
DAppTransitionAnimationSpec.java19 public final Rect rect; field in AppTransitionAnimationSpec
21 public AppTransitionAnimationSpec(int taskId, GraphicBuffer buffer, Rect rect) { in AppTransitionAnimationSpec() argument
23 this.rect = rect; in AppTransitionAnimationSpec()
29 rect = in.readParcelable(null); in AppTransitionAnimationSpec()
41 dest.writeParcelable(rect, 0 /* flags */); in writeToParcel()
58 return "{taskId: " + taskId + ", buffer: " + buffer + ", rect: " + rect + "}"; in toString()
/frameworks/opt/setupwizard/library/recyclerview/test/instrumentation/src/com/android/setupwizardlib/template/
DRecyclerMixinTest.java107 Rect rect = new Rect(); in testDividerLegacyInset() local
108 insetDrawable.getPadding(rect); in testDividerLegacyInset()
110 assertEquals(new Rect(123, 0, 0, 0), rect); in testDividerLegacyInset()
123 Rect rect = new Rect(); in testDividerInsets() local
124 insetDrawable.getPadding(rect); in testDividerInsets()
126 assertEquals(new Rect(123, 0, 456, 0), rect); in testDividerInsets()
141 Rect rect = new Rect(); in testDividerInsetLegacyRtl() local
142 insetDrawable.getPadding(rect); in testDividerInsetLegacyRtl()
144 assertEquals(new Rect(0, 0, 123, 0), rect); in testDividerInsetLegacyRtl()
162 Rect rect = new Rect(); in testDividerInsetsRtl() local
[all …]
/frameworks/base/core/tests/coretests/src/android/widget/listview/
DListItemRequestRectAboveThinFirstItemTest.java62 final Rect rect = new Rect(); in testSecondItemRequestRectAboveTop() local
63 second.getDrawingRect(rect); in testSecondItemRequestRectAboveTop()
64 rect.offset(0, -2 * second.getBottom()); in testSecondItemRequestRectAboveTop()
66 getActivity().requestRectangleOnScreen(1, rect); in testSecondItemRequestRectAboveTop()
87 final Rect rect = new Rect(); in testSecondToLastItemRequestRectBelowBottom() local
88 secondToLast.getDrawingRect(rect); in testSecondToLastItemRequestRectBelowBottom()
89 rect.offset(0, in testSecondToLastItemRequestRectBelowBottom()
93 getActivity().requestRectangleOnScreen(secondToLastIndex, rect); in testSecondToLastItemRequestRectBelowBottom()

12345678910