/frameworks/native/libs/ui/tests/ |
D | Rect_test.cpp | 28 const Rect rect; in TEST() local 29 EXPECT_FALSE(rect.isValid()); in TEST() 30 EXPECT_TRUE(rect.isEmpty()); in TEST() 34 const Rect rect(100, 200); in TEST() local 35 EXPECT_TRUE(rect.isValid()); in TEST() 36 EXPECT_FALSE(rect.isEmpty()); in TEST() 37 EXPECT_EQ(0, rect.top); in TEST() 38 EXPECT_EQ(0, rect.left); in TEST() 39 EXPECT_EQ(100, rect.right); in TEST() 40 EXPECT_EQ(200, rect.bottom); in TEST() [all …]
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/animation/ |
D | FloatProperties.kt | 41 override fun setValue(rect: Rect?, value: Float) { in setValue() 42 rect?.offsetTo(value.toInt(), rect.top) in setValue() 45 override fun getValue(rect: Rect?): Float { in getValue() 46 return rect?.left?.toFloat() ?: -Float.MAX_VALUE in getValue() 60 override fun setValue(rect: Rect?, value: Float) { in setValue() 61 rect?.offsetTo(rect.left, value.toInt()) in setValue() 64 override fun getValue(rect: Rect?): Float { in getValue() 65 return rect?.top?.toFloat() ?: -Float.MAX_VALUE in getValue() 77 override fun getValue(rect: Rect): Float { in getValue() 78 return rect.width().toFloat() in getValue() [all …]
|
/frameworks/native/opengl/tests/hwc/ |
D | hwcRects.cpp | 297 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/native/services/surfaceflinger/tests/utils/ |
D | ScreenshotUtils.h | 100 void expectColor(const Rect& rect, const Color& color, uint8_t tolerance = 0) { 104 TransactionUtils::expectBufferColor(mOutBuffer, mPixels, rect, color, tolerance); 107 void expectBorder(const Rect& rect, const Color& color, uint8_t tolerance = 0) { 110 const bool leftBorder = rect.left > 0; 111 const bool topBorder = rect.top > 0; 112 const bool rightBorder = rect.right < int32_t(mOutBuffer->getWidth()); 113 const bool bottomBorder = rect.bottom < int32_t(mOutBuffer->getHeight()); 116 Rect top(rect.left, rect.top - 1, rect.right, rect.top); 126 Rect left(rect.left - 1, rect.top, rect.left, rect.bottom); 130 Rect right(rect.right, rect.top, rect.right + 1, rect.bottom); [all …]
|
/frameworks/base/cmds/uiautomator/library/core-src/com/android/uiautomator/core/ |
D | UiObject.java | 242 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 …]
|
D | UiScrollable.java | 421 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/ |
D | LayoutTest.cpp | 61 MinikinRect rect; in TEST_F() local 75 getBounds(text, Bidi::LTR, paint, &rect); in TEST_F() 76 EXPECT_EQ(0.0f, rect.mLeft); in TEST_F() 77 EXPECT_EQ(-10.0f, rect.mTop); in TEST_F() 78 EXPECT_EQ(70.0f, rect.mRight); in TEST_F() 79 EXPECT_EQ(0.0f, rect.mBottom); in TEST_F() 94 getBounds(text, Bidi::LTR, paint, &rect); in TEST_F() 95 EXPECT_EQ(0.0f, rect.mLeft); in TEST_F() 96 EXPECT_EQ(-10.0f, rect.mTop); in TEST_F() 97 EXPECT_EQ(90.0f, rect.mRight); in TEST_F() [all …]
|
/frameworks/native/services/surfaceflinger/CompositionEngine/tests/ |
D | ProjectionSpaceTest.cpp | 28 Rect getSideStrip(const Rect& rect, ui::Rotation rotation) { in getSideStrip() argument 32 height = rect.height(); in getSideStrip() 34 width = rect.width(); in getSideStrip() 39 return Rect(rect.left, rect.top, rect.left + width, rect.top + height); in getSideStrip() 43 return Rect(rect.right, rect.top, rect.right + width, rect.top + height); in getSideStrip() 47 return Rect(rect.left, rect.bottom, rect.left + width, rect.bottom + height); in getSideStrip() 93 const Rect rect(10, 20, 40, 100); in TEST() local 94 EXPECT_EQ(getSideStrip(rect, ui::ROTATION_0), Rect(10, 20, 40, 20)); in TEST() 95 EXPECT_EQ(getSideStrip(rect, ui::ROTATION_90), Rect(40, 20, 40, 100)); in TEST() 96 EXPECT_EQ(getSideStrip(rect, ui::ROTATION_180), Rect(10, 100, 40, 100)); in TEST() [all …]
|
/frameworks/base/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/ |
D | GlowingCard.kt | 54 val rect = RectF(0f, 0f, width.toFloat(), height.toFloat()) in onDraw() constant 62 paint.shader = LinearGradient(rect.left, rect.bottom, rect.right, rect.top, in onDraw() 66 canvas.drawRoundRect(rect, radius, radius, paint) in onDraw() 69 rect.inset(3.dp(), 3.dp()) in onDraw() 74 canvas.drawRoundRect(rect, radius, radius, paint) in onDraw() 76 rect.inset(5.dp(), 5.dp()) in onDraw() 82 "${Color.blue(glowColor)}}", rect.left, rect.centerY(), paint) in onDraw() 83 canvas.drawText("(press to activate)", rect.left, rect.bottom, paint) in onDraw()
|
D | RadialGlow.kt | 63 val rect = RectF(0f, 0f, width.toFloat(), height.toFloat()) in onDraw() constant 66 canvas.drawRoundRect(rect, radius, radius, paint) in onDraw() 72 canvas.translate(rect.width() * frac, rect.height() - (rect.height() * frac)) in onDraw() 80 val innerRect = RectF(rect) in onDraw() 81 innerRect.inset(rect.width() / 4, rect.height() / 4) in onDraw() 85 canvas.drawText("Tap to toggle animation", rect.centerX(), innerRect.top - 4.dp(), paint) in onDraw() 86 canvas.drawText("Outside text", rect.centerX(), rect.bottom - 4.dp(), paint) in onDraw()
|
/frameworks/native/libs/ui/include/ui/ |
D | FloatRect.h | 60 static inline void PrintTo(const FloatRect& rect, ::std::ostream* os) { in PrintTo() argument 61 *os << "FloatRect(" << rect.left << ", " << rect.top << ", " << rect.right << ", " in PrintTo() 62 << rect.bottom << ")"; in PrintTo() 71 size_t operator()(const android::FloatRect& rect) const { 72 return android::hashCombine(rect.left, rect.top, rect.right, rect.bottom);
|
/frameworks/native/libs/ui/include_vndk/ui/ |
D | FloatRect.h | 60 static inline void PrintTo(const FloatRect& rect, ::std::ostream* os) { in PrintTo() argument 61 *os << "FloatRect(" << rect.left << ", " << rect.top << ", " << rect.right << ", " in PrintTo() 62 << rect.bottom << ")"; in PrintTo() 71 size_t operator()(const android::FloatRect& rect) const { 72 return android::hashCombine(rect.left, rect.top, rect.right, rect.bottom);
|
/frameworks/native/include/ui/ |
D | FloatRect.h | 60 static inline void PrintTo(const FloatRect& rect, ::std::ostream* os) { in PrintTo() argument 61 *os << "FloatRect(" << rect.left << ", " << rect.top << ", " << rect.right << ", " in PrintTo() 62 << rect.bottom << ")"; in PrintTo() 71 size_t operator()(const android::FloatRect& rect) const { 72 return android::hashCombine(rect.left, rect.top, rect.right, rect.bottom);
|
/frameworks/base/graphics/java/android/graphics/ |
D | Outline.java | 181 public void setRect(@NonNull Rect rect) { in setRect() argument 182 setRect(rect.left, rect.top, rect.right, rect.bottom); in setRect() 208 public void setRoundRect(@NonNull Rect rect, float radius) { in setRoundRect() argument 209 setRoundRect(rect.left, rect.top, rect.right, rect.bottom, radius); in setRoundRect() 270 public void setOval(@NonNull Rect rect) { in setOval() argument 271 setOval(rect.left, rect.top, rect.right, rect.bottom); in setOval()
|
/frameworks/base/core/jni/ |
D | android_view_TextureView.cpp | 112 Rect rect(Rect::EMPTY_RECT); in android_view_TextureView_lockCanvas() local 114 rect.left = GET_INT(dirtyRect, gRectClassInfo.left); in android_view_TextureView_lockCanvas() 115 rect.top = GET_INT(dirtyRect, gRectClassInfo.top); in android_view_TextureView_lockCanvas() 116 rect.right = GET_INT(dirtyRect, gRectClassInfo.right); in android_view_TextureView_lockCanvas() 117 rect.bottom = GET_INT(dirtyRect, gRectClassInfo.bottom); in android_view_TextureView_lockCanvas() 119 rect.set(Rect(0x3FFF, 0x3FFF)); in android_view_TextureView_lockCanvas() 124 int32_t status = native_window_lock(window.get(), &outBuffer, &rect); in android_view_TextureView_lockCanvas() 129 canvas.clipRect({rect.left, rect.top, rect.right, rect.bottom}); in android_view_TextureView_lockCanvas() 133 int(rect.left), int(rect.top), int(rect.right), int(rect.bottom)); in android_view_TextureView_lockCanvas()
|
/frameworks/base/graphics/java/android/graphics/drawable/shapes/ |
D | OvalShape.java | 37 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()
|
D | RectShape.java | 45 final RectF rect = rect(); in getOutline() local 46 outline.setRect((int) Math.ceil(rect.left), (int) Math.ceil(rect.top), in getOutline() 47 (int) Math.floor(rect.right), (int) Math.floor(rect.bottom)); in getOutline() 58 protected final RectF rect() { in rect() method in RectShape
|
/frameworks/native/libs/ui/ |
D | GraphicBuffer.cpp | 304 status_t GraphicBuffer::lock(uint32_t inUsage, const Rect& rect, void** vaddr, in lock() argument 306 if (rect.left < 0 || rect.right > width || in lock() 307 rect.top < 0 || rect.bottom > height) { in lock() 309 rect.left, rect.top, rect.right, rect.bottom, in lock() 314 return lockAsync(inUsage, rect, vaddr, -1, outBytesPerPixel, outBytesPerStride); in lock() 324 status_t GraphicBuffer::lockYCbCr(uint32_t inUsage, const Rect& rect, in lockYCbCr() argument 327 if (rect.left < 0 || rect.right > width || in lockYCbCr() 328 rect.top < 0 || rect.bottom > height) { in lockYCbCr() 330 rect.left, rect.top, rect.right, rect.bottom, in lockYCbCr() 334 return lockAsyncYCbCr(inUsage, rect, ycbcr, -1); in lockYCbCr() [all …]
|
/frameworks/base/core/java/android/hardware/camera2/utils/ |
D | ParamsUtils.java | 64 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/core/tests/coretests/src/android/widget/scroll/ |
D | RequestRectangleVisible.java | 43 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/libs/hwui/ |
D | Rect.h | 60 inline Rect(const SkIRect& rect) // NOLINT(google-explicit-constructor) in Rect() argument 62 left(rect.fLeft) in Rect() 63 , top(rect.fTop) in Rect() 64 , right(rect.fRight) in Rect() 65 , bottom(rect.fBottom) {} in Rect() 67 inline Rect(const SkRect& rect) // NOLINT(google-explicit-constructor) in Rect() argument 69 left(rect.fLeft) in Rect() 70 , top(rect.fTop) in Rect() 71 , right(rect.fRight) in Rect() 72 , bottom(rect.fBottom) {} in Rect() [all …]
|
/frameworks/base/core/java/android/view/ |
D | AppTransitionAnimationSpec.java | 20 public final Rect rect; field in AppTransitionAnimationSpec 23 public AppTransitionAnimationSpec(int taskId, HardwareBuffer buffer, Rect rect) { in AppTransitionAnimationSpec() argument 25 this.rect = rect; in AppTransitionAnimationSpec() 31 rect = in.readTypedObject(Rect.CREATOR); in AppTransitionAnimationSpec() 43 dest.writeTypedObject(rect, 0 /* flags */); in writeToParcel() 60 return "{taskId: " + taskId + ", buffer: " + buffer + ", rect: " + rect + "}"; in toString()
|
/frameworks/base/core/tests/coretests/src/android/widget/listview/ |
D | ListItemRequestRectAboveThinFirstItemTest.java | 62 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()
|
/frameworks/base/tests/graphics/SilkFX/src/com/android/test/silkfx/common/ |
D | HDRIndicator.kt | 38 val rect = RectF(0f, 0f, width.toFloat(), height.toFloat()) in onDraw() constant 44 canvas.drawText("H", rect.left, rect.bottom, paint) in onDraw() 46 canvas.drawText("D", rect.left + height.toFloat(), rect.bottom, paint) in onDraw() 48 canvas.drawText("R", rect.left + height.toFloat() * 2, rect.bottom, paint) in onDraw()
|
/frameworks/opt/setupwizard/library/recyclerview/test/instrumentation/src/com/android/setupwizardlib/template/ |
D | RecyclerMixinTest.java | 104 Rect rect = new Rect(); in testDividerLegacyInset() local 105 insetDrawable.getPadding(rect); in testDividerLegacyInset() 107 assertEquals(new Rect(123, 0, 0, 0), rect); in testDividerLegacyInset() 120 Rect rect = new Rect(); in testDividerInsets() local 121 insetDrawable.getPadding(rect); in testDividerInsets() 123 assertEquals(new Rect(123, 0, 456, 0), rect); in testDividerInsets() 138 Rect rect = new Rect(); in testDividerInsetLegacyRtl() local 139 insetDrawable.getPadding(rect); in testDividerInsetLegacyRtl() 141 assertEquals(new Rect(0, 0, 123, 0), rect); in testDividerInsetLegacyRtl() 159 Rect rect = new Rect(); in testDividerInsetsRtl() local [all …]
|