Home
last modified time | relevance | path

Searched refs:getPixel (Results 1 – 25 of 94) sorted by relevance

1234

/cts/tests/tests/graphics/src/android/graphics/cts/
DLinearGradientTest.java56 assertEquals(b.getPixel(10, 10), b.getPixel(20, 10)); in testLinearGradient()
58 assertTrue(Color.blue(b.getPixel(10, 0)) > Color.blue(b.getPixel(10, 5))); in testLinearGradient()
59 assertTrue(Color.blue(b.getPixel(10, 5)) > Color.blue(b.getPixel(10, 10))); in testLinearGradient()
60 assertTrue(Color.green(b.getPixel(10, 0)) < Color.green(b.getPixel(10, 5))); in testLinearGradient()
61 assertTrue(Color.green(b.getPixel(10, 5)) < Color.green(b.getPixel(10, 10))); in testLinearGradient()
63 assertTrue(Color.green(b.getPixel(10, 15)) > Color.green(b.getPixel(10, 20))); in testLinearGradient()
64 assertTrue(Color.green(b.getPixel(10, 20)) > Color.green(b.getPixel(10, 25))); in testLinearGradient()
65 assertTrue(Color.red(b.getPixel(10, 15)) < Color.red(b.getPixel(10, 20))); in testLinearGradient()
66 assertTrue(Color.red(b.getPixel(10, 20)) < Color.red(b.getPixel(10, 25))); in testLinearGradient()
72 assertEquals(b.getPixel(10, 10), b.getPixel(20, 10)); in testLinearGradient()
[all …]
DVulkanPreTransformTest.java180 diff += pixelDiff(bitmap.getPixel(0, 0), 255, 0, 0); in validatePixelValuesAfterRotation()
181 diff += pixelDiff(bitmap.getPixel(width - 1, 0), 0, 255, 0); in validatePixelValuesAfterRotation()
182 diff += pixelDiff(bitmap.getPixel(0, height - 1), 0, 0, 255); in validatePixelValuesAfterRotation()
183 diff += pixelDiff(bitmap.getPixel(width - 1, height - 1), 255, 255, 0); in validatePixelValuesAfterRotation()
185 diff += pixelDiff(bitmap.getPixel(0, 0), 0, 255, 0); in validatePixelValuesAfterRotation()
186 diff += pixelDiff(bitmap.getPixel(width - 1, 0), 255, 255, 0); in validatePixelValuesAfterRotation()
187 diff += pixelDiff(bitmap.getPixel(0, height - 1), 255, 0, 0); in validatePixelValuesAfterRotation()
188 diff += pixelDiff(bitmap.getPixel(width - 1, height - 1), 0, 0, 255); in validatePixelValuesAfterRotation()
190 diff += pixelDiff(bitmap.getPixel(0, 0), 255, 255, 0); in validatePixelValuesAfterRotation()
191 diff += pixelDiff(bitmap.getPixel(width - 1, 0), 0, 0, 255); in validatePixelValuesAfterRotation()
[all …]
DBitmapRGBAF16Test.java114 validatePixel(0xff0f131f, mOpaqueBitmap.getPixel(0, 0)); in testGetPixel()
115 validatePixel(0xff0f1421, mOpaqueBitmap.getPixel(1, 0)); in testGetPixel()
116 validatePixel(0xff101523, mOpaqueBitmap.getPixel(2, 0)); in testGetPixel()
119 assertEquals(0xffff0000, mTransparentBitmap.getPixel(0, 0)); in testGetPixel()
120 assertEquals(0xff00ff00, mTransparentBitmap.getPixel(1, 0)); in testGetPixel()
121 assertEquals(0xff0000ff, mTransparentBitmap.getPixel(2, 0)); in testGetPixel()
124 assertEquals(0x7fff0000, mTransparentBitmap.getPixel(61, 63)); in testGetPixel()
125 assertEquals(0x7f00ff00, mTransparentBitmap.getPixel(62, 63)); in testGetPixel()
126 assertEquals(0x7f0000ff, mTransparentBitmap.getPixel(63, 63)); in testGetPixel()
131 int before = mOpaqueBitmap.getPixel(5, 5); in testSetPixel()
[all …]
DPorterDuffXfermodeTest.java54 assertEquals(Color.RED, target.getPixel(WIDTH / 4, HEIGHT / 4)); in testPorterDuffXfermode()
55 assertEquals(Color.BLUE, target.getPixel(WIDTH / 4, HEIGHT * 3 / 4)); in testPorterDuffXfermode()
56 assertEquals(Color.BLUE, target.getPixel(WIDTH * 3 / 4, HEIGHT * 3 / 4)); in testPorterDuffXfermode()
63 assertEquals(Color.RED, target.getPixel(WIDTH / 4, HEIGHT / 4)); in testPorterDuffXfermode()
64 assertEquals(Color.RED, target.getPixel(WIDTH / 4, HEIGHT * 3 / 4)); in testPorterDuffXfermode()
65 assertEquals(Color.TRANSPARENT, target.getPixel(WIDTH * 3 / 4, HEIGHT * 3 / 4)); in testPorterDuffXfermode()
72 assertEquals(Color.RED, target.getPixel(WIDTH / 4, HEIGHT / 4)); in testPorterDuffXfermode()
73 assertEquals(Color.MAGENTA, target.getPixel(WIDTH / 4, HEIGHT * 3 / 4)); in testPorterDuffXfermode()
74 assertEquals(Color.BLUE, target.getPixel(WIDTH * 3 / 4, HEIGHT * 3 / 4)); in testPorterDuffXfermode()
DPorterDuffColorFilterTest.java58 assertEquals(Color.RED, target.getPixel(width / 4, height / 4)); in testPorterDuffColorFilter()
59 int lowerLeft = target.getPixel(width / 4, height * 3 / 4); in testPorterDuffColorFilter()
62 int lowerRight = target.getPixel(width * 3 / 4, height * 3 / 4); in testPorterDuffColorFilter()
71 assertEquals(Color.RED, target.getPixel(width / 4, height / 4)); in testPorterDuffColorFilter()
72 assertEquals(Color.BLUE, target.getPixel(width / 4, height * 3 / 4)); in testPorterDuffColorFilter()
73 assertEquals(Color.BLUE, target.getPixel(width * 3 / 4, height * 3 / 4)); in testPorterDuffColorFilter()
81 assertEquals(Color.RED, target.getPixel(width / 4, height / 4)); in testPorterDuffColorFilter()
82 assertEquals(Color.CYAN, target.getPixel(width / 4, height * 3 / 4)); in testPorterDuffColorFilter()
83 assertEquals(Color.CYAN, target.getPixel(width * 3 / 4, height * 3 / 4)); in testPorterDuffColorFilter()
DColorMatrixColorFilterTest.java60 ColorUtils.verifyColor(Color.CYAN, bitmap.getPixel(0, 0)); in testColorMatrixColorFilter()
63 ColorUtils.verifyColor(Color.GREEN, bitmap.getPixel(0, 0)); in testColorMatrixColorFilter()
66 ColorUtils.verifyColor(Color.RED, bitmap.getPixel(0, 0)); in testColorMatrixColorFilter()
70 ColorUtils.verifyColor(Color.WHITE, bitmap.getPixel(0, 0)); in testColorMatrixColorFilter()
86 ColorUtils.verifyColor(Color.argb(128, 255, 0, 64), bitmap.getPixel(0, 0), 2); in testColorMatrixColorFilter()
90 ColorUtils.verifyColor(Color.CYAN, bitmap.getPixel(0, 0)); in testColorMatrixColorFilter()
97 ColorUtils.verifyColor(Color.CYAN, bitmap.getPixel(0, 0)); in testColorMatrixColorFilter()
101 ColorUtils.verifyColor(Color.BLUE, bitmap.getPixel(0, 0)); in testColorMatrixColorFilter()
DLightingColorFilterTest.java53 verifyColor(Color.MAGENTA, bitmap.getPixel(0, 0)); in testLightingColorFilter()
58 verifyColor(Color.BLUE, bitmap.getPixel(0, 0)); in testLightingColorFilter()
63 verifyColor(Color.CYAN, bitmap.getPixel(0, 0)); in testLightingColorFilter()
70 verifyColor(Color.GREEN, bitmap.getPixel(0, 0)); in testLightingColorFilter()
76 verifyColor(Color.MAGENTA, bitmap.getPixel(0, 0)); in testLightingColorFilter()
83 verifyColor(Color.argb(255, 30, 30, 30), bitmap.getPixel(0, 0)); in testLightingColorFilter()
91 verifyColor(Color.argb(0x80, 30, 30, 30), bitmap.getPixel(0, 0)); in testLightingColorFilter()
DComposeShaderTest.java67 int pixel = bitmap.getPixel(x, y); in testPorterDuff()
100 int pixel = bitmap.getPixel(x, y); in testBlendMode()
135 assertEquals(Color.WHITE, bitmap.getPixel(0, 0)); in testXfermode()
165 assertEquals(Color.WHITE, bitmap.getPixel(1, 1)); in testChildLocalMatrix()
172 assertEquals(Color.WHITE, bitmap.getPixel(2, 2)); in testChildLocalMatrix()
180 assertEquals(Color.WHITE, bitmap.getPixel(2, 2)); in testChildLocalMatrix()
188 assertEquals(Color.RED, bitmap.getPixel(2, 2)); in testChildLocalMatrix()
189 assertEquals(Color.CYAN, bitmap.getPixel(2, 1)); in testChildLocalMatrix()
DBlurMaskFilterTest.java74 verifyColor(color, bitmap.getPixel(x, y), alphaTolerance); in verifyQuadrants()
75 verifyColor(color, bitmap.getPixel(right - x, y), alphaTolerance); in verifyQuadrants()
76 verifyColor(color, bitmap.getPixel(x, bottom - y), alphaTolerance); in verifyQuadrants()
77 verifyColor(color, bitmap.getPixel(right - x, bottom - y), alphaTolerance); in verifyQuadrants()
DPaintFlagsDrawFilterTest.java81 pixelWithoutFilter = bitmapWithoutFilter.getPixel(i, j); in delta()
82 pixelWithFilter = bitmapWithFilter.getPixel(i, j); in delta()
98 int pixel = bitmap.getPixel(x, y); in verifyUnderline()
173 int color = bitmap.getPixel(i, j); in verifyContainsNonBW()
189 int color = bitmap.getPixel(i, j); in verifyContainsOnlyBlackAndWhite()
DDashPathEffectTest.java76 assertEquals(FOREGROUND, bitmap.getPixel(x, y)); in testDashPathEffect()
78 assertEquals(BACKGROUND, bitmap.getPixel(x, y)); in testDashPathEffect()
81 assertEquals(BACKGROUND, bitmap.getPixel(x, y)); in testDashPathEffect()
DComposePathEffectTest.java75 assertEquals(expected.getPixel(x, y), actual.getPixel(x, y)); in testComposePathEffect()
DSumPathEffectTest.java77 assertEquals(expected.getPixel(i, j), bitmap.getPixel(i, j)); in testSumPathEffect()
/cts/tests/tests/media/common/src/android/media/cts/
DCodecUtils.java158 int rgb = bitmap.getPixel(i * 16 + 8, 8); in readBinaryCounterFromBitmap()
179 Color left_top = Color.valueOf(bitmap.getPixel(10, 10)); in VerifyFrameRotationFromBitmap()
180 Color right_top = Color.valueOf(bitmap.getPixel(310, 10)); in VerifyFrameRotationFromBitmap()
181 Color left_bottom = Color.valueOf(bitmap.getPixel(10, 230)); in VerifyFrameRotationFromBitmap()
182 Color right_bottom = Color.valueOf(bitmap.getPixel(310, 230)); in VerifyFrameRotationFromBitmap()
198 Color left_top = Color.valueOf(bitmap.getPixel(10, 10)); in VerifyFrameRotationFromBitmap()
199 Color right_top = Color.valueOf(bitmap.getPixel(230, 10)); in VerifyFrameRotationFromBitmap()
200 Color left_bottom = Color.valueOf(bitmap.getPixel(10, 310)); in VerifyFrameRotationFromBitmap()
201 Color right_bottom = Color.valueOf(bitmap.getPixel(230, 310)); in VerifyFrameRotationFromBitmap()
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DHardwareBufferRendererTests.kt104 assertEquals(0xFF0000FF.toInt(), bitmap.getPixel(0, 0)) in <lambda>()
109 assertEquals(Color.RED, bitmap.getPixel(TEST_WIDTH / 2, TEST_HEIGHT / 4)) in <lambda>()
110 assertEquals(Color.BLUE, bitmap.getPixel(TEST_WIDTH / 2, TEST_HEIGHT / 2 + TEST_HEIGHT / 4)) in <lambda>()
158 assertEquals(Color.RED, bitmap.getPixel(TEST_WIDTH / 2, TEST_HEIGHT / 4)) in <lambda>()
159 assertEquals(Color.BLUE, bitmap.getPixel(TEST_WIDTH / 2, TEST_HEIGHT / 2 + TEST_HEIGHT / 4)) in <lambda>()
291 assertEquals(topLeft, bitmap.getPixel(topLeftStartX, topLeftStartY)) in <lambda>()
292 assertEquals(topLeft, bitmap.getPixel(topLeftEndX, topLeftStartY)) in <lambda>()
293 assertEquals(topLeft, bitmap.getPixel(topLeftEndX, topLeftEndY)) in <lambda>()
294 assertEquals(topLeft, bitmap.getPixel(topLeftStartX, topLeftEndY)) in <lambda>()
296 assertEquals(topRight, bitmap.getPixel(topRightStartX, topRightStartY)) in <lambda>()
[all …]
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DColorDrawableTest.java143 assertEquals(Color.WHITE, DrawableTestUtils.getPixel(d, 0, 0)); in testSetColorFilter()
146 assertEquals(Color.BLACK, DrawableTestUtils.getPixel(d, 0, 0)); in testSetColorFilter()
149 assertEquals(Color.BLACK, DrawableTestUtils.getPixel(d, 0, 0)); in testSetColorFilter()
164 assertEquals(Color.WHITE, DrawableTestUtils.getPixel(d, 0, 0)); in testSetTint()
168 assertEquals(Color.BLACK, DrawableTestUtils.getPixel(d, 0, 0)); in testSetTint()
178 final int pixel = b.getPixel(0, 0); in testDraw()
DAdaptiveIconDrawableTest.java254 assertEquals(255, Color.alpha(bitmap.getPixel(50, 50))); in testSetAlpha()
259 assertEquals(200, Color.alpha(bitmap.getPixel(50, 50))); in testSetAlpha()
264 assertEquals(100, Color.alpha(bitmap.getPixel(50, 50))); in testSetAlpha()
391 int ra = (a.getPixel(i, j) >> 16) & 0xff; in equalBitmaps()
392 int ga = (a.getPixel(i, j) >> 8) & 0xff; in equalBitmaps()
393 int ba = a.getPixel(i, j) & 0xff; in equalBitmaps()
394 int rb = (b.getPixel(i, j) >> 16) & 0xff; in equalBitmaps()
395 int gb = (b.getPixel(i, j) >> 8) & 0xff; in equalBitmaps()
396 int bb = b.getPixel(i, j) & 0xff; in equalBitmaps()
397 if (region.contains(i, j) && a.getPixel(i, j) != b.getPixel(i, j) ) { in equalBitmaps()
/cts/tests/tests/graphics/src/android/graphics/drawable/shapes/cts/
DPathShapeTest.java76 assertEquals(TEST_COLOR_1, bitmap.getPixel(50, 50)); in testDraw()
87 if (bitmap.getPixel(25, i) == TEST_COLOR_2) { in testDraw()
90 if (bitmap.getPixel(i, 25) == TEST_COLOR_2) { in testDraw()
93 if (bitmap.getPixel(i, i) == TEST_COLOR_2) { in testDraw()
DRoundRectShapeTest.java87 assertEquals(0, bitmap.getPixel(0, 0)); in testDraw()
88 assertEquals(TEST_COLOR_1, bitmap.getPixel(TEST_WIDTH / 2, 0)); in testDraw()
92 assertEquals(0, bitmap.getPixel(0, 0)); in testDraw()
93 assertEquals(TEST_COLOR_2, bitmap.getPixel(TEST_WIDTH / 2, 0)); in testDraw()
/cts/hostsidetests/inputmethodservice/deviceside/lib/src/android/inputmethodservice/cts/ime/
DBitmapImage.java97 int getPixel(int x, int y) { in getPixel() method in BitmapImage
139 if (!robustMatchInternal(targetImage.getPixel(targetX, targetY), getPixel(x, y))) { in robustMatch()
/cts/tests/tests/view/src/android/view/cts/
DTextureViewTest.java155 assertEquals(Color.WHITE, getPixel(window, center)); in testFirstFrames()
265 screenshot.getPixel(10, texturePos.top - 10)); in testTransformScale()
267 screenshot.getPixel(10, texturePos.bottom + 10)); in testTransformScale()
269 screenshot.getPixel(texturePos.left + 10, texturePos.top + 10)); in testTransformScale()
271 screenshot.getPixel(texturePos.right - 10, texturePos.top + 10)); in testTransformScale()
273 screenshot.getPixel(texturePos.left + 10, texturePos.bottom - 10)); in testTransformScale()
275 screenshot.getPixel(texturePos.right - 10, texturePos.bottom - 10)); in testTransformScale()
410 assertPixelsAreSame(surfaceViewScreenshot.getPixel(width / 2, extraSurfaceTopOffset), in testSDRFromSurfaceViewAndTextureView()
411 textureViewScreenshot.getPixel(width / 2, 0), threshold); in testSDRFromSurfaceViewAndTextureView()
412 assertPixelsAreSame(surfaceViewScreenshot.getPixel(extraSurfaceLeftOffset, height / 2), in testSDRFromSurfaceViewAndTextureView()
[all …]
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/utils/
DBitmapUtils.java81 if (bmp1.getPixel(i, j) != bmp2.getPixel(i, j)) { in compareBitmaps()
108 if (bmp1.getPixel(i, j) != bmp2.getPixel(i, j)) { in compareBitmaps()
134 int firstColor = bitmap.getPixel(0, 0); in logIfBitmapSolidColor()
137 if (bitmap.getPixel(x, y) != firstColor) { in logIfBitmapSolidColor()
/cts/tests/tests/renderscript/src/android/renderscript/cts/refocus/
DImageCompare.java67 int pixel1 = bitmap1.getPixel(x, y); in psnr()
68 int pixel2 = bitmap2.getPixel(x, y); in psnr()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DBitmapUtils.java81 if (bmp1.getPixel(i, j) != bmp2.getPixel(i, j)) { in compareBitmaps()
108 if (bmp1.getPixel(i, j) != bmp2.getPixel(i, j)) { in compareBitmaps()
158 int firstColor = bitmap.getPixel(0, 0); in logIfBitmapSolidColor()
161 if (bitmap.getPixel(x, y) != firstColor) { in logIfBitmapSolidColor()
/cts/tests/tests/gameservice/src/android/service/games/
DGameServiceTest.java670 gameScreenshot.getPixel(overlayBounds.left + 1, in takeScreenshot_expectedScreenshotSaved()
674 assertThat(gameScreenshot.getPixel(overlayBounds.left + 1, in takeScreenshot_expectedScreenshotSaved()
678 gameScreenshot.getPixel(overlayBounds.right - 1, in takeScreenshot_expectedScreenshotSaved()
682 assertThat(gameScreenshot.getPixel(overlayBounds.right - 1, in takeScreenshot_expectedScreenshotSaved()
686 gameScreenshot.getPixel((overlayBounds.left + overlayBounds.right) / 2, in takeScreenshot_expectedScreenshotSaved()
695 gameScreenshot.getPixel(overlayBounds.left / 2, in takeScreenshot_expectedScreenshotSaved()
699 assertThat(gameScreenshot.getPixel(overlayBounds.left / 2, in takeScreenshot_expectedScreenshotSaved()
703 assertThat(gameScreenshot.getPixel( in takeScreenshot_expectedScreenshotSaved()
707 assertThat(gameScreenshot.getPixel( in takeScreenshot_expectedScreenshotSaved()
715 assertThat(gameScreenshot.getPixel(0, 0)).isEqualTo(Color.RED); in takeScreenshot_expectedScreenshotSaved()
[all …]

1234