Home
last modified time | relevance | path

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

12

/cts/tests/tests/graphics/src/android/graphics/cts/
DSystemPalette.java191 final int[] colors = new int[13]; in getAllAccent1Colors() local
192 colors[0] = context.getColor(R.color.system_accent1_0); in getAllAccent1Colors()
193 colors[1] = context.getColor(R.color.system_accent1_10); in getAllAccent1Colors()
194 colors[2] = context.getColor(R.color.system_accent1_50); in getAllAccent1Colors()
195 colors[3] = context.getColor(R.color.system_accent1_100); in getAllAccent1Colors()
196 colors[4] = context.getColor(R.color.system_accent1_200); in getAllAccent1Colors()
197 colors[5] = context.getColor(R.color.system_accent1_300); in getAllAccent1Colors()
198 colors[6] = context.getColor(R.color.system_accent1_400); in getAllAccent1Colors()
199 colors[7] = context.getColor(R.color.system_accent1_500); in getAllAccent1Colors()
200 colors[8] = context.getColor(R.color.system_accent1_600); in getAllAccent1Colors()
[all …]
DSweepGradientTest.java68 final int[] colors = new int[] { Color.GREEN, Color.RED }; in test2Colors() local
70 Shader shader = new SweepGradient(CENTER, CENTER, colors[0], colors[1]); in test2Colors()
73 verifyColors(colors, positions, TOLERANCE); in test2Colors()
78 final int[] colors = new int[] { Color.GREEN, Color.RED, Color.BLUE }; in testColorArray() local
80 Shader shader = new SweepGradient(CENTER, CENTER, colors, positions); in testColorArray()
84 verifyColors(colors, positions, TOLERANCE); in testColorArray()
89 final int[] colors = new int[] { Color.GREEN, Color.RED, Color.BLUE, Color.GREEN }; in testMultiColor() local
92 Shader shader = new SweepGradient(CENTER, CENTER, colors, positions); in testMultiColor()
96 verifyColors(colors, positions, TOLERANCE); in testMultiColor()
99 private void verifyColors(int[] colors, float[] positions, int tolerance) { in verifyColors() argument
[all …]
DLinearGradientTest.java86 long[] colors = new long[] { blue, green, red };
89 LinearGradient lg = new LinearGradient(0, 0, 0, 40, colors, positions, TileMode.CLAMP);
162 int[] colors = null;
163 new LinearGradient(0.5f, 0, 1.5f, 0, colors, null, TileMode.CLAMP);
168 long[] colors = null;
169 new LinearGradient(0.5f, 0, 1.5f, 0, colors, null, TileMode.CLAMP);
194 long[] colors = new long[2];
195 colors[0] = Color.pack(Color.BLUE);
196 colors[1] = Color.pack(.5f, .5f, .5f, 1.0f, ColorSpace.get(ColorSpace.Named.DISPLAY_P3));
197 new LinearGradient(0.5f, 0, 1.5f, 0, colors, null, TileMode.CLAMP);
[all …]
DRadialGradientTest.java140 int[] colors = null; in testNullColorInts() local
141 new RadialGradient(0.5f, 0.5f, 1, colors, null, TileMode.CLAMP); in testNullColorInts()
146 long[] colors = null; in testNullColorLongs() local
147 new RadialGradient(0.5f, 0.5f, 1, colors, null, TileMode.CLAMP); in testNullColorLongs()
172 long[] colors = new long[2]; in testMismatchColorLongs() local
173 colors[0] = Color.pack(Color.BLUE); in testMismatchColorLongs()
174 colors[1] = Color.pack(.5f, .5f, .5f, 1.0f, ColorSpace.get(ColorSpace.Named.DISPLAY_P3)); in testMismatchColorLongs()
175 new RadialGradient(0.5f, 0.5f, 1, colors, null, TileMode.CLAMP); in testMismatchColorLongs()
197 long[] colors = new long[2]; in testInvalidColorLongs() local
198 colors[0] = -1L; in testInvalidColorLongs()
[all …]
DBitmapTest.java337 int[] colors = createColors(100); in testCreateBitmap1() local
338 Bitmap bitmap = Bitmap.createBitmap(colors, 10, 10, Config.RGB_565); in testCreateBitmap1()
491 int[] colors = createColors(100); in testCreateBitmapFromColorsNegativeWidthHeight() local
494 Bitmap.createBitmap(colors, 0, 100, -1, 100, Config.RGB_565); in testCreateBitmapFromColorsNegativeWidthHeight()
499 int[] colors = createColors(100); in testCreateBitmapFromColorsIllegalStride() local
502 Bitmap.createBitmap(colors, 10, 10, 100, 100, Config.RGB_565); in testCreateBitmapFromColorsIllegalStride()
507 int[] colors = createColors(100); in testCreateBitmapFromColorsNegativeOffset() local
510 Bitmap.createBitmap(colors, -10, 100, 100, 100, Config.RGB_565); in testCreateBitmapFromColorsNegativeOffset()
515 int[] colors = createColors(100); in testCreateBitmapFromColorsOffsetTooLarge() local
518 Bitmap.createBitmap(colors, 10, 100, 100, 100, Config.RGB_565); in testCreateBitmapFromColorsOffsetTooLarge()
[all …]
/cts/tests/app/src/android/app/cts/
DWallpaperColorsTest.java47 WallpaperColors colors = new WallpaperColors(colorList.get(0), colorList.get(1), in getWallpaperColorsTest() local
49 Assert.assertSame(colors.getPrimaryColor(), colorList.get(0)); in getWallpaperColorsTest()
50 Assert.assertSame(colors.getSecondaryColor(), colorList.get(1)); in getWallpaperColorsTest()
51 Assert.assertSame(colors.getTertiaryColor(), colorList.get(2)); in getWallpaperColorsTest()
87 WallpaperColors colors = WallpaperColors.fromBitmap(bmp); in fromBitmapTest() local
88 Assert.assertNotNull(colors.getPrimaryColor()); in fromBitmapTest()
89 Assert.assertNull(colors.getSecondaryColor()); in fromBitmapTest()
97 WallpaperColors colors = WallpaperColors.fromDrawable(drawable); in fromDrawableTest() local
98 Assert.assertNotNull(colors.getPrimaryColor()); in fromDrawableTest()
99 Assert.assertNull(colors.getSecondaryColor()); in fromDrawableTest()
DWallpaperManagerTest.java214 WallpaperManager.OnColorsChangedListener counter = (colors, whichWp) -> latch.countDown(); in addRemoveOnColorsChangedListenerTest_onlyInvokeAdded()
272 WallpaperColors colors = mWallpaperManager.getWallpaperColors( in wallpaperColors_primary() local
276 Color primary = colors.getPrimaryColor(); in wallpaperColors_primary()
282 Assert.assertNull(colors.getSecondaryColor()); in wallpaperColors_primary()
283 Assert.assertNull(colors.getTertiaryColor()); in wallpaperColors_primary()
303 WallpaperColors colors = mWallpaperManager.getWallpaperColors( in wallpaperColors_secondary() local
307 Color secondary = colors.getSecondaryColor(); in wallpaperColors_secondary()
453 WallpaperManager.OnColorsChangedListener counter = (colors, whichWp) -> { in verifyColorListenerInvoked()
502 WallpaperManager.OnColorsChangedListener counter = (colors, whichWp) -> { in verifyColorListenerInvokedClearing()
541 WallpaperManager.OnColorsChangedListener callback = (colors, which) -> { in ensureCleanState()
[all …]
/cts/tests/tests/view/surfacevalidator/src/android/view/cts/surfacevalidator/
DMultiFramePixelChecker.java31 public MultiFramePixelChecker(int[] colors) { in MultiFramePixelChecker() argument
32 mPixelColors = new PixelColor[colors.length]; in MultiFramePixelChecker()
33 for (int i = 0; i < colors.length; i++) { in MultiFramePixelChecker()
34 mPixelColors[i] = new PixelColor(colors[i]); in MultiFramePixelChecker()
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DBitmapBlendModeTest.java50 int[] colors = {Color.RED, Color.RED, Color.RED, Color.RED, Color.RED}; in testClearBlendMode() local
55 .runWithVerifier(new SamplePointVerifier(SAMPLE_POINTS, colors)); in testClearBlendMode()
64 int[] colors = {Color.WHITE, Color.WHITE, Color.WHITE, Color.WHITE, Color.RED}; in testDstOutBlendMode() local
69 .runWithVerifier(new SamplePointVerifier(SAMPLE_POINTS, colors)); in testDstOutBlendMode()
DCanvasTests.java87 int[] colors = { in testDrawDoubleRoundRect() local
113 .runWithVerifier(new SamplePointVerifier(testPoints, colors)); in testDrawDoubleRoundRect()
128 int[] colors = { in testDrawDoubleRoundRectWithRadii() local
167 .runWithVerifier(new SamplePointVerifier(testPoints, colors)); in testDrawDoubleRoundRectWithRadii()
520 final int[] colors = new int[10]; in testDrawVerticesTooFewVerts() local
528 verts, 8, texs, 0, colors, 0, indices, in testDrawVerticesTooFewVerts()
536 final int[] colors = new int[10]; in testDrawVerticesTooFewTexs() local
544 verts, 0, texs, 30, colors, 0, indices, in testDrawVerticesTooFewTexs()
552 final int[] colors = new int[10]; in testDrawVerticesTooFewColors() local
560 verts, 0, texs, 0, colors, 30, indices, in testDrawVerticesTooFewColors()
[all …]
DPaintTests.kt185 val colors = intArrayOf(Color.BLACK, Color.BLACK, Color.BLACK) in <lambda>() constant
187 null, 0, colors, 0, null, 0, 0, paint) in <lambda>()
195 val colors = intArrayOf(Color.BLUE, Color.GREEN, Color.YELLOW) in <lambda>() constant
196 bitmapPaint.shader = LinearGradient(0f, 0f, 400f, 400f, colors, null, in <lambda>()
/cts/tests/tests/uirendering27/src/android/uirendering/cts/testclasses/
DBitmapBlendModeTest.java51 int[] colors = {Color.WHITE, Color.WHITE, Color.WHITE, Color.WHITE, Color.RED}; in testClearBlendMode() local
56 .runWithVerifier(new SamplePointVerifier(SAMPLE_POINTS, colors)); in testClearBlendMode()
65 int[] colors = {Color.WHITE, Color.WHITE, Color.WHITE, Color.WHITE, Color.RED}; in testDstOutBlendMode() local
70 .runWithVerifier(new SamplePointVerifier(SAMPLE_POINTS, colors)); in testDstOutBlendMode()
/cts/tests/tests/text/src/android/text/cts/
DHtmlTest.java168 ForegroundColorSpan[] colors = s.getSpans(0, s.length(), type); in testColor() local
169 if (colors.length == 0) { in testColor()
172 int actualColor = colors[0].getForegroundColor(); in testColor()
203 ForegroundColorSpan[] colors = s.getSpans(0, s.length(), type); in testColorInvalid() local
204 if (colors.length > 0) { in testColorInvalid()
206 + Integer.toHexString(colors[0].getForegroundColor())); in testColorInvalid()
208 assertEquals(0, colors.length); in testColorInvalid()
217 ForegroundColorSpan[] colors = s.getSpans(0, s.length(), type); in testUseCssColor() local
218 assertEquals(0xFF008000, colors[0].getForegroundColor()); in testUseCssColor()
221 colors = s.getSpans(0, s.length(), type); in testUseCssColor()
[all …]
/cts/tests/tests/view/src/android/view/cts/
DASurfaceControlBackPressureTest.java223 int[] colors = new int[]{PixelColor.RED, PixelColor.GREEN, PixelColor.BLUE}; in testSurfaceTransaction_setEnableBackPressure() local
232 DEFAULT_LAYOUT_HEIGHT, colors[i % colors.length]); in testSurfaceTransaction_setEnableBackPressure()
238 MultiFramePixelChecker PixelChecker = new MultiFramePixelChecker(colors) { in testSurfaceTransaction_setEnableBackPressure()
255 int[] colors = new int[]{PixelColor.RED, PixelColor.GREEN, PixelColor.BLUE}; in testSurfaceTransaction_defaultBackPressureDisabled() local
264 DEFAULT_LAYOUT_HEIGHT, colors[i % colors.length]); in testSurfaceTransaction_defaultBackPressureDisabled()
270 MultiFramePixelChecker PixelChecker = new MultiFramePixelChecker(colors) { in testSurfaceTransaction_defaultBackPressureDisabled()
DMenuItemTest.java83 ColorStateList colors = ColorStateList.valueOf(Color.RED); in testAccessIconTint() local
85 firstItem.setIconTintList(colors); in testAccessIconTint()
89 assertSame(colors, firstItem.getIconTintList()); in testAccessIconTint()
95 assertSame(colors, firstItem.getIconTintList()); in testAccessIconTint()
/cts/tests/tests/content/src/android/content/res/cts/
DColorStateListTest.java35 final int[] colors = new int[]{Color.RED, Color.BLUE}; in testConstructor() local
36 final ColorStateList c = new ColorStateList(state, colors); in testConstructor()
84 final int[] colors = new int[]{Color.RED, Color.BLUE}; in testWithAlpha() local
85 final ColorStateList c = new ColorStateList(state, colors); in testWithAlpha()
96 final int[] colors = new int[]{Color.RED, Color.BLUE}; in testWithLStar() local
97 final ColorStateList c = new ColorStateList(state, colors); in testWithLStar()
/cts/tests/tests/widget/src/android/widget/cts/
DSwitchTest.java101 ColorStateList colors = ColorStateList.valueOf(Color.RED); in testAccessThumbTint() local
102 mSwitch.setThumbTintList(colors); in testAccessThumbTint()
105 assertSame(colors, mSwitch.getThumbTintList()); in testAccessThumbTint()
118 ColorStateList colors = ColorStateList.valueOf(Color.RED); in testAccessThumbTintBlendMode() local
119 mSwitch.setThumbTintList(colors); in testAccessThumbTintBlendMode()
122 assertSame(colors, mSwitch.getThumbTintList()); in testAccessThumbTintBlendMode()
135 ColorStateList colors = ColorStateList.valueOf(Color.RED); in testAccessTrackTint() local
136 mSwitch.setTrackTintList(colors); in testAccessTrackTint()
139 assertSame(colors, mSwitch.getTrackTintList()); in testAccessTrackTint()
152 ColorStateList colors = ColorStateList.valueOf(Color.RED); in testAccessTrackTintBlendMode() local
[all …]
/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/hostsidetests/appsecurity/test-apps/SplitApp/src/com/android/cts/splitapp/
DTestThemeHelper.java101 final int[] colors = getThemeColors(themeColors); in assertThemeValues() local
103 assertThat(mCustomColor).isEqualTo(colors[0]); in assertThemeValues()
104 assertThat(mNavigationBarColor).isEqualTo(colors[1]); in assertThemeValues()
105 assertThat(mStatusBarColor).isEqualTo(colors[2]); in assertThemeValues()
/cts/tests/media/src/android/mediav2/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/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/graphics/src/android/graphics/drawable/cts/
DGradientDrawableTest.java356 int[] colors; in testSetColors() local
358 colors = new int[] { Color.RED }; in testSetColors()
359 gradientDrawable.setColors(colors); in testSetColors()
360 assertArrayEquals("Color was set to " + Arrays.toString(colors), in testSetColors()
361 colors, gradientDrawable.getColors()); in testSetColors()
363 colors = null; in testSetColors()
364 gradientDrawable.setColors(colors); in testSetColors()
365 assertArrayEquals("Color was set to " + Arrays.toString(colors), in testSetColors()
366 colors, gradientDrawable.getColors()); in testSetColors()
710 int[] colors = drawable.getColors(); in testInflationWithThemeAndNonThemeResources() local
[all …]
/cts/suite/cts/utils/
Dgrapher.py29 colors = { variable
68 clr = colors.get(name, "#%06X" % (hash(name) % 0xFFFFFF))
/cts/tests/tests/graphics/assets/shaders/
Dtri.frag23 vec3 colors;
26 uFragColor = vec4(colorData.colors, 1.0);

12