Home
last modified time | relevance | path

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

12345678910

/cts/tests/tests/graphics/src/android/graphics/cts/
DRectTest.java25 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 …]
DOutlineTest.java25 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 …]
DRegionTest.java25 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 …]
DYuvImageTest.java28 import android.graphics.Rect;
74 private static final Rect[] RECTS = { new Rect(0, 0, 0 + RECT_WIDTHS[0], 0 + RECT_HEIGHTS[0]),
75 new Rect(10, 10, 10 + RECT_WIDTHS[0], 10 + RECT_HEIGHTS[0]),
76 new Rect(0, 0, 0 + RECT_WIDTHS[1], 0 + RECT_HEIGHTS[1]),
77 new Rect(11, 11, 11 + RECT_WIDTHS[1], 11 + RECT_HEIGHTS[1]) };
80 private static final Rect[] RECTS_SHIFTED = { RECTS[0], RECTS[1] };
83 private static final Rect RECT_ODD_SIDES = new Rect(10, 10, 10 + RECT_WIDTHS[2],
221 c.drawBitmap(src, null, new Rect(0, 0, WIDTH, HEIGHT), null); in generateTestBitmaps()
252 Rect rect1, Rect rect2) { in compressRects()
257 Rect actualRect = new Rect(rect2); in compressRects()
[all …]
DEmbossMaskFilterTest.java29 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/
DImeLayoutInfo.java20 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/framework/base/windowmanager/src/android/server/wm/
DDisplayCutoutTests.java56 import android.graphics.Rect;
127 final Rect boundLeft = new Rect(5, 6, 7, 8); in testConstructor()
128 final Rect boundTop = new Rect(9, 0, 10, 1); in testConstructor()
129 final Rect boundRight = new Rect(2, 3, 4, 5); in testConstructor()
130 final Rect boundBottom = new Rect(6, 7, 8, 9); in testConstructor()
151 final Rect boundLeft = new Rect(5, 6, 7, 8); in testConstructor_waterfall()
152 final Rect boundTop = new Rect(9, 0, 10, 1); in testConstructor_waterfall()
153 final Rect boundRight = new Rect(2, 3, 4, 5); in testConstructor_waterfall()
154 final Rect boundBottom = new Rect(6, 7, 8, 9); in testConstructor_waterfall()
195 final Rect appBounds = getAppBounds(a); in testDisplayCutout_shortEdges()
[all …]
DDialogFrameTests.java40 import android.graphics.Rect;
114 Rect parentFrame = getParentFrameWithInsets(parent); in testExplicitSizeDefaultGravity()
115 Rect expectedFrame = new Rect( in testExplicitSizeDefaultGravity()
127 Rect parentFrame = getParentFrameWithInsets(parent); in testExplicitSizeTopLeftGravity()
128 Rect expectedFrame = new Rect( in testExplicitSizeTopLeftGravity()
140 Rect parentFrame = getParentFrameWithInsets(parent); in testExplicitSizeBottomRightGravity()
141 Rect expectedFrame = new Rect( in testExplicitSizeBottomRightGravity()
172 Rect parentFrame = getParentFrameWithInsets(parent); in testOversizedDimensionsNoLimits()
173 Rect expectedFrame = new Rect(parentFrame.left, parentFrame.top, in testOversizedDimensionsNoLimits()
196 Rect parentFrame = getParentFrameWithInsets(parent); in testExplicitPositionMatchParentNoLimits()
[all …]
DSurfaceControlTest.java27 import android.graphics.Rect;
154 new RectChecker(new Rect(0, 0, 100, 100), PixelColor.RED)); in testShow()
173 new RectChecker(new Rect(0, 0, 100, 100), PixelColor.WHITE)); in testHide()
190 new RectChecker(new Rect(0, 0, 100, 100), PixelColor.WHITE)); in testReparentOff()
218 new RectChecker(new Rect(0, 0, 100, 100), PixelColor.RED)); in testReparentOn()
242 new RectChecker(new Rect(0, 0, 100, 100), PixelColor.GREEN)); in testSetLayer()
256 .setGeometry(sc, null, new Rect(-50, -50, 50, 50), Surface.ROTATION_0) in testSetGeometry_dstBoundsOffScreen()
265 new RectChecker.Target(new Rect(0, 0, 50, 50), PixelColor.RED), in testSetGeometry_dstBoundsOffScreen()
266 new RectChecker.Target(new Rect(50, 50, 150, 150), PixelColor.WHITE))); in testSetGeometry_dstBoundsOffScreen()
280 .setGeometry(sc, null, new Rect(50, 50, 150, 150), Surface.ROTATION_0) in testSetGeometry_dstBoundsOnScreen()
[all …]
DWindowMetricsTests.java29 import android.graphics.Rect;
89 final Rect bounds = getLegacyBounds(windowMetrics); in testMetricsMatchesDisplay()
106 private static Rect getLegacyBounds(WindowMetrics windowMetrics) { in getLegacyBounds()
111 final Rect bounds = windowMetrics.getBounds(); in getLegacyBounds()
115 private static Rect inset(Rect original, Insets insets) { in inset()
120 return new Rect(left, top, right, bottom); in inset()
130 private Rect mOnLayoutBounds;
145 mOnLayoutBounds = new Rect(decorView.getTop(), decorView.getLeft(), in onLayoutChange()
/cts/tests/tests/view/src/android/view/cts/
DViewOverlayTest.java22 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 …]
DSystemGestureExclusionRectsTest.java29 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 …]
DViewOutlineProviderTest.java24 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()
DViewGroupOverlayTest.java30 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 …]
/cts/tests/tests/media/src/android/media/cts/
DCodecImage.java22 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-axt/src/com/android/compatibility/common/util/transition/
DTrackingVisibility.java19 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()
DTrackingTransition.java19 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/
DViewClippingTests.java8 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()
DVectorDrawableTests.java23 import android.graphics.Rect;
52 vd.setBounds(new Rect(0, 0, 50, 50)); in testScaleDown()
56 new RectVerifier(Color.WHITE, Color.RED, new Rect(0, 0, 25, 25))); in testScaleDown()
61 private Rect mVdBounds;
74 public void setVDSize(Rect vdBounds) { in setVDSize()
99 child.setVDSize(new Rect(0, 0, 2, 2)); in testInvalidateCache()
111 child.setVDSize(new Rect(0, 0, in testInvalidateCache()
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilityEmbeddedHierarchyTest.java32 import android.graphics.Rect;
129 final Rect hostViewBoundsInScreen = new Rect(); in testEmbeddedViewHasCorrectBound()
130 final Rect embeddedViewBoundsInScreen = new Rect(); in testEmbeddedViewHasCorrectBound()
145 final Rect hostViewBoundsInScreen = new Rect(); in testEmbeddedViewHasCorrectBoundAfterHostViewMove()
146 final Rect newEmbeddedViewBoundsInScreen = new Rect(); in testEmbeddedViewHasCorrectBoundAfterHostViewMove()
147 final Rect oldEmbeddedViewBoundsInScreen = new Rect(); in testEmbeddedViewHasCorrectBoundAfterHostViewMove()
273 final Rect boundsInScreen = new Rect(); in requestNewLayoutForTest()
/cts/tests/tests/text/src/android/text/cts/
DPrecomputedTextTest.java33 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/graphics/src/android/graphics/text/cts/
DMeasuredTextTest.java29 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/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/
DRegionVerifier.java21 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()
DRectVerifier.java18 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/uirendering27/src/android/uirendering/cts/bitmapverifiers/
DRectVerifier.java18 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()

12345678910