/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | RectTest.java | 26 import android.graphics.Rect; 38 private Rect mRect; 42 mRect = new Rect(); in testConstructor() 44 mRect = new Rect(10, 10, 20, 20); in testConstructor() 46 mRect = new Rect(new Rect(10, 10, 20, 20)); in testConstructor() 51 mRect = new Rect(); in testSet1() 61 Rect rect = new Rect(1, 2, 3, 4); in testSet2() 62 mRect = new Rect(); in testSet2() 72 mRect = new Rect(0, 0, 10, 10); in testIntersects1() 79 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 | Paint_TextBoundsTest.java | 23 import android.graphics.Rect; 74 Rect r = new Rect(); in testSingleChar_1em() 85 Rect r = new Rect(); in testSingleChar_2em() 96 Rect r = new Rect(); in testSingleChar_2em_with_lsb() 107 Rect r = new Rect(); in testSingleChar_1em_with_y1em_origin() 118 Rect r = new Rect(); in testMultiChar_1em_1em() 129 Rect r = new Rect(); in testMultiChar_1em_2em() 140 Rect r = new Rect(); in testMultiChar_3em_2em_with_lsb() 151 Rect r = new Rect(); in testMultiChar_1em_with_y1em() 162 Rect r = new Rect(); in testMultiChar_1em_5times()
|
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()
|
/cts/tests/inputmethod/mockime/src/com/android/cts/mockime/ |
D | ImeLayoutInfo.java | 20 import android.graphics.Rect; 41 private final Rect mNewLayout; 43 private final Rect mOldLayout; 60 public Rect getInputViewBoundsInScreen() { in getInputViewBoundsInScreen() 61 return new Rect( in getInputViewBoundsInScreen() 67 ImeLayoutInfo(@NonNull Rect newLayout, @NonNull Rect oldLayout, in ImeLayoutInfo() 69 mNewLayout = new Rect(newLayout); in ImeLayoutInfo() 70 mOldLayout = new Rect(oldLayout); in ImeLayoutInfo() 83 final Rect newLayout = bundle.getParcelable(NEW_LAYOUT_KEY); in readFromBundle() 84 final Rect oldLayout = bundle.getParcelable(OLD_LAYOUT_KEY); in readFromBundle() [all …]
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/other/ |
D | KeepClearRectsTests.java | 35 import android.graphics.Rect; 67 private static final List<Rect> TEST_KEEP_CLEAR_RECTS = 68 Arrays.asList(new Rect(0, 0, 25, 25), 69 new Rect(30, 0, 50, 25), 70 new Rect(25, 25, 50, 50), 71 new Rect(10, 30, 20, 50)); 72 private static final List<Rect> TEST_KEEP_CLEAR_RECTS_2 = 73 Arrays.asList(new Rect(55, 0, 75, 15), 74 new Rect(50, 15, 60, 25), 75 new Rect(75, 25, 90, 50), [all …]
|
/cts/tests/tests/media/common/src/android/media/cts/ |
D | CodecImage.java | 19 import android.graphics.Rect; 119 private Rect mCropRect; 127 public Rect getCropRect() { in getCropRect() 129 return new Rect(0, 0, getWidth(), getHeight()); in getCropRect() 131 return new Rect(mCropRect); // return a copy in getCropRect() 141 public void setCropRect(Rect cropRect) { in setCropRect() 143 cropRect = new Rect(cropRect); // make a copy in setCropRect()
|
/cts/tests/videocodec/src/android/videocodec/cts/ |
D | VideoEncoderRoiTest.java | 33 import android.graphics.Rect; 130 Rect contour = (Rect) mContour.get(qpOffsetRect); in fillOffsetArray() 201 public Map<Long, List<Rect>> getPtsRectMap(Map<Long, List<QpOffsetRect>> roiMetadata) in getPtsRectMap() 203 Map<Long, List<Rect>> ptsRectMap = new HashMap<>(); in getPtsRectMap() 208 List<Rect> rects = new ArrayList<>(); in getPtsRectMap() 215 rects.add((Rect) mContour.get(qpOffsetRect)); in getPtsRectMap() 259 Map<Long, List<Rect>> frameCropRects = getPtsRectMap(roiMetadata); in testRoiSupport() 275 Arrays.asList(new QpOffsetRect(new Rect(694, 668, 991, 1487), -5), 276 new QpOffsetRect(new Rect(18, 627, 770, 1957), -5), 277 new QpOffsetRect(new Rect(0, 0, 1080, 600), 5)))); [all …]
|
/cts/tests/tests/view/src/android/view/cts/ |
D | ViewGroup_ScrollCaptureTest.java | 29 import android.graphics.Rect; 144 Rect localVisibleRect = new Rect(0, 0, 200, 200); in testDispatchScrollCaptureSearch() 166 Rect localVisibleRect = new Rect(0, 0, 200, 200); in testDispatchScrollCaptureSearch_withCallback() 172 callback.completeSearchRequest(new Rect(1, 2, 3, 4)); in testDispatchScrollCaptureSearch_withCallback() 178 assertEquals("Target has the wrong bounds", new Rect(1, 2, 3, 4), target.getScrollBounds()); in testDispatchScrollCaptureSearch_withCallback() 199 Rect localVisibleRect = new Rect(0, 0, 200, 200); in testDispatchScrollCaptureSearch_withCallback_hintExclude() 208 private static boolean nullOrEmpty(Rect r) { in nullOrEmpty() 224 Rect localVisibleRect = new Rect(25, 50, 175, 150); in testDispatchScrollCaptureSearch_toChildren() 277 view3Callback.completeSearchRequest(new Rect(0, 0, 200, 100)); in testDispatchScrollCaptureSearch_toChildren() 278 view5Callback.completeSearchRequest(new Rect(0, 0, 50, 100)); in testDispatchScrollCaptureSearch_toChildren() [all …]
|
D | ViewOverlayTest.java | 23 import android.graphics.Rect; 97 final List<Pair<Rect, Integer>> colorRectangles = new ArrayList<>(); in testOverlayWithOneDrawable() 98 colorRectangles.add(new Pair<>(new Rect(20, 30, 40, 50), Color.RED)); in testOverlayWithOneDrawable() 117 final List<Pair<Rect, Integer>> colorRectangles = new ArrayList<>(); in testAddTheSameDrawableTwice() 118 colorRectangles.add(new Pair<>(new Rect(20, 30, 40, 50), Color.RED)); in testAddTheSameDrawableTwice() 136 final List<Pair<Rect, Integer>> colorRectangles = new ArrayList<>(); in testRemoveTheSameDrawableTwice() 137 colorRectangles.add(new Pair<>(new Rect(20, 30, 40, 50), Color.RED)); in testRemoveTheSameDrawableTwice() 164 final List<Pair<Rect, Integer>> colorRectangles = new ArrayList<>(); in testOverlayWithNonOverlappingDrawables() 165 colorRectangles.add(new Pair<>(new Rect(10, 20, 30, 40), Color.RED)); in testOverlayWithNonOverlappingDrawables() 166 colorRectangles.add(new Pair<>(new Rect(60, 30, 90, 50), Color.GREEN)); in testOverlayWithNonOverlappingDrawables() [all …]
|
D | ViewOutlineProviderTest.java | 24 import android.graphics.Rect; 66 Rect queryRect = new Rect(); in testBackground() 71 assertEquals(new Rect(0, 0, 200, 200), queryRect); in testBackground() 84 assertEquals(new Rect(1, 2, 3, 4), queryRect); in testBackground() 94 Rect queryRect = new Rect(); in testBounds() 100 assertEquals(new Rect(0, 0, 2, 2), queryRect); // local width/height in testBounds() 106 assertEquals(new Rect(0, 0, 200, 200), queryRect); // local width/height in testBounds() 116 Rect queryRect = new Rect(); in testPaddedBounds() 123 assertEquals(new Rect(0, 0, 20, 20), queryRect); // local width/height in testPaddedBounds() 129 assertEquals(new Rect(5, 5, 15, 15), queryRect); // local width/height, inset by 5 in testPaddedBounds()
|
D | MockScrollCaptureCallback.java | 22 import android.graphics.Rect; 32 private Consumer<Rect> mSearchConsumer; 34 private Consumer<Rect> mImageOnComplete; 40 @NonNull Consumer<Rect> onReady) { in onScrollCaptureSearch() 54 @NonNull CancellationSignal signal, @NonNull Rect captureArea, in onScrollCaptureImageRequest() 55 @NonNull Consumer<Rect> onComplete) { in onScrollCaptureImageRequest() 65 void completeSearchRequest(Rect scrollBounds) { in completeSearchRequest() 80 void completeImageRequest(Rect captured) { in completeImageRequest()
|
D | SystemGestureExclusionRectsTest.java | 30 import android.graphics.Rect; 78 final List<Rect>[] holder = new List[1]; in staticView() 79 final Rect expected = new Rect(); in staticView() 96 Lists.newArrayList(new Rect(0, 0, 5, 5))); in staticView() 115 final List<List<Rect>> results = new ArrayList<>(); in animatingView() 118 final Consumer<List<Rect>> vtoListener = results::add; in animatingView() 128 Lists.newArrayList(new Rect(0, 0, 5, 5))); in animatingView() 136 Rect prev = null; in animatingView() 138 for (List<Rect> list : results) { in animatingView() 140 final Rect first = list.get(0); in animatingView() [all …]
|
D | ScrollCaptureTargetTest.java | 40 import android.graphics.Rect; 94 new ScrollCaptureTarget(null, new Rect(1, 2, 3, 4), new Point(5, 6), mCallback); in testConstructor_requiresNonNullTarget() 106 new ScrollCaptureTarget(mTargetView, new Rect(1, 2, 3, 4), null, mCallback); in testConstructor_requiresNonNullPosition() 112 new ScrollCaptureTarget(mTargetView, new Rect(1, 2, 3, 4), new Point(5, 6), null); in testConstructor_requiresNonNullCallback() 120 new Rect(0, 0, 10, 10), new Point(5, 5), mCallback); in testScrollBounds() 126 target.setScrollBounds(new Rect(-5, -5, 15, 15)); in testScrollBounds() 128 assertEquals(new Rect(0, 0, 10, 10), target.getScrollBounds()); in testScrollBounds() 131 target.setScrollBounds(new Rect()); in testScrollBounds() 145 new Rect(1, 2, 3, 4), new Point(5, 6), mCallback); in testContainingView() 154 new Rect(1, 2, 3, 4), new Point(5, 6), mCallback); in testLocalVisibleRect() [all …]
|
D | ScrollCaptureSessionTest.java | 22 import android.graphics.Rect; 54 new ScrollCaptureSession(null, new Rect(1, 2, 3, 4), new Point(5, 6)); in testConstructor_requiresNonNullSurface() 64 new ScrollCaptureSession(mSurface, new Rect(1, 2, 3, 4), null); in testConstructor_requiresNonNullPosition() 70 new Rect(1, 2, 3, 4), new Point(5, 6)); in testGetSurface() 77 new Rect(1, 2, 3, 4), new Point(5, 6)); in testGetScrollBounds() 78 assertEquals(new Rect(1, 2, 3, 4), session.getScrollBounds()); in testGetScrollBounds() 84 new Rect(1, 2, 3, 4), new Point(5, 6)); in testGetPositionInWindow()
|
/cts/tests/framework/base/windowmanager/util/src/android/server/wm/ |
D | WindowMetricsTestHelper.java | 31 import android.graphics.Rect; 47 WindowMetrics maxMetrics, Rect layoutBounds, WindowInsets layoutInsets) { in assertMetricsMatchesLayout() 53 WindowMetrics maxMetrics, Rect layoutBounds, WindowInsets layoutInsets, in assertMetricsMatchesLayout() 57 final Rect currentMetricsBounds = currentMetrics.getBounds(); in assertMetricsMatchesLayout() 94 public static void assertMetricsValidity(Context context, Rect displayAreaBounds) { in assertMetricsValidity() 101 final Rect maxBounds = maxMetrics.getBounds(); in assertMetricsValidity() 107 final Rect currentBounds = isFreeForm ? currentMetrics.getBounds() in assertMetricsValidity() 145 final Rect currentBounds = shouldBoundsIncludeInsets ? currentMetrics.getBounds() in assertMetricsMatchDisplay() 157 final Rect maxBounds = maxMetrics.getBounds(); in assertMetricsMatchDisplay() 166 public static Rect getBoundsExcludingInsetsTypes(WindowMetrics windowMetrics, in getBoundsExcludingInsetsTypes() [all …]
|
/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()
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/animations/ |
D | DialogFrameTests.java | 41 import android.graphics.Rect; 126 Rect parentFrame = getParentFrameWithInsets(parent); in testExplicitSizeDefaultGravity() 127 Rect expectedFrame = in testExplicitSizeDefaultGravity() 128 new Rect( in testExplicitSizeDefaultGravity() 146 Rect parentFrame = getParentFrameWithInsets(parent); in testExplicitSizeTopLeftGravity() 147 Rect expectedFrame = in testExplicitSizeTopLeftGravity() 148 new Rect( in testExplicitSizeTopLeftGravity() 162 Rect parentFrame = getParentFrameWithInsets(parent); in testExplicitSizeBottomRightGravity() 163 Rect expectedFrame = in testExplicitSizeBottomRightGravity() 164 new Rect( in testExplicitSizeBottomRightGravity() [all …]
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/insets/ |
D | DisplayCutoutTests.java | 62 import android.graphics.Rect; 201 final Rect boundLeft = new Rect(5, 6, 7, 8); in testConstructor() 202 final Rect boundTop = new Rect(9, 0, 10, 1); in testConstructor() 203 final Rect boundRight = new Rect(2, 3, 4, 5); in testConstructor() 204 final Rect boundBottom = new Rect(6, 7, 8, 9); in testConstructor() 225 final Rect boundLeft = new Rect(5, 6, 7, 8); in testConstructor_waterfall() 226 final Rect boundTop = new Rect(9, 0, 10, 1); in testConstructor_waterfall() 227 final Rect boundRight = new Rect(2, 3, 4, 5); in testConstructor_waterfall() 228 final Rect boundBottom = new Rect(6, 7, 8, 9); in testConstructor_waterfall() 252 final Rect boundingLeft = new Rect(5, 6, 7, 8); in testBuilder() [all …]
|
D | WindowInsetsTest.java | 40 import android.graphics.Rect; 70 new Rect(0, 10, 0, 0), Collections.singletonList(new Rect(5, 0, 15, 10))); 73 new Rect(0, 15, 0, 0), Collections.singletonList(new Rect(5, 0, 15, 15))); 88 private static final List<Rect> BOUNDING_RECTS = Arrays.asList( 89 new Rect(0, 0, 10, 10), new Rect(20, 20, 30, 30) 91 private static final List<Rect> BOUNDING_RECTS_2 = Arrays.asList( 92 new Rect(10, 10, 20, 20) 313 .setBoundingRects(statusBars(), List.of(new Rect(0, 0, 10, 10))) in testBuilder_boundingRectsTypeMap() 314 .setBoundingRects(navigationBars(), List.of(new Rect(0, 100, 10, 10))) in testBuilder_boundingRectsTypeMap() 315 .setBoundingRects(tappableElement(), List.of(new Rect(0, 0, 5, 5))) in testBuilder_boundingRectsTypeMap() [all …]
|
/cts/tests/pdf/module/src/android/graphics/pdf/cts/module/ |
D | FormWidgetInfoTest.java | 25 import android.graphics.Rect; 37 Rect widgetRect = new Rect(100, 0, 150, 50); in testPushButton() 65 Rect widgetRect = new Rect(150, 210, 225, 260); in testPushButton_readOnly() 92 Rect widgetRect = new Rect(0, 0, 50, 50); in testCheckBox() 120 Rect widgetRect = new Rect(10, 50, 160, 200); in testCheckBox_readOnly() 147 Rect widgetRect = new Rect(330, 655, 390, 715); in testRadioButton() 175 Rect widgetRect = new Rect(1000, 1500, 1100, 1600); in testRadioButton_readOnly() 212 Rect widgetRect = new Rect(1250, 0, 1500, 250); in testCombobox() 244 Rect widgetRect = new Rect(2360, 355, 2660, 655); in testCombobox_readOnly() 278 Rect widgetRect = new Rect(450, 225, 650, 425); in testCombobox_withEditableText() [all …]
|
D | PdfFormFillingTest.java | 27 import android.graphics.Rect; 63 private static boolean fullyContain(List<Rect> innerRects, List<Rect> outerRects) { in fullyContain() 65 for (Rect inner : innerRects) { in fullyContain() 66 for (Rect outer : outerRects) { in fullyContain() 76 private static FormWidgetInfo makeCheckbox(int widgetIndex, Rect widgetRect, boolean readOnly, in makeCheckbox() 82 private static FormWidgetInfo makeRadioButton(int widgetIndex, Rect widgetRect, in makeRadioButton() 88 private static FormWidgetInfo makeCombobox(int widgetIndex, Rect widgetRect, boolean readOnly, in makeCombobox() 101 private static FormWidgetInfo makeListbox(int widgetIndex, Rect widgetRect, boolean readOnly, in makeListbox() 109 private static FormWidgetInfo makeTextField(int widgetIndex, Rect widgetRect, boolean readOnly, in makeTextField() 155 /* widgetRect= */ new Rect(135, 70, 155, 90), in getFormWidgetInfo_checkbox() [all …]
|
D | PdfFormFillingPreVTest.java | 27 import android.graphics.Rect; 60 private static boolean fullyContain(List<Rect> innerRects, List<Rect> outerRects) { in fullyContain() 62 for (Rect inner : innerRects) { in fullyContain() 63 for (Rect outer : outerRects) { in fullyContain() 73 private static FormWidgetInfo makeCheckbox(int widgetIndex, Rect widgetRect, boolean readOnly, in makeCheckbox() 79 private static FormWidgetInfo makeRadioButton(int widgetIndex, Rect widgetRect, in makeRadioButton() 85 private static FormWidgetInfo makeCombobox(int widgetIndex, Rect widgetRect, boolean readOnly, in makeCombobox() 98 private static FormWidgetInfo makeListbox(int widgetIndex, Rect widgetRect, boolean readOnly, in makeListbox() 106 private static FormWidgetInfo makeTextField(int widgetIndex, Rect widgetRect, boolean readOnly, in makeTextField() 152 /* widgetRect= */ new Rect(135, 70, 155, 90), in getFormWidgetInfo_checkbox() [all …]
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ |
D | ViewClippingTests.java | 8 import android.graphics.Rect; 37 static final Rect FULL_RECT = new Rect(0, 0, 90, 90); 38 static final Rect BOUNDS_RECT = new Rect(0, 0, 80, 80); 39 static final Rect PADDED_RECT = new Rect(15, 16, 63, 62); 40 static final Rect OUTLINE_RECT = new Rect(1, 2, 78, 79); 41 static final Rect ANTI_ALIAS_OUTLINE_RECT = new Rect(20, 10, 80, 80); 42 static final Rect CLIP_BOUNDS_RECT = new Rect(10, 20, 50, 60); 43 static final Rect CONCAVE_OUTLINE_RECT1 = new Rect(0, 0, 10, 90); 44 static final Rect CONCAVE_TEST_RECT1 = new Rect(0, 10, 90, 90); 45 static final Rect CONCAVE_OUTLINE_RECT2 = new Rect(0, 0, 90, 10); [all …]
|