Home
last modified time | relevance | path

Searched refs:rect (Results 1 – 25 of 72) 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.java61 Rect rect = new Rect(1, 2, 3, 4); in testSet2() local
63 mRect.set(rect); in testSet2()
190 Rect rect; in testUnion2() local
196 rect = new Rect(1, 1, 2, 2); in testUnion2()
197 mRect.union(rect); in testUnion2()
207 rect = new Rect(1, 1, 2, 2); in testUnion2()
208 mRect.union(rect); in testUnion2()
218 rect = new Rect(2, 2, 1, 1); in testUnion2()
219 mRect.union(rect); in testUnion2()
227 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()
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.java270 Rect rect) { in compressOddRect() argument
273 actual = compressDecompress(image, rect); in compressOddRect()
275 Rect newRect = rect; in compressOddRect()
283 private Bitmap compressDecompress(YuvImage image, Rect rect) { in compressDecompress() argument
287 boolean rt = image.compressToJpeg(rect, 90, stream); in compressDecompress()
358 Rect rect = new Rect(0, 0, WIDTH, HEIGHT); in verifyParameters() local
359 image.compressToJpeg(rect, 101, stream); in verifyParameters()
367 Rect rect = new Rect(0, 0, WIDTH, HEIGHT); in verifyParameters() local
368 image.compressToJpeg(rect, -1, stream); in verifyParameters()
376 Rect rect = new Rect(0, 0, WIDTH, HEIGHT); in verifyParameters() local
[all …]
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 …]
/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/scene2_c/
Dtest_num_faces.py48 for rect in [face['bounds'] for face in faces]:
49 top_left = (int(round(rect['left']*W/aw)),
50 int(round(rect['top']*H/ah)))
51 bot_rght = (int(round(rect['right']*W/aw)),
52 int(round(rect['bottom']*H/ah)))
127 for rect in face_rectangles:
128 assert rect['top'] < rect['bottom']
129 assert rect['left'] < rect['right']
130 assert 0 <= rect['top'] <= ah
131 assert 0 <= rect['bottom'] <= ah
[all …]
/cts/apps/CameraITS/tests/scene2_d/
Dtest_num_faces.py48 for rect in [face['bounds'] for face in faces]:
49 top_left = (int(round(rect['left']*W/aw)),
50 int(round(rect['top']*H/ah)))
51 bot_rght = (int(round(rect['right']*W/aw)),
52 int(round(rect['bottom']*H/ah)))
127 for rect in face_rectangles:
128 assert rect['top'] < rect['bottom']
129 assert rect['left'] < rect['right']
130 assert 0 <= rect['top'] <= ah
131 assert 0 <= rect['bottom'] <= ah
[all …]
/cts/apps/CameraITS/tests/scene2_e/
Dtest_num_faces.py48 for rect in [face['bounds'] for face in faces]:
49 top_left = (int(round(rect['left']*W/aw)),
50 int(round(rect['top']*H/ah)))
51 bot_rght = (int(round(rect['right']*W/aw)),
52 int(round(rect['bottom']*H/ah)))
127 for rect in face_rectangles:
128 assert rect['top'] < rect['bottom']
129 assert rect['left'] < rect['right']
130 assert 0 <= rect['top'] <= ah
131 assert 0 <= rect['bottom'] <= ah
[all …]
/cts/apps/CameraITS/tests/scene2_b/
Dtest_num_faces.py48 for rect in [face['bounds'] for face in faces]:
49 top_left = (int(round(rect['left']*W/aw)),
50 int(round(rect['top']*H/ah)))
51 bot_rght = (int(round(rect['right']*W/aw)),
52 int(round(rect['bottom']*H/ah)))
127 for rect in face_rectangles:
128 assert rect['top'] < rect['bottom']
129 assert rect['left'] < rect['right']
130 assert 0 <= rect['top'] <= ah
131 assert 0 <= rect['bottom'] <= ah
[all …]
/cts/apps/CameraITS/tests/scene2_a/
Dtest_num_faces.py48 for rect in [face['bounds'] for face in faces]:
49 top_left = (int(round(rect['left']*W/aw)),
50 int(round(rect['top']*H/ah)))
51 bot_rght = (int(round(rect['right']*W/aw)),
52 int(round(rect['bottom']*H/ah)))
127 for rect in face_rectangles:
128 assert rect['top'] < rect['bottom']
129 assert rect['left'] < rect['right']
130 assert 0 <= rect['top'] <= ah
131 assert 0 <= rect['bottom'] <= ah
[all …]
Dtest_faces.py35 def check_face_bounding_box(rect, aa_w, aa_h): argument
37 rect_t = rect['top']
38 rect_b = rect['bottom']
39 rect_l = rect['left']
40 rect_r = rect['right']
156 for j, rect in enumerate(face_rectangles):
158 check_face_bounding_box(rect, aw, ah)
/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/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/tests/tests/uirendering/jni/
Dandroid_uirendering_cts_AImageDecoderTest.cpp221 ARect rect = AImageDecoderFrameInfo_getFrameRect(nullptr); in testNullFrameInfo() local
222 ASSERT_EQ(0, rect.left); in testNullFrameInfo()
223 ASSERT_EQ(0, rect.top); in testNullFrameInfo()
224 ASSERT_EQ(0, rect.right); in testNullFrameInfo()
225 ASSERT_EQ(0, rect.bottom); in testNullFrameInfo()
242 ARect rect = AImageDecoderFrameInfo_getFrameRect(frameInfo); in testGetFrameRect() local
243 if (rect.left != expectedLeft || rect.top != expectedTop || rect.right != expectedRight in testGetFrameRect()
244 || rect.bottom != expectedBottom) { in testGetFrameRect()
246 expectedTop, expectedRight, expectedBottom, rect.left, rect.top, rect.right, in testGetFrameRect()
247 rect.bottom); in testGetFrameRect()
/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/tests/uirendering/src/android/uirendering/cts/testclasses/
DRenderNodeTests.java112 final Rect rect = new Rect(10, 10, 80, 80); in testBasicDraw() local
115 renderNode.setPosition(rect.left, rect.top, rect.right, rect.bottom); in testBasicDraw()
116 assertEquals(rect.left, renderNode.getLeft()); in testBasicDraw()
117 assertEquals(rect.top, renderNode.getTop()); in testBasicDraw()
118 assertEquals(rect.right, renderNode.getRight()); in testBasicDraw()
119 assertEquals(rect.bottom, renderNode.getBottom()); in testBasicDraw()
124 assertEquals(rect.width(), canvas.getWidth()); in testBasicDraw()
125 assertEquals(rect.height(), canvas.getHeight()); in testBasicDraw()
138 .runWithVerifier(new RectVerifier(Color.WHITE, Color.BLUE, rect)); in testBasicDraw()
143 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/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()
DWindowInsetsActivity.java179 public void setSystemGestureExclusion(Rect rect) { in setSystemGestureExclusion() argument
181 if (rect != null) { in setSystemGestureExclusion()
182 rects.add(rect); in setSystemGestureExclusion()
305 Rect rect = new Rect(refRect); in calculateBoundsWithInsets() local
306 rect.left += left; in calculateBoundsWithInsets()
307 rect.top += top; in calculateBoundsWithInsets()
308 rect.right -= right; in calculateBoundsWithInsets()
309 rect.bottom -= bottom; in calculateBoundsWithInsets()
311 return rect; in calculateBoundsWithInsets()
/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/framework/base/windowmanager/src/android/server/wm/
DDecorInsetTestsBase.java126 private static void insetRect(Rect rect, Insets insets) { in insetRect() argument
127 rect.left += insets.left; in insetRect()
128 rect.top += insets.top; in insetRect()
129 rect.right -= insets.right; in insetRect()
130 rect.bottom -= insets.bottom; in insetRect()

123