Home
last modified time | relevance | path

Searched refs:Rect (Results 1 – 25 of 1019) sorted by relevance

12345678910>>...41

/frameworks/base/core/tests/coretests/src/android/view/
DFocusFinderTest.java19 import android.graphics.Rect;
43 new Rect(0, 30, 10, 40), // src (left, top, right, bottom) in testBelowNotCandidateForDirectionUp()
44 new Rect(0, 50, 10, 60)); // dest (left, top, right, bottom) in testBelowNotCandidateForDirectionUp()
49 final Rect src = new Rect(0, 30, 10, 40); in testAboveShareEdgeEdgeOkForDirectionUp()
51 final Rect dest = new Rect(src); in testAboveShareEdgeEdgeOkForDirectionUp()
63 new Rect(0, 0, 50, 50), in testCompletelyContainedNotCandidate()
64 new Rect(0, 1, 50, 49)); in testCompletelyContainedNotCandidate()
72 new Rect(0, 0, 50, 50), in testContinaedWithCommonBottomNotCandidate()
73 new Rect(0, 1, 50, 50)); in testContinaedWithCommonBottomNotCandidate()
81 new Rect(0, 0, 50, 50), in testOverlappingIsCandidateWhenBothEdgesAreInDirection()
[all …]
DInsetsSourceTest.java26 import android.graphics.Rect;
61 mSource.setFrame(new Rect(0, 0, 500, 100)); in testCalculateInsetsTop()
62 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsTop()
69 mSource.setFrame(new Rect(0, 400, 500, 500)); in testCalculateInsetsBottom()
70 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsBottom()
77 mSource.setFrame(new Rect(0, 0, 100, 500)); in testCalculateInsetsLeft()
78 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsLeft()
85 mSource.setFrame(new Rect(400, 0, 500, 500)); in testCalculateInsetsRight()
86 Insets insets = mSource.calculateInsets(new Rect(0, 0, 500, 500), in testCalculateInsetsRight()
93 mSource.setFrame(new Rect(0, 0, 500, 100)); in testCalculateInsets_overextend()
[all …]
DInsetsStateTest.java43 import android.graphics.Rect;
75 mState.getSource(ITYPE_STATUS_BAR).setFrame(new Rect(0, 0, 100, 100)); in testCalculateInsets()
77 mState.getSource(ITYPE_IME).setFrame(new Rect(0, 200, 100, 300)); in testCalculateInsets()
80 WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, in testCalculateInsets()
95 mState.getSource(ITYPE_NAVIGATION_BAR).setFrame(new Rect(0, 200, 100, 300)); in testCalculateInsets_imeAndNav()
97 mState.getSource(ITYPE_IME).setFrame(new Rect(0, 100, 100, 300)); in testCalculateInsets_imeAndNav()
99 WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, in testCalculateInsets_imeAndNav()
114 mState.getSource(ITYPE_STATUS_BAR).setFrame(new Rect(0, 0, 100, 100)); in testCalculateInsets_navRightStatusTop()
116 mState.getSource(ITYPE_NAVIGATION_BAR).setFrame(new Rect(80, 0, 100, 300)); in testCalculateInsets_navRightStatusTop()
118 WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, in testCalculateInsets_navRightStatusTop()
[all …]
DDisplayCutoutTest.java33 import android.graphics.Rect;
61 private static final Rect ZERO_RECT = new Rect();
67 new Rect(9, 0, 10, 1) /* boundTop */,
77 Rect safeInsets = new Rect(10, 0, 0, 0); in testExtractBoundsFromList_left()
78 Rect bound = new Rect(0, 80, 10, 120); in testExtractBoundsFromList_left()
80 equalTo(new Rect[]{bound, ZERO_RECT, ZERO_RECT, ZERO_RECT})); in testExtractBoundsFromList_left()
85 Rect safeInsets = new Rect(0, 10, 0, 0); in testExtractBoundsFromList_top()
86 Rect bound = new Rect(80, 0, 120, 10); in testExtractBoundsFromList_top()
88 equalTo(new Rect[]{ZERO_RECT, bound, ZERO_RECT, ZERO_RECT})); in testExtractBoundsFromList_top()
93 Rect safeInsets = new Rect(0, 0, 10, 0); in testExtractBoundsFromList_right()
[all …]
DScrollCaptureTargetResolverTest.java28 import android.graphics.Rect;
77 ScrollCaptureTarget target1 = createTarget(callback1, new Rect(20, 30, 40, 50), in testNoValidTargets()
82 callback2.setScrollBounds(new Rect()); in testNoValidTargets()
83 ScrollCaptureTarget target2 = createTarget(callback2, new Rect(20, 30, 40, 50), in testNoValidTargets()
103 new Rect(20, 30, 40, 50), new Point(10, 10), in testSingleTarget()
105 callback.setScrollBounds(new Rect(2, 2, 18, 18)); in testSingleTarget()
118 new Rect(2, 2, 18, 18), result.getScrollBounds()); in testSingleTarget()
125 new Rect(20, 30, 40, 50), new Point(10, 10), in testSingleTarget_backgroundThread()
128 callback1.setScrollBounds(new Rect(2, 2, 18, 18)); in testSingleTarget_backgroundThread()
142 new Rect(2, 2, 18, 18), result.getScrollBounds()); in testSingleTarget_backgroundThread()
[all …]
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DTaskSnapshotSurfaceTest.java42 import android.graphics.Rect;
68 private void setupSurface(int width, int height, Rect contentInsets, int sysuiVis, in setupSurface()
69 int windowFlags, Rect taskBounds) { in setupSurface()
104 setupSurface(width, height, new Rect(), 0, FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, in setupSurface()
105 new Rect(0, 0, width, height)); in setupSurface()
114 mSurface.drawBackgroundAndBars(mockCanvas, new Rect(0, 0, 100, 200)); in fillEmptyBackground_fillHorizontally()
124 mSurface.drawBackgroundAndBars(mockCanvas, new Rect(0, 0, 200, 100)); in fillEmptyBackground_fillVertically()
134 mSurface.drawBackgroundAndBars(mockCanvas, new Rect(0, 0, 100, 100)); in fillEmptyBackground_fillBoth()
145 mSurface.drawBackgroundAndBars(mockCanvas, new Rect(0, 0, 100, 100)); in fillEmptyBackground_dontFill_sameSize()
155 mSurface.drawBackgroundAndBars(mockCanvas, new Rect(0, 0, 200, 200)); in fillEmptyBackground_dontFill_bitmapLarger()
[all …]
DLetterboxTest.java30 import android.graphics.Rect;
59 mLetterbox.layout(new Rect(0, 0, 10, 50), new Rect(0, 2, 10, 45), new Point(1000, 2000)); in testOverlappingWith_usesGlobalCoordinates()
60 assertTrue(mLetterbox.isOverlappingWith(new Rect(0, 0, 1, 1))); in testOverlappingWith_usesGlobalCoordinates()
69 final Rect outer = new Rect(0, 0, 10, 50); in testNotIntersectsOrFullyContains_usesGlobalCoordinates()
72 final Rect topBar = new Rect(0, 0, 10, 2); in testNotIntersectsOrFullyContains_usesGlobalCoordinates()
73 final Rect bottomBar = new Rect(0, 45, 10, 50); in testNotIntersectsOrFullyContains_usesGlobalCoordinates()
74 final Rect leftBar = new Rect(0, 0, 2, 50); in testNotIntersectsOrFullyContains_usesGlobalCoordinates()
75 final Rect rightBar = new Rect(8, 0, 10, 50); in testNotIntersectsOrFullyContains_usesGlobalCoordinates()
105 final Rect mOuter;
106 final Rect mInner = new Rect();
[all …]
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/utils/
DDisplayRotationUtilTest.java33 import android.graphics.Rect;
49 private static final Rect ZERO_RECT = new Rect();
103 Rect[] bounds = new Rect[] {ZERO_RECT, new Rect(50, 0, 150, 10), ZERO_RECT, ZERO_RECT}; in testGetRotatedBounds_top_rot0()
111 Rect[] bounds = new Rect[] {ZERO_RECT, new Rect(50, 0, 150, 10), ZERO_RECT, ZERO_RECT}; in testGetRotatedBounds_top_rot90()
113 equalTo(new Rect[] {new Rect(0, 50, 10, 150), ZERO_RECT, ZERO_RECT, ZERO_RECT})); in testGetRotatedBounds_top_rot90()
119 Rect[] bounds = new Rect[] {ZERO_RECT, new Rect(50, 0, 150, 10), ZERO_RECT, ZERO_RECT}; in testGetRotatedBounds_top_rot180()
121 equalTo(new Rect[] {ZERO_RECT, ZERO_RECT, ZERO_RECT, new Rect(50, 290, 150, 300)})); in testGetRotatedBounds_top_rot180()
127 Rect[] bounds = new Rect[] {ZERO_RECT, new Rect(50, 0, 150, 10), ZERO_RECT, ZERO_RECT}; in testGetRotatedBounds_top_rot270()
129 equalTo(new Rect[] {ZERO_RECT, ZERO_RECT, new Rect(290, 50, 300, 150), ZERO_RECT})); in testGetRotatedBounds_top_rot270()
135 Rect[] bounds = new Rect[] {new Rect(0, 50, 10, 150), ZERO_RECT, ZERO_RECT, ZERO_RECT}; in testGetRotatedBounds_left_rot0()
[all …]
DWmDisplayCutoutTest.java32 import android.graphics.Rect;
50 private static final Rect ZERO_RECT = new Rect();
53 null /* boundLeft */, new Rect(50, 0, 75, 100) /* boundTop */,
60 .calculateRelativeTo(new Rect(5, 5, 95, 195)); in calculateRelativeTo_top()
62 assertEquals(new Rect(0, 15, 0, 0), cutout.getDisplayCutout().getSafeInsets()); in calculateRelativeTo_top()
69 .calculateRelativeTo(new Rect(5, 5, 195, 95)); in calculateRelativeTo_left()
71 assertEquals(new Rect(15, 0, 0, 0), cutout.getDisplayCutout().getSafeInsets()); in calculateRelativeTo_left()
78 .calculateRelativeTo(new Rect(5, 5, 95, 195)); in calculateRelativeTo_bottom()
80 assertEquals(new Rect(0, 0, 0, 15), cutout.getDisplayCutout().getSafeInsets()); in calculateRelativeTo_bottom()
87 .calculateRelativeTo(new Rect(5, 5, 195, 95)); in calculateRelativeTo_right()
[all …]
DInsetUtilsTest.java26 import android.graphics.Rect;
43 final Rect rect1 = new Rect(10, 20, 30, 40); in testAdd()
44 final Rect rect2 = new Rect(50, 60, 70, 80); in testAdd()
46 assertEquals(new Rect(60, 80, 100, 120), rect1); in testAdd()
51 final Rect original = new Rect(1, 2, 3, 4); in rotate()
55 final Rect rot90 = rotateCopy(original, ROTATION_90); in rotate()
56 assertEquals("rot90", new Rect(2, 3, 4, 1), rot90); in rotate()
58 final Rect rot180 = rotateCopy(original, ROTATION_180); in rotate()
59 assertEquals("rot180", new Rect(3, 4, 1, 2), rot180); in rotate()
62 final Rect rot270 = rotateCopy(original, ROTATION_270); in rotate()
[all …]
/frameworks/base/services/core/java/com/android/server/wm/
DWindowFrames.java32 import android.graphics.Rect;
57 public final Rect mParentFrame = new Rect();
66 public final Rect mDisplayFrame = new Rect();
72 public final Rect mVisibleFrame = new Rect();
78 public final Rect mDecorFrame = new Rect();
84 public final Rect mContentFrame = new Rect();
90 public final Rect mStableFrame = new Rect();
97 final Rect mContainingFrame = new Rect();
102 final Rect mFrame = new Rect();
107 final Rect mLastFrame = new Rect();
[all …]
DDisplayFrames.java25 import android.graphics.Rect;
45 public final Rect mUnrestricted = new Rect();
52 public final Rect mRestricted = new Rect();
58 public final Rect mSystem = new Rect();
61 public final Rect mStable = new Rect();
67 public final Rect mStableFullscreen = new Rect();
73 public final Rect mCurrent = new Rect();
81 public final Rect mContent = new Rect();
87 public final Rect mVoiceContent = new Rect();
90 public final Rect mDock = new Rect();
[all …]
/frameworks/native/libs/ui/
DRect.cpp22 const Rect Rect::INVALID_RECT{0, 0, -1, -1};
23 const Rect Rect::EMPTY_RECT{0, 0, 0, 0};
33 void Rect::makeInvalid() { in makeInvalid()
40 bool Rect::operator <(const Rect& rhs) const { in operator <()
59 Rect& Rect::offsetTo(int32_t x, int32_t y) { in offsetTo()
67 Rect& Rect::offsetBy(int32_t x, int32_t y) { in offsetBy()
75 Rect& Rect::inset(int32_t _left, int32_t _top, int32_t _right, int32_t _bottom) { in inset()
83 const Rect Rect::operator +(const Point& rhs) const { in operator +()
84 const Rect result(left + rhs.x, top + rhs.y, right + rhs.x, bottom + rhs.y); in operator +()
88 const Rect Rect::operator -(const Point& rhs) const { in operator -()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/view/
DScrollViewCaptureHelperTest.java32 import android.graphics.Rect;
122 Rect scrollBounds = svc.onComputeScrollBounds(mTarget); in onPrepareForStart()
126 static void assertEmpty(Rect r) { in assertEmpty()
132 static void assertContains(Rect parent, Rect child) { in assertContains()
138 static void assertRectEquals(Rect parent, Rect child) { in assertRectEquals()
144 static Rect getVisibleRect(View v) { in getVisibleRect()
145 Rect r = new Rect(0, 0, v.getWidth(), v.getHeight()); in getVisibleRect()
159 static void assertCapturedAreaCompletelyVisible(int startScrollY, Rect requestRect, in assertCapturedAreaCompletelyVisible()
160 Rect localVisibleNow) { in assertCapturedAreaCompletelyVisible()
161 Rect captured = new Rect(localVisibleNow); in assertCapturedAreaCompletelyVisible()
[all …]
/frameworks/native/libs/ui/include/ui/
DRect.h35 class Rect : public ARect, public LightFlattenablePod<Rect>
40 static const Rect INVALID_RECT;
41 static const Rect EMPTY_RECT;
46 inline Rect() : Rect(INVALID_RECT) {} in Rect() function
49 inline Rect(T w, T h) { in Rect() function
61 inline Rect(int32_t l, int32_t t, int32_t r, int32_t b) { in Rect() function
68 inline Rect(const Point& lt, const Point& rb) { in Rect() function
75 inline explicit Rect(const FloatRect& floatRect) { in Rect() function
84 inline explicit Rect(const ui::Size& size) { in Rect() function
122 inline Rect getBounds() const { in getBounds()
[all …]
/frameworks/native/include/ui/
DRect.h35 class Rect : public ARect, public LightFlattenablePod<Rect>
40 static const Rect INVALID_RECT;
41 static const Rect EMPTY_RECT;
46 inline Rect() : Rect(INVALID_RECT) {} in Rect() function
49 inline Rect(T w, T h) { in Rect() function
61 inline Rect(int32_t l, int32_t t, int32_t r, int32_t b) { in Rect() function
68 inline Rect(const Point& lt, const Point& rb) { in Rect() function
75 inline explicit Rect(const FloatRect& floatRect) { in Rect() function
84 inline explicit Rect(const ui::Size& size) { in Rect() function
122 inline Rect getBounds() const { in getBounds()
[all …]
/frameworks/native/libs/ui/include_vndk/ui/
DRect.h35 class Rect : public ARect, public LightFlattenablePod<Rect>
40 static const Rect INVALID_RECT;
41 static const Rect EMPTY_RECT;
46 inline Rect() : Rect(INVALID_RECT) {} in Rect() function
49 inline Rect(T w, T h) { in Rect() function
61 inline Rect(int32_t l, int32_t t, int32_t r, int32_t b) { in Rect() function
68 inline Rect(const Point& lt, const Point& rb) { in Rect() function
75 inline explicit Rect(const FloatRect& floatRect) { in Rect() function
84 inline explicit Rect(const ui::Size& size) { in Rect() function
122 inline Rect getBounds() const { in getBounds()
[all …]
/frameworks/base/core/java/android/view/
DDisplayCutout.java35 import android.graphics.Rect;
71 private static final Rect ZERO_RECT = new Rect();
99 private final Rect mSafeInsets;
145 private final Rect[] mRects;
147 private Bounds(Rect left, Rect top, Rect right, Rect bottom, boolean copyArguments) { in Bounds()
148 mRects = new Rect[BOUNDS_POSITION_LENGTH]; in Bounds()
156 private Bounds(Rect[] rects, boolean copyArguments) { in Bounds()
162 mRects = new Rect[BOUNDS_POSITION_LENGTH]; in Bounds()
164 mRects[i] = new Rect(rects[i]); in Bounds()
167 for (Rect rect : rects) { in Bounds()
[all …]
DFocusFinderHelper.java19 import android.graphics.Rect;
36 public boolean isBetterCandidate(int direction, Rect source, Rect rect1, Rect rect2) { in isBetterCandidate()
40 public boolean beamBeats(int direction, Rect source, Rect rect1, Rect rect2) { in beamBeats()
44 public boolean isCandidate(Rect srcRect, Rect destRect, int direction) { in isCandidate()
48 public boolean beamsOverlap(int direction, Rect rect1, Rect rect2) { in beamsOverlap()
52 public static int majorAxisDistance(int direction, Rect source, Rect dest) { in majorAxisDistance()
56 public static int majorAxisDistanceToFarEdge(int direction, Rect source, Rect dest) { in majorAxisDistanceToFarEdge()
/frameworks/base/core/java/android/hardware/camera2/legacy/
DParameterUtils.java21 import android.graphics.Rect;
51 public static final Rect NORMALIZED_RECTANGLE_DEFAULT = new Rect(
58 new Camera.Area(new Rect(NORMALIZED_RECTANGLE_DEFAULT),
61 public static final Rect RECTANGLE_EMPTY =
62 new Rect(/*left*/0, /*top*/0, /*right*/0, /*bottom*/0);
73 public final Rect previewCrop;
75 public final Rect reportedCrop;
79 public ZoomData(int zoomIndex, Rect previewCrop, Rect reportedCrop, in ZoomData()
102 public final Rect previewMetering;
108 public final Rect reportedMetering;
[all …]
/frameworks/native/libs/ui/tests/
DRegion_test.cpp28 void checkVertTJunction(const Rect* lhs, const Rect* rhs) { in checkVertTJunction()
34 for (const Rect* current = r.begin(); current < r.end(); current++) { in verifyNoTJunctions()
35 for (const Rect* other = current - 1; other >= r.begin(); other--) { in verifyNoTJunctions()
40 for (const Rect* other = current + 1; other < r.end(); other++) { in verifyNoTJunctions()
63 r.orSelf(Rect(1, 0, 2, 1)); in TEST_F()
64 r.orSelf(Rect(0, 1, 3, 2)); in TEST_F()
71 r.orSelf(Rect(1, 0, 2, 1)); in TEST_F()
72 r.orSelf(Rect(0, 2, 3, 3)); in TEST_F()
80 r.orSelf(Rect(100, 100, 500, 500)); in TEST_F()
91 r.orSelf(Rect(1, 0, 2, 1)); in TEST_F()
[all …]
/frameworks/native/services/surfaceflinger/tests/
DMirrorLayer_test.cpp39 t.setCrop_legacy(mChildLayer, Rect(0, 0, 400, 400)).show(mChildLayer); in SetUp()
61 .setCrop_legacy(grandchild, Rect(0, 0, 200, 200)) in TEST_F()
80 shot->expectColor(Rect(550, 550, 750, 750), Color::BLUE); in TEST_F()
82 shot->expectColor(Rect(750, 750, 950, 950), Color::GREEN); in TEST_F()
91 shot->expectColor(Rect(550, 550, 750, 750), Color::WHITE); in TEST_F()
93 shot->expectColor(Rect(750, 750, 950, 950), Color::GREEN); in TEST_F()
102 shot->expectColor(Rect(550, 550, 750, 750), Color::WHITE); in TEST_F()
104 shot->expectColor(Rect(750, 750, 950, 950), Color::BLACK); in TEST_F()
113 shot->expectColor(Rect(550, 550, 750, 750), Color::BLACK); in TEST_F()
115 shot->expectColor(Rect(750, 750, 950, 950), Color::BLACK); in TEST_F()
[all …]
DLayerRenderTypeTransaction_test.cpp58 const Rect rect(0, 0, 32, 32); in TEST_P()
67 const Rect rect(5, 10, 37, 42); in TEST_P()
86 getScreenCapture()->expectColor(Rect(0, 0, 32, 32), Color::RED); in TEST_P()
92 getScreenCapture()->expectColor(Rect(1, 1, 33, 33), Color::RED); in TEST_P()
123 getScreenCapture()->expectColor(Rect(0, 0, 2, 2), Color::RED); in TEST_P()
129 getScreenCapture()->expectColor(Rect(mDisplayWidth - 2, mDisplayHeight - 2, mDisplayWidth, in TEST_P()
146 const Rect rect(5, 10, 37, 42); in TEST_P()
154 getScreenCapture()->expectColor(Rect(5, 10, 69, 74), Color::RED); in TEST_P()
167 const Rect rect(0, 0, 32, 32); in TEST_P()
176 const Rect rect(0, 0, 64, 64); in TEST_P()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
DFloatingContentCoordinator.kt3 import android.graphics.Rect in <lambda>()
47 fun getFloatingBoundsOnScreen(): Rect in <lambda>()
54 fun getAllowedFloatingBoundsRegion(): Rect in <lambda>()
65 fun moveToBounds(bounds: Rect) in <lambda>()
86 overlappingContentBounds: Rect, in <lambda>()
87 otherContentBounds: List<Rect> in <lambda>()
88 ): Rect { in <lambda>()
98 private val allContentBounds: MutableMap<FloatingContent, Rect> = HashMap() in <lambda>()
170 fun getOccupiedBounds(): Collection<Rect> { in <lambda>()
186 content != fromContent && Rect.intersects(conflictingNewBounds, bounds) } in <lambda>()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/wm/
DDisplayLayoutTest.java31 import android.graphics.Rect;
51 assertEquals(new Rect(0, 0, 0, 0), dl.stableInsets()); in testInsets()
52 assertEquals(new Rect(0, 0, 0, 0), dl.nonDecorInsets()); in testInsets()
56 assertEquals(new Rect(0, 40, 0, 50), dl.stableInsets()); in testInsets()
57 assertEquals(new Rect(0, 0, 0, 50), dl.nonDecorInsets()); in testInsets()
62 assertEquals(new Rect(0, 60, 0, 0), dl.stableInsets()); in testInsets()
63 assertEquals(new Rect(0, 60, 0, 0), dl.nonDecorInsets()); in testInsets()
67 assertEquals(new Rect(0, 60, 0, 50), dl.stableInsets()); in testInsets()
68 assertEquals(new Rect(0, 60, 0, 50), dl.nonDecorInsets()); in testInsets()
74 Rect testParent = new Rect(0, 0, 1000, 600); in testRotate()
[all …]

12345678910>>...41