Home
last modified time | relevance | path

Searched refs:rect (Results 1 – 25 of 60) sorted by relevance

123

/cts/tests/tests/graphics/src/android/graphics/cts/
DRegionIteratorTest.java46 Rect rect = new Rect(); in testNext() local
47 rect.set(1, 1, 1, 1); in testNext()
54 assertTrue(regionIterator.next(rect)); in testNext()
55 assertEquals(1, rect.left); in testNext()
56 assertEquals(1, rect.top); in testNext()
57 assertEquals(10, rect.right); in testNext()
58 assertEquals(10, rect.bottom); in testNext()
59 rect.set(1, 1, 1, 1); in testNext()
60 assertFalse(regionIterator.next(rect)); in testNext()
61 assertEquals(1, rect.left); in testNext()
[all …]
DRectTest.java60 Rect rect = new Rect(1, 2, 3, 4); in testSet2() local
62 mRect.set(rect); in testSet2()
189 Rect rect; in testUnion2() local
195 rect = new Rect(1, 1, 2, 2); in testUnion2()
196 mRect.union(rect); in testUnion2()
206 rect = new Rect(1, 1, 2, 2); in testUnion2()
207 mRect.union(rect); in testUnion2()
217 rect = new Rect(2, 2, 1, 1); in testUnion2()
218 mRect.union(rect); in testUnion2()
226 rect = new Rect(1, 1, 2, 2); in testUnion2()
[all …]
DPaintFlagsDrawFilterTest.java95 Rect rect = new Rect(BITMAP_WIDTH, BITMAP_HEIGHT, 0, 0); in verifyUnderline() local
100 rect.left = Math.min(rect.left, x); in verifyUnderline()
101 rect.right = Math.max(rect.right, x); in verifyUnderline()
102 rect.top = Math.min(rect.top, y); in verifyUnderline()
103 rect.bottom = Math.max(rect.bottom, y); in verifyUnderline()
108 assertTrue(rect.top <= rect.bottom); in verifyUnderline()
110 assertEquals(mTextWidth, rect.right - rect.left, mTextWidth * 0.053); in verifyUnderline()
112 assertTrue(rect.top >= TEXT_Y); in verifyUnderline()
DRectFTest.java47 Rect rect = new Rect(0, 0, 10, 10); in testConstructor() local
48 mRectF = new RectF(rect); in testConstructor()
89 Rect rect = new Rect(1, 2, 3, 4); in testSet3() local
91 mRectF.set(rect); in testSet3()
473 Rect rect = new Rect(); in testRoundOut() local
475 mRectF.roundOut(rect); in testRoundOut()
476 assertEquals(1, rect.left, 0.0f); in testRoundOut()
477 assertEquals(1, rect.top, 0.0f); in testRoundOut()
478 assertEquals(6, rect.right, 0.0f); in testRoundOut()
479 assertEquals(6, rect.bottom, 0.0f); in testRoundOut()
[all …]
DEmbossMaskFilterTest.java91 private long brightness(Bitmap b, Rect rect) { in brightness() argument
93 for (int y = rect.top; y < rect.bottom; y++) { in brightness()
94 for (int x = rect.left; x < rect.right; x++) { in brightness()
DYuvImageTest.java269 Rect rect) { in compressOddRect() argument
272 actual = compressDecompress(image, rect); in compressOddRect()
274 Rect newRect = rect; in compressOddRect()
282 private Bitmap compressDecompress(YuvImage image, Rect rect) { in compressDecompress() argument
286 boolean rt = image.compressToJpeg(rect, 90, stream); in compressDecompress()
401 Rect rect = new Rect(0, 0, WIDTH, HEIGHT); in verifyParameters() local
402 image.compressToJpeg(rect, 101, stream); in verifyParameters()
410 Rect rect = new Rect(0, 0, WIDTH, HEIGHT); in verifyParameters() local
411 image.compressToJpeg(rect, -1, stream); in verifyParameters()
419 Rect rect = new Rect(0, 0, WIDTH, HEIGHT); in verifyParameters() local
[all …]
DPathDashPathEffectTest.java62 RectF rect = new RectF(0, HEIGHT / 2 - SQUARE, 0, HEIGHT / 2 + SQUARE); in testPathDashPathEffect() local
64 rect.left = i - SQUARE; in testPathDashPathEffect()
65 rect.right = i + SQUARE; in testPathDashPathEffect()
66 canvas.drawRect(rect, p); in testPathDashPathEffect()
DInsetsTest.java56 Rect rect = new Rect(1, 2, 3, 4); in testInsetsFromRect() local
57 Insets insets = Insets.of(rect); in testInsetsFromRect()
66 Rect rect = new Rect(10, 20, 30, 40); in testInsetsEquality() local
67 Insets insets1 = Insets.of(rect); in testInsetsEquality()
/cts/tests/tests/graphics/src/android/graphics/drawable/shapes/cts/
DRectShapeTest.java97 RectF rect = mockRectShape.myRect(); in testRect() local
98 assertEquals(0.0f, rect.left, 0.0f); in testRect()
99 assertEquals(0.0f, rect.top, 0.0f); in testRect()
100 assertEquals(0.0f, rect.right, 0.0f); in testRect()
101 assertEquals(0.0f, rect.bottom, 0.0f); in testRect()
104 rect = mockRectShape.myRect(); in testRect()
105 assertEquals(0.0f, rect.left, 0.0f); in testRect()
106 assertEquals(0.0f, rect.top, 0.0f); in testRect()
107 assertEquals((float) TEST_WIDTH, rect.right, 0.0f); in testRect()
108 assertEquals((float) TEST_HEIGHT, rect.bottom, 0.0f); in testRect()
[all …]
DRoundRectShapeTest.java112 Rect rect = new Rect(); in testGetOutline() local
120 assertFalse(outline.getRect(rect)); in testGetOutline()
126 assertTrue(outline.getRect(rect)); in testGetOutline()
127 assertEquals(0, rect.left); in testGetOutline()
128 assertEquals(0, rect.top); in testGetOutline()
129 assertEquals(100, rect.right); in testGetOutline()
130 assertEquals(100, rect.bottom); in testGetOutline()
137 assertFalse(outline.getRect(rect)); in testGetOutline()
143 assertTrue(outline.getRect(rect)); in testGetOutline()
144 assertEquals(0, rect.left); in testGetOutline()
[all …]
DOvalShapeTest.java86 Rect rect = new Rect(); in testGetOutline() local
94 assertFalse(outline.getRect(rect)); in testGetOutline()
101 assertTrue(outline.getRect(rect)); in testGetOutline()
102 assertEquals(0, rect.left); in testGetOutline()
103 assertEquals(0, rect.top); in testGetOutline()
104 assertEquals(100, rect.right); in testGetOutline()
105 assertEquals(100, rect.bottom); in testGetOutline()
112 assertFalse(outline.getRect(rect)); in testGetOutline()
/cts/apps/CameraITS/tests/scene2c/
Dtest_num_faces.py69 for rect in [face['bounds'] for face in faces]:
70 top_left = (int(round(rect['left']*W/aw)),
71 int(round(rect['top']*H/ah)))
72 bot_rght = (int(round(rect['right']*W/aw)),
73 int(round(rect['bottom']*H/ah)))
91 for rect in face_rectangles:
92 assert rect['top'] < rect['bottom']
93 assert rect['left'] < rect['right']
94 assert 0 <= rect['top'] <= ah
95 assert 0 <= rect['bottom'] <= ah
[all …]
/cts/apps/CameraITS/tests/scene2/
Dtest_num_faces.py70 for rect in [face['bounds'] for face in faces]:
71 top_left = (int(round(rect['left']*W/aw)),
72 int(round(rect['top']*H/ah)))
73 bot_rght = (int(round(rect['right']*W/aw)),
74 int(round(rect['bottom']*H/ah)))
92 for rect in face_rectangles:
93 assert rect['top'] < rect['bottom']
94 assert rect['left'] < rect['right']
95 assert 0 <= rect['top'] <= ah
96 assert 0 <= rect['bottom'] <= ah
[all …]
Dtest_faces.py88 for j, rect in enumerate(face_rectangles):
90 rect_t = rect['top']
91 rect_b = rect['bottom']
92 rect_l = rect['left']
93 rect_r = rect['right']
/cts/apps/CameraITS/tests/scene2b/
Dtest_num_faces.py69 for rect in [face['bounds'] for face in faces]:
70 top_left = (int(round(rect['left']*W/aw)),
71 int(round(rect['top']*H/ah)))
72 bot_rght = (int(round(rect['right']*W/aw)),
73 int(round(rect['bottom']*H/ah)))
91 for rect in face_rectangles:
92 assert rect['top'] < rect['bottom']
93 assert rect['left'] < rect['right']
94 assert 0 <= rect['top'] <= ah
95 assert 0 <= rect['bottom'] <= ah
[all …]
/cts/tests/tests/text/src/android/text/cts/
DPrecomputedTextTest.java466 final Rect rect = new Rect(); in testGetBounds() local
468 rect.set(0, 0, 0, 0); in testGetBounds()
469 PrecomputedText.create("", param).getBounds(0, 0, rect); in testGetBounds()
470 assertEquals(new Rect(0, 0, 0, 0), rect); in testGetBounds()
472 rect.set(0, 0, 0, 0); in testGetBounds()
473 PrecomputedText.create("I", param).getBounds(0, 1, rect); in testGetBounds()
474 assertEquals(new Rect(0, -1, 1, 0), rect); in testGetBounds()
476 rect.set(0, 0, 0, 0); in testGetBounds()
477 PrecomputedText.create("I", param).getBounds(1, 1, rect); in testGetBounds()
478 assertEquals(new Rect(0, 0, 0, 0), rect); in testGetBounds()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DRenderNodeTests.java93 final Rect rect = new Rect(10, 10, 80, 80); in testBasicDraw() local
96 renderNode.setPosition(rect.left, rect.top, rect.right, rect.bottom); in testBasicDraw()
97 assertEquals(rect.left, renderNode.getLeft()); in testBasicDraw()
98 assertEquals(rect.top, renderNode.getTop()); in testBasicDraw()
99 assertEquals(rect.right, renderNode.getRight()); in testBasicDraw()
100 assertEquals(rect.bottom, renderNode.getBottom()); in testBasicDraw()
105 assertEquals(rect.width(), canvas.getWidth()); in testBasicDraw()
106 assertEquals(rect.height(), canvas.getHeight()); in testBasicDraw()
119 .runWithVerifier(new RectVerifier(Color.WHITE, Color.BLUE, rect)); in testBasicDraw()
124 final Rect rect = new Rect(10, 10, 80, 80); in testAlphaOverlappingRendering() local
[all …]
DForceDarkTests.java72 final Rect rect = new Rect(10, 10, 80, 80); in testFgRect() local
80 canvas.drawRect(rect, p); in testFgRect()
83 .runWithVerifier(new RectVerifier(Color.BLACK, Color.WHITE, rect, 100)); in testFgRect()
88 final Rect rect = new Rect(10, 10, 80, 80); in testFgRectDisable() local
97 canvas.drawRect(rect, p); in testFgRectDisable()
100 .runWithVerifier(new RectVerifier(Color.WHITE, Color.BLACK, rect, 0)); in testFgRectDisable()
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/
DRegionVerifier.java63 BitmapVerifier subVerifier, Rect rect) { in verifySubRect() argument
64 final int newOffset = rect.top * stride + rect.left + offset; in verifySubRect()
65 return subVerifier.verify(bitmap, newOffset, stride, rect.width(), rect.height()); in verifySubRect()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/streamquality/
DPlayVideoActivity.java191 Rect rect = new Rect();
192 mVideoFrame.getDrawingRect(rect);
195 if (rect.width() / aspectRatio <= rect.height()) {
196 lp.width = rect.width();
197 lp.height = (int) (rect.width() / aspectRatio);
199 lp.width = (int) (rect.height() * aspectRatio);
200 lp.height = rect.height();
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/utils/
DDisplayUtils.java26 final Rect rect = new Rect(); in getStatusBarHeight() local
28 window.getDecorView().getWindowVisibleDisplayFrame(rect); in getStatusBarHeight()
29 return rect.top; in getStatusBarHeight()
/cts/tests/tests/systemui/src/android/systemui/cts/
DWindowInsetsPresenterDrawable.java115 final Rect rect = getBounds(); in drawInset() local
118 canvas.drawRect(0, 0, insets.left, rect.bottom, paint); in drawInset()
121 canvas.drawRect(0, 0, rect.width(), insets.top, paint); in drawInset()
124 canvas.drawRect(rect.width() - insets.right, 0, rect.width(), rect.bottom, in drawInset()
128 canvas.drawRect(0, rect.height() - insets.bottom, rect.width(), rect.height(), in drawInset()
/cts/tests/tests/view/src/android/view/cts/
DTouchDelegateTestActivity.java79 Rect rect = new Rect(); in onCreate()
80 button.getHitRect(rect); in onCreate()
81 rect.top -= gap / 2; // TouchDelegate is halfway between button and parent in onCreate()
82 parent.setTouchDelegate(new TouchDelegate(rect, button)); in onCreate()
/cts/tests/autofillservice/src/android/autofillservice/cts/
DDialogLauncherActivity.java62 void assertInDialogBounds(Rect rect) { in assertInDialogBounds() argument
66 assertThat(location[0]).isAtMost(rect.left); in assertInDialogBounds()
67 assertThat(rect.right).isAtMost(location[0] + view.getWidth()); in assertInDialogBounds()
68 assertThat(location[1]).isAtMost(rect.top); in assertInDialogBounds()
69 assertThat(rect.bottom).isAtMost(location[1] + view.getHeight()); in assertInDialogBounds()
/cts/tests/tests/text/src/android/text/style/cts/
DDynamicDrawableSpanTest.java70 Rect rect = dynamicDrawableSpan.getDrawable().getBounds(); in testGetSize() local
71 assertEquals(rect.right, dynamicDrawableSpan.getSize(null, null, 0, 0, fm)); in testGetSize()
73 assertEquals(-rect.bottom, fm.ascent); in testGetSize()
77 assertEquals(-rect.bottom, fm.top); in testGetSize()
79 assertEquals(rect.right, dynamicDrawableSpan.getSize(null, null, 0, 0, null)); in testGetSize()

123