Home
last modified time | relevance | path

Searched refs:colors (Results 1 – 25 of 34) sorted by relevance

12

/cts/tests/tests/graphics/src/android/graphics/cts/
DSweepGradientTest.java63 final int[] colors = new int[] { Color.GREEN, Color.RED }; in test2Colors() local
65 Shader shader = new SweepGradient(CENTER, CENTER, colors[0], colors[1]); in test2Colors()
68 verifyColors(colors, positions, TOLERANCE); in test2Colors()
73 final int[] colors = new int[] { Color.GREEN, Color.RED, Color.BLUE }; in testColorArray() local
75 Shader shader = new SweepGradient(CENTER, CENTER, colors, positions); in testColorArray()
79 verifyColors(colors, positions, TOLERANCE); in testColorArray()
84 final int[] colors = new int[] { Color.GREEN, Color.RED, Color.BLUE, Color.GREEN }; in testMultiColor() local
87 Shader shader = new SweepGradient(CENTER, CENTER, colors, positions); in testMultiColor()
91 verifyColors(colors, positions, TOLERANCE); in testMultiColor()
94 private void verifyColors(int[] colors, float[] positions, int tolerance) { in verifyColors() argument
[all …]
DBitmapTest.java208 int[] colors = createColors(100); in testCreateBitmap1() local
209 Bitmap bitmap = Bitmap.createBitmap(colors, 10, 10, Config.RGB_565); in testCreateBitmap1()
337 int[] colors = createColors(100); in testCreateBitmapFromColorsNegativeWidthHeight() local
340 Bitmap.createBitmap(colors, 0, 100, -1, 100, Config.RGB_565); in testCreateBitmapFromColorsNegativeWidthHeight()
345 int[] colors = createColors(100); in testCreateBitmapFromColorsIllegalStride() local
348 Bitmap.createBitmap(colors, 10, 10, 100, 100, Config.RGB_565); in testCreateBitmapFromColorsIllegalStride()
353 int[] colors = createColors(100); in testCreateBitmapFromColorsNegativeOffset() local
356 Bitmap.createBitmap(colors, -10, 100, 100, 100, Config.RGB_565); in testCreateBitmapFromColorsNegativeOffset()
361 int[] colors = createColors(100); in testCreateBitmapFromColorsOffsetTooLarge() local
364 Bitmap.createBitmap(colors, 10, 100, 100, 100, Config.RGB_565); in testCreateBitmapFromColorsOffsetTooLarge()
[all …]
DCanvasTest.java1084 final int[] colors = new int[2008]; in testDrawBitmapInts() local
1087 mCanvas.drawBitmap(colors, 10, 10, 10, 10, 0, 10, true, null); in testDrawBitmapInts()
1090 mCanvas.drawBitmap(colors, 10, 10, 10, 10, 10, 0, true, null); in testDrawBitmapInts()
1093 mCanvas.drawBitmap(colors, 10, 10, 10, 10, 10, 29, true, null); in testDrawBitmapInts()
1094 mCanvas.drawBitmap(colors, 10, 10, 10, 10, 10, 29, true, mPaint); in testDrawBitmapInts()
1131 final int[] colors = new int[2008]; in testDrawBitmapFloats() local
1134 mCanvas.drawBitmap(colors, 10, 10, 10.0f, 10.0f, 0, 10, true, null); in testDrawBitmapFloats()
1137 mCanvas.drawBitmap(colors, 10, 10, 10.0f, 10.0f, 10, 0, true, null); in testDrawBitmapFloats()
1140 mCanvas.drawBitmap(colors, 10, 10, 10.0f, 10.0f, 10, 29, true, null); in testDrawBitmapFloats()
1141 mCanvas.drawBitmap(colors, 10, 10, 10.0f, 10.0f, 10, 29, true, mPaint); in testDrawBitmapFloats()
[all …]
DColorTest.java41 int colors [][] = { in resourceColor() local
88 for (int[] pair : colors) { in resourceColor()
120 colors.length, in resourceColor()
/cts/tests/app/src/android/app/cts/
DWallpaperColorsTest.java49 WallpaperColors colors = new WallpaperColors(colorList.get(0), colorList.get(1), in getWallpaperColorsTest() local
51 Assert.assertSame(colors.getPrimaryColor(), colorList.get(0)); in getWallpaperColorsTest()
52 Assert.assertSame(colors.getSecondaryColor(), colorList.get(1)); in getWallpaperColorsTest()
53 Assert.assertSame(colors.getTertiaryColor(), colorList.get(2)); in getWallpaperColorsTest()
89 WallpaperColors colors = WallpaperColors.fromBitmap(bmp); in fromBitmapTest() local
90 Assert.assertNotNull(colors.getPrimaryColor()); in fromBitmapTest()
91 Assert.assertNull(colors.getSecondaryColor()); in fromBitmapTest()
99 WallpaperColors colors = WallpaperColors.fromDrawable(drawable); in fromDrawableTest() local
100 Assert.assertNotNull(colors.getPrimaryColor()); in fromDrawableTest()
101 Assert.assertNull(colors.getSecondaryColor()); in fromDrawableTest()
DWallpaperManagerTest.java204 WallpaperManager.OnColorsChangedListener counter = (colors, whichWp) -> latch.countDown(); in addRemoveOnColorsChangedListenerTest_onlyInvokeAdded()
284 WallpaperManager.OnColorsChangedListener counter = (colors, whichWp) -> { in verifyColorListenerInvoked()
333 WallpaperManager.OnColorsChangedListener counter = (colors, whichWp) -> { in verifyColorListenerInvokedClearing()
382 WallpaperManager.OnColorsChangedListener callback = (colors, which) -> { in ensureCleanState()
390 Log.d("WP", "color state count down: " + which + " - " + colors); in ensureCleanState()
421 public void onColorsChanged(WallpaperColors colors, int which) { in onColorsChanged() argument
/cts/tests/tests/text/src/android/text/cts/
DHtmlTest.java111 ForegroundColorSpan[] colors = s.getSpans(0, s.length(), type); in testColor() local
112 assertEquals(0xFF00FF00, colors[0].getForegroundColor()); in testColor()
115 colors = s.getSpans(0, s.length(), type); in testColor()
116 assertEquals(0xFF000080, colors[0].getForegroundColor()); in testColor()
119 colors = s.getSpans(0, s.length(), type); in testColor()
120 assertEquals(0, colors.length); in testColor()
124 colors = s.getSpans(0, s.length(), type); in testColor()
125 assertEquals(0xFF00FF00, colors[0].getForegroundColor()); in testColor()
128 colors = s.getSpans(0, s.length(), type); in testColor()
129 assertEquals(0xFF888888, colors[0].getForegroundColor()); in testColor()
[all …]
/cts/tests/tests/view/src/android/view/cts/
DMenuItemTest.java82 ColorStateList colors = ColorStateList.valueOf(Color.RED); in testAccessIconTint() local
84 firstItem.setIconTintList(colors); in testAccessIconTint()
88 assertSame(colors, firstItem.getIconTintList()); in testAccessIconTint()
94 assertSame(colors, firstItem.getIconTintList()); in testAccessIconTint()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/projection/cube/
DCube.java44 int colors[] = { in Cube() local
78 ByteBuffer cbb = ByteBuffer.allocateDirect(colors.length*4); in Cube()
81 mColorBuffer.put(colors); in Cube()
/cts/tests/tests/content/src/android/content/res/cts/
DColorStateListTest.java40 final int[] colors = new int[]{Color.RED, Color.BLUE}; in testConstructor() local
41 final ColorStateList c = new ColorStateList(state, colors); in testConstructor()
89 final int[] colors = new int[]{Color.RED, Color.BLUE}; in testWithAlpha() local
90 final ColorStateList c = new ColorStateList(state, colors); in testWithAlpha()
/cts/suite/cts/utils/
Dgrapher.py29 colors = { variable
68 clr = colors.get(name, "#%06X" % (hash(name) % 0xFFFFFF))
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DOrganizationInfoTest.java36 final int[] colors = { in testSetOrganizationColor() local
45 for (int color : colors) { in testSetOrganizationColor()
/cts/tests/tests/graphics/assets/shaders/
Dtri.frag23 vec3 colors;
26 uFragColor = vec4(colorData.colors, 1.0);
/cts/tests/tests/media/src/android/media/cts/
DTextureRender.java278 int[] colors = new int[pixelCount]; in saveFrame() local
279 buf.asIntBuffer().get(colors); in saveFrame()
281 int c = colors[i]; in saveFrame()
282 colors[i] = (c & 0xff00ff00) | ((c & 0x00ff0000) >> 16) | ((c & 0x000000ff) << 16); in saveFrame()
288 Bitmap bmp = Bitmap.createBitmap(colors, width, height, Bitmap.Config.ARGB_8888); in saveFrame()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/
DCtsMediaTextureRender.java282 int[] colors = new int[pixelCount]; in saveFrame() local
283 buf.asIntBuffer().get(colors); in saveFrame()
285 int c = colors[i]; in saveFrame()
286 colors[i] = (c & 0xff00ff00) | ((c & 0x00ff0000) >> 16) | ((c & 0x000000ff) << 16); in saveFrame()
292 Bitmap bmp = Bitmap.createBitmap(colors, width, height, Bitmap.Config.ARGB_8888); in saveFrame()
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DWideColorGamutTests.java80 private BitmapVerifier getVerifier(Point[] points, Color[] colors, float eps) { in getVerifier() argument
82 return new SamplePointWideGamutVerifier(points, colors, eps); in getVerifier()
85 Arrays.stream(colors).mapToInt(Color::toArgb).toArray(), in getVerifier()
/cts/tests/tests/widget/src/android/widget/cts/
DSwitchTest.java96 ColorStateList colors = ColorStateList.valueOf(Color.RED); in testAccessThumbTint() local
97 mSwitch.setThumbTintList(colors); in testAccessThumbTint()
100 assertSame(colors, mSwitch.getThumbTintList()); in testAccessThumbTint()
113 ColorStateList colors = ColorStateList.valueOf(Color.RED); in testAccessTrackTint() local
114 mSwitch.setTrackTintList(colors); in testAccessTrackTint()
117 assertSame(colors, mSwitch.getTrackTintList()); in testAccessTrackTint()
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/
DSamplePointWideGamutVerifier.java36 public SamplePointWideGamutVerifier(Point[] points, Color[] colors, float eps) { in SamplePointWideGamutVerifier() argument
38 mColors = colors; in SamplePointWideGamutVerifier()
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DGradientDrawableTest.java348 int[] colors; in testSetColors() local
350 colors = new int[] { Color.RED }; in testSetColors()
351 gradientDrawable.setColors(colors); in testSetColors()
352 assertArrayEquals("Color was set to " + Arrays.toString(colors), in testSetColors()
353 colors, gradientDrawable.getColors()); in testSetColors()
355 colors = null; in testSetColors()
356 gradientDrawable.setColors(colors); in testSetColors()
357 assertArrayEquals("Color was set to " + Arrays.toString(colors), in testSetColors()
358 colors, gradientDrawable.getColors()); in testSetColors()
/cts/tests/inputmethod/src/android/view/inputmethod/cts/util/
DNavigationBarColorVerifier.java93 final int[] colors = new int[]{Color.RED, Color.GREEN, Color.BLUE}; in verify() local
94 for (int color : colors) { in verify()
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapcomparers/
DMSSIMComparer.java79 private boolean isWindowWhite(int[] colors, int start, int stride) { in isWindowWhite() argument
82 if (colors[indexFromXAndY(x, y, stride, start)] != Color.WHITE) { in isWindowWhite()
/cts/tests/tests/opengl/src/android/opengl/cts/
DFramebufferTest.java609 int[] colors = new int[pixelCount]; in saveFrame() local
610 buf.asIntBuffer().get(colors); in saveFrame()
612 int c = colors[i]; in saveFrame()
613 colors[i] = (c & 0xff00ff00) | ((c & 0x00ff0000) >> 16) | ((c & 0x000000ff) << 16); in saveFrame()
619 Bitmap bmp = Bitmap.createBitmap(colors, mWidth, mHeight, Bitmap.Config.ARGB_8888); in saveFrame()
DRendererOneColorBufferTest.java81 public RendererOneColorBufferTest(Context context, float[] colors, CountDownLatch latch) { in RendererOneColorBufferTest() argument
83 mVertexColor = colors; in RendererOneColorBufferTest()
/cts/tests/tests/openglperf/src/android/openglperf/cts/
DTextureTestRenderer.java71 int[] colors = { in TextureTestRenderer() local
77 mBitmap = Bitmap.createBitmap(colors, 4, 4, Bitmap.Config.ARGB_8888); in TextureTestRenderer()
/cts/apps/CameraITS/tests/dng_noise_model/
Ddng_noise_model.py55 colors = 'rygcbm'
170 plt_s.plot(means_e, vars_e, colors[b%len(colors)] + ',')

12