/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | RectTest.java | 25 import android.graphics.Rect; 37 private Rect mRect; 41 mRect = new Rect(); in testConstructor() 43 mRect = new Rect(10, 10, 20, 20); in testConstructor() 45 mRect = new Rect(new Rect(10, 10, 20, 20)); in testConstructor() 50 mRect = new Rect(); in testSet1() 60 Rect rect = new Rect(1, 2, 3, 4); in testSet2() 61 mRect = new Rect(); in testSet2() 71 mRect = new Rect(0, 0, 10, 10); in testIntersects1() 78 mRect = new Rect(0, 0, 10, 10); in testIntersects1() [all …]
|
D | OutlineTest.java | 25 import android.graphics.Rect; 42 Rect outRect = new Rect(); in testDefaults() 56 Rect copyRect = new Rect(); 58 assertEquals(new Rect(10, 10, 20, 20), copyRect); 91 Rect copyRect = new Rect(); 93 assertEquals(new Rect(10, 10, 20, 20), copyRect); 99 Rect outRect = new Rect(); 107 outline.setRect(new Rect()); 113 assertEquals(new Rect(10, 10, 20, 20), outRect); 116 outline.setRect(new Rect(10, 10, 20, 20)); [all …]
|
D | RegionTest.java | 25 import android.graphics.Rect; 142 Rect rect = new Rect(); in testConstructor() 151 Rect rect = new Rect(1, 2, 3, 4); in testSet1() 162 Rect rect = new Rect(1, 2, 3, 4); in testSet2() 199 mRegion.union(new Rect(3, 3, 5, 5)); in testIsComplex() 205 Rect rect = new Rect(1, 2, 3, 4); in testQuickContains1() 230 Rect rect1 = new Rect(); in testUnion() 231 Rect rect2 = new Rect(0, 0, 20, 20); in testUnion() 232 Rect rect3 = new Rect(5, 5, 10, 10); in testUnion() 233 Rect rect4 = new Rect(10, 10, 30, 30); in testUnion() [all …]
|
D | EmbossMaskFilterTest.java | 29 import android.graphics.Rect; 68 Rect top = new Rect(0, 0, BITMAP_WIDTH, CENTER_Y); in testEmbossMaskFilter() 69 Rect bottom = new Rect(0, CENTER_Y, BITMAP_WIDTH, BITMAP_HEIGHT); in testEmbossMaskFilter() 70 Rect left = new Rect(0, 0, CENTER_X, BITMAP_HEIGHT); in testEmbossMaskFilter() 71 Rect right = new Rect(CENTER_X, 0, BITMAP_WIDTH, BITMAP_HEIGHT); in testEmbossMaskFilter() 91 private long brightness(Bitmap b, Rect rect) { in brightness()
|
D | YuvImageTest.java | 29 import android.graphics.Rect; 73 private static final Rect[] RECTS = { new Rect(0, 0, 0 + RECT_WIDTHS[0], 0 + RECT_HEIGHTS[0]), 74 new Rect(10, 10, 10 + RECT_WIDTHS[0], 10 + RECT_HEIGHTS[0]), 75 new Rect(0, 0, 0 + RECT_WIDTHS[1], 0 + RECT_HEIGHTS[1]), 76 new Rect(11, 11, 11 + RECT_WIDTHS[1], 11 + RECT_HEIGHTS[1]) }; 79 private static final Rect[] RECTS_SHIFTED = { RECTS[0], RECTS[1] }; 82 private static final Rect RECT_ODD_SIDES = new Rect(10, 10, 10 + RECT_WIDTHS[2], 220 c.drawBitmap(src, null, new Rect(0, 0, WIDTH, HEIGHT), null); in generateTestBitmaps() 251 Rect rect1, Rect rect2) { in compressRects() 256 Rect actualRect = new Rect(rect2); in compressRects() [all …]
|
/cts/tests/inputmethod/mockime/src/com/android/cts/mockime/ |
D | ImeLayoutInfo.java | 20 import android.graphics.Rect; 44 private final Rect mNewLayout; 46 private final Rect mOldLayout; 52 private Rect mSystemWindowInset; 54 private Rect mStableInset; 67 public Rect getInputViewBoundsInScreen() { in getInputViewBoundsInScreen() 68 return new Rect( in getInputViewBoundsInScreen() 90 public Rect getScreenRectWithoutSystemWindowInset() { in getScreenRectWithoutSystemWindowInset() 95 return new Rect(0, 0, mDisplaySize.x, mDisplaySize.y); in getScreenRectWithoutSystemWindowInset() 97 return new Rect(mSystemWindowInset.left, mSystemWindowInset.top, in getScreenRectWithoutSystemWindowInset() [all …]
|
/cts/tests/tests/view/src/android/view/cts/ |
D | ViewOverlayTest.java | 22 import android.graphics.Rect; 86 final List<Pair<Rect, Integer>> colorRectangles = new ArrayList<>(); in testOverlayWithOneDrawable() 87 colorRectangles.add(new Pair<>(new Rect(20, 30, 40, 50), Color.RED)); in testOverlayWithOneDrawable() 106 final List<Pair<Rect, Integer>> colorRectangles = new ArrayList<>(); in testAddTheSameDrawableTwice() 107 colorRectangles.add(new Pair<>(new Rect(20, 30, 40, 50), Color.RED)); in testAddTheSameDrawableTwice() 125 final List<Pair<Rect, Integer>> colorRectangles = new ArrayList<>(); in testRemoveTheSameDrawableTwice() 126 colorRectangles.add(new Pair<>(new Rect(20, 30, 40, 50), Color.RED)); in testRemoveTheSameDrawableTwice() 153 final List<Pair<Rect, Integer>> colorRectangles = new ArrayList<>(); in testOverlayWithNonOverlappingDrawables() 154 colorRectangles.add(new Pair<>(new Rect(10, 20, 30, 40), Color.RED)); in testOverlayWithNonOverlappingDrawables() 155 colorRectangles.add(new Pair<>(new Rect(60, 30, 90, 50), Color.GREEN)); in testOverlayWithNonOverlappingDrawables() [all …]
|
D | ViewOutlineProviderTest.java | 24 import android.graphics.Rect; 64 Rect queryRect = new Rect(); in testBackground() 69 assertEquals(new Rect(0, 0, 200, 200), queryRect); in testBackground() 82 assertEquals(new Rect(1, 2, 3, 4), queryRect); in testBackground() 92 Rect queryRect = new Rect(); in testBounds() 98 assertEquals(new Rect(0, 0, 2, 2), queryRect); // local width/height in testBounds() 104 assertEquals(new Rect(0, 0, 200, 200), queryRect); // local width/height in testBounds() 114 Rect queryRect = new Rect(); in testPaddedBounds() 121 assertEquals(new Rect(0, 0, 20, 20), queryRect); // local width/height in testPaddedBounds() 127 assertEquals(new Rect(5, 5, 15, 15), queryRect); // local width/height, inset by 5 in testPaddedBounds()
|
D | ViewGroupOverlayTest.java | 30 import android.graphics.Rect; 106 final List<Pair<Rect, Integer>> colorRectangles = new ArrayList<>(); in testOverlayWithOneView() 107 colorRectangles.add(new Pair<>(new Rect(10, 20, 30, 40), Color.RED)); in testOverlayWithOneView() 135 final List<Pair<Rect, Integer>> colorRectangles = new ArrayList<>(); in testOverlayWithNonOverlappingViews() 136 colorRectangles.add(new Pair<>(new Rect(10, 20, 30, 40), Color.RED)); in testOverlayWithNonOverlappingViews() 137 colorRectangles.add(new Pair<>(new Rect(60, 30, 90, 50), Color.GREEN)); in testOverlayWithNonOverlappingViews() 138 colorRectangles.add(new Pair<>(new Rect(40, 60, 80, 90), Color.BLUE)); in testOverlayWithNonOverlappingViews() 145 colorRectangles.add(new Pair<>(new Rect(10, 20, 30, 40), Color.RED)); in testOverlayWithNonOverlappingViews() 146 colorRectangles.add(new Pair<>(new Rect(40, 60, 80, 90), Color.BLUE)); in testOverlayWithNonOverlappingViews() 169 final List<Pair<Rect, Integer>> colorRectangles = new ArrayList<>(); in testOverlayWithNonOverlappingViewAndDrawable() [all …]
|
D | SystemGestureExclusionRectsTest.java | 29 import android.graphics.Rect; 67 final List<Rect>[] holder = new List[1]; in staticView() 68 final Rect expected = new Rect(); in staticView() 85 Lists.newArrayList(new Rect(0, 0, 5, 5))); in staticView() 104 final List<List<Rect>> results = new ArrayList<>(); in animatingView() 107 final Consumer<List<Rect>> vtoListener = results::add; in animatingView() 115 Lists.newArrayList(new Rect(0, 0, 5, 5))); in animatingView() 123 Rect prev = null; in animatingView() 125 for (List<Rect> list : results) { in animatingView() 127 final Rect first = list.get(0); in animatingView() [all …]
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/ |
D | DisplayCutoutTests.java | 47 import android.graphics.Rect; 80 static final Rect ZERO_RECT = new Rect(); 93 final Rect boundLeft = new Rect(5, 6, 7, 8); in testConstructor() 94 final Rect boundTop = new Rect(9, 0, 10, 1); in testConstructor() 95 final Rect boundRight = new Rect(2, 3, 4, 5); in testConstructor() 96 final Rect boundBottom = new Rect(6, 7, 8, 9); in testConstructor() 188 private void assertCutoutIsConsistentWithInset(String position, int insetSize, Rect bound) { in assertCutoutIsConsistentWithInset() 199 final Rect safeInsets = safeInsets(cutout); in assertCutoutsAreConsistentWithInsets() 217 final Rect safeRect = getSafeRect(a, cutout); in assertCutoutsAreWithinSafeInsets() 220 for (Rect boundingRect : cutout.getBoundingRects()) { in assertCutoutsAreWithinSafeInsets() [all …]
|
D | DialogFrameTests.java | 40 import android.graphics.Rect; 126 Rect contentFrame = parent.getContentFrame(); in testExplicitSizeDefaultGravity() 127 Rect expectedFrame = new Rect( in testExplicitSizeDefaultGravity() 139 Rect contentFrame = parent.getContentFrame(); in testExplicitSizeTopLeftGravity() 140 Rect expectedFrame = new Rect( in testExplicitSizeTopLeftGravity() 152 Rect contentFrame = parent.getContentFrame(); in testExplicitSizeBottomRightGravity() 153 Rect expectedFrame = new Rect( in testExplicitSizeBottomRightGravity() 184 Rect contentFrame = parent.getContentFrame(); in testOversizedDimensionsNoLimits() 185 Rect expectedFrame = new Rect(contentFrame.left, contentFrame.top, in testOversizedDimensionsNoLimits() 208 Rect contentFrame = parent.getContentFrame(); in testExplicitPositionMatchParentNoLimits() [all …]
|
D | SurfaceControlTest.java | 26 import android.graphics.Rect; 143 new RectChecker(new Rect(0, 0, 100, 100), PixelColor.RED)); in testShow() 162 new RectChecker(new Rect(0, 0, 100, 100), PixelColor.WHITE)); in testHide() 181 new RectChecker(new Rect(0, 0, 100, 100), PixelColor.WHITE)); in testReparentOff() 202 new RectChecker(new Rect(0, 0, 100, 100), PixelColor.RED)); in testReparentOn() 226 new RectChecker(new Rect(0, 0, 100, 100), PixelColor.GREEN)); in testSetLayer() 240 .setGeometry(sc, null, new Rect(-50, -50, 50, 50), Surface.ROTATION_0) in testSetGeometry_dstBoundsOffScreen() 249 new RectChecker.Target(new Rect(0, 0, 50, 50), PixelColor.RED), in testSetGeometry_dstBoundsOffScreen() 250 new RectChecker.Target(new Rect(50, 50, 150, 150), PixelColor.WHITE))); in testSetGeometry_dstBoundsOffScreen() 264 .setGeometry(sc, null, new Rect(50, 50, 150, 150), Surface.ROTATION_0) in testSetGeometry_dstBoundsOnScreen() [all …]
|
/cts/tests/tests/media/src/android/media/cts/ |
D | CodecImage.java | 22 import android.graphics.Rect; 120 private Rect mCropRect; 128 public Rect getCropRect() { in getCropRect() 130 return new Rect(0, 0, getWidth(), getHeight()); in getCropRect() 132 return new Rect(mCropRect); // return a copy in getCropRect() 142 public void setCropRect(Rect cropRect) { in setCropRect() 144 cropRect = new Rect(cropRect); // make a copy in setCropRect()
|
/cts/common/device-side/util/src/com/android/compatibility/common/util/transition/ |
D | TrackingVisibility.java | 19 import android.graphics.Rect; 33 private final Rect[] mEpicenter = new Rect[1]; 39 Rect epicenter = getEpicenter(); in onAppear() 41 mEpicenter[0] = new Rect(epicenter); in onAppear() 52 Rect epicenter = getEpicenter(); in onDisappear() 54 mEpicenter[0] = new Rect(epicenter); in onDisappear() 72 public Rect getCapturedEpicenter() { in getCapturedEpicenter()
|
D | TrackingTransition.java | 19 import android.graphics.Rect; 40 private final Rect[] mEpicenter = new Rect[1]; 68 Rect epicenter = getEpicenter(); in createAnimator() 70 mEpicenter[0] = new Rect(epicenter); in createAnimator() 88 public Rect getCapturedEpicenter() { in getCapturedEpicenter()
|
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/transition/ |
D | TrackingVisibility.java | 19 import android.graphics.Rect; 33 private final Rect[] mEpicenter = new Rect[1]; 39 Rect epicenter = getEpicenter(); in onAppear() 41 mEpicenter[0] = new Rect(epicenter); in onAppear() 52 Rect epicenter = getEpicenter(); in onDisappear() 54 mEpicenter[0] = new Rect(epicenter); in onDisappear() 72 public Rect getCapturedEpicenter() { in getCapturedEpicenter()
|
D | TrackingTransition.java | 19 import android.graphics.Rect; 40 private final Rect[] mEpicenter = new Rect[1]; 68 Rect epicenter = getEpicenter(); in createAnimator() 70 mEpicenter[0] = new Rect(epicenter); in createAnimator() 88 public Rect getCapturedEpicenter() { in getCapturedEpicenter()
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ |
D | ViewClippingTests.java | 8 import android.graphics.Rect; 34 static final Rect FULL_RECT = new Rect(0, 0, 90, 90); 35 static final Rect BOUNDS_RECT = new Rect(0, 0, 80, 80); 36 static final Rect PADDED_RECT = new Rect(15, 16, 63, 62); 37 static final Rect OUTLINE_RECT = new Rect(1, 2, 78, 79); 38 static final Rect CLIP_BOUNDS_RECT = new Rect(10, 20, 50, 60); 64 static BitmapVerifier makeClipVerifier(Rect blueBoundsRect) { in makeClipVerifier()
|
/cts/tests/framework/base/windowmanager/util/src/android/server/wm/ |
D | WindowManagerState.java | 33 import android.graphics.Rect; 121 private Rect mDefaultPinnedStackBounds = new Rect(); 122 private Rect mPinnedStackMovementBounds = new Rect(); 551 Rect getStableBounds() { in getStableBounds() 555 Rect getDefaultPinnedStackBounds() { in getDefaultPinnedStackBounds() 556 return new Rect(mDefaultPinnedStackBounds); in getDefaultPinnedStackBounds() 559 Rect getPinnedStackMovementBounds() { in getPinnedStackMovementBounds() 560 return new Rect(mPinnedStackMovementBounds); in getPinnedStackMovementBounds() 705 protected Rect mBounds; 714 Rect getBounds() { in getBounds() [all …]
|
/cts/tests/tests/text/src/android/text/cts/ |
D | PrecomputedTextTest.java | 33 import android.graphics.Rect; 466 final Rect rect = new Rect(); in testGetBounds() 470 assertEquals(new Rect(0, 0, 0, 0), rect); in testGetBounds() 474 assertEquals(new Rect(0, -1, 1, 0), rect); in testGetBounds() 478 assertEquals(new Rect(0, 0, 0, 0), rect); in testGetBounds() 482 assertEquals(new Rect(0, 0, 0, 0), rect); in testGetBounds() 486 assertEquals(new Rect(0, 0, 0, 0), rect); in testGetBounds() 490 assertEquals(new Rect(0, 0, 0, 0), rect); in testGetBounds() 494 assertEquals(new Rect(0, 0, 0, 0), rect); in testGetBounds() 498 assertEquals(new Rect(0, -1, 1, 0), rect); in testGetBounds() [all …]
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/ |
D | RegionVerifier.java | 21 import android.graphics.Rect; 47 Rect area = subRegionVerifier.region.getBounds(); in verify() 52 Rect area = new Rect(); in verify() 63 BitmapVerifier subVerifier, Rect rect) { in verifySubRect() 68 public RegionVerifier addVerifier(Rect area, BitmapVerifier verifier) { in addVerifier()
|
D | RectVerifier.java | 18 import android.graphics.Rect; 26 private Rect mInnerRect; 28 public RectVerifier(int outerColor, int innerColor, Rect innerRect) { in RectVerifier() 32 public RectVerifier(int outerColor, int innerColor, Rect innerRect, int tolerance) { in RectVerifier()
|
/cts/tests/tests/graphics/src/android/graphics/text/cts/ |
D | MeasuredTextTest.java | 29 import android.graphics.Rect; 174 final Rect emptyRect = new Rect(0, 0, 0, 0); in testGetBounds() 175 final Rect singleCharRect = new Rect(0, -10, 10, 0); in testGetBounds() 176 final Rect twoCharRect = new Rect(0, -10, 20, 0); in testGetBounds() 177 Rect out = new Rect(); in testGetBounds() 193 Rect rect = new Rect(); in testGetBounds_StartSmallerThanZero() 203 Rect rect = new Rect(); in testGetBounds_StartLargerThanLength() 213 Rect rect = new Rect(); in testGetBounds_EndSmallerThanZero() 223 Rect rect = new Rect(); in testGetBounds_EndLargerThanLength() 233 Rect rect = new Rect(); in testGetBounds_StartLargerThanEnd() [all …]
|
/cts/tests/accessibility/src/android/view/accessibility/cts/ |
D | AccessibilityWindowInfoTest.java | 19 import android.graphics.Rect; 70 Rect rect = new Rect(); in testDefaultValues() 102 Rect bounds1 = new Rect(); in areWindowsEqual() 103 Rect bounds2 = new Rect(); in areWindowsEqual()
|