Home
last modified time | relevance | path

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

12

/cts/tests/tests/graphics/src/android/graphics/cts/
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.java233 int[] colors = createColors(100); in testCreateBitmap1() local
234 Bitmap bitmap = Bitmap.createBitmap(colors, 10, 10, Config.RGB_565); in testCreateBitmap1()
387 int[] colors = createColors(100); in testCreateBitmapFromColorsNegativeWidthHeight() local
390 Bitmap.createBitmap(colors, 0, 100, -1, 100, Config.RGB_565); in testCreateBitmapFromColorsNegativeWidthHeight()
395 int[] colors = createColors(100); in testCreateBitmapFromColorsIllegalStride() local
398 Bitmap.createBitmap(colors, 10, 10, 100, 100, Config.RGB_565); in testCreateBitmapFromColorsIllegalStride()
403 int[] colors = createColors(100); in testCreateBitmapFromColorsNegativeOffset() local
406 Bitmap.createBitmap(colors, -10, 100, 100, 100, Config.RGB_565); in testCreateBitmapFromColorsNegativeOffset()
411 int[] colors = createColors(100); in testCreateBitmapFromColorsOffsetTooLarge() local
414 Bitmap.createBitmap(colors, 10, 100, 100, 100, Config.RGB_565); in testCreateBitmapFromColorsOffsetTooLarge()
[all …]
/cts/tests/tests/text/src/android/text/cts/
DHtmlTest.java112 ForegroundColorSpan[] colors = s.getSpans(0, s.length(), type); in testColor() local
113 assertEquals(0xFF00FF00, colors[0].getForegroundColor()); in testColor()
116 colors = s.getSpans(0, s.length(), type); in testColor()
117 assertEquals(0xFF000080, colors[0].getForegroundColor()); in testColor()
120 colors = s.getSpans(0, s.length(), type); in testColor()
121 assertEquals(0, colors.length); in testColor()
125 colors = s.getSpans(0, s.length(), type); in testColor()
126 assertEquals(0xFF00FF00, colors[0].getForegroundColor()); in testColor()
129 colors = s.getSpans(0, s.length(), type); in testColor()
130 assertEquals(0xFF888888, colors[0].getForegroundColor()); in testColor()
[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.java205 WallpaperManager.OnColorsChangedListener counter = (colors, whichWp) -> latch.countDown(); in addRemoveOnColorsChangedListenerTest_onlyInvokeAdded()
255 WallpaperColors colors = mWallpaperManager.getWallpaperColors( in wallpaperColors_primary() local
259 Color primary = colors.getPrimaryColor(); in wallpaperColors_primary()
265 Assert.assertNull(colors.getSecondaryColor()); in wallpaperColors_primary()
266 Assert.assertNull(colors.getTertiaryColor()); in wallpaperColors_primary()
286 WallpaperColors colors = mWallpaperManager.getWallpaperColors( in wallpaperColors_secondary() local
290 Color secondary = colors.getSecondaryColor(); in wallpaperColors_secondary()
296 Assert.assertNull(colors.getTertiaryColor()); in wallpaperColors_secondary()
342 WallpaperManager.OnColorsChangedListener counter = (colors, whichWp) -> { in verifyColorListenerInvoked()
391 WallpaperManager.OnColorsChangedListener counter = (colors, whichWp) -> { in verifyColorListenerInvokedClearing()
[all …]
/cts/tests/tests/widget/src/android/widget/cts/
DSwitchTest.java98 ColorStateList colors = ColorStateList.valueOf(Color.RED); in testAccessThumbTint() local
99 mSwitch.setThumbTintList(colors); in testAccessThumbTint()
102 assertSame(colors, mSwitch.getThumbTintList()); in testAccessThumbTint()
115 ColorStateList colors = ColorStateList.valueOf(Color.RED); in testAccessThumbTintBlendMode() local
116 mSwitch.setThumbTintList(colors); in testAccessThumbTintBlendMode()
119 assertSame(colors, mSwitch.getThumbTintList()); in testAccessThumbTintBlendMode()
132 ColorStateList colors = ColorStateList.valueOf(Color.RED); in testAccessTrackTint() local
133 mSwitch.setTrackTintList(colors); in testAccessTrackTint()
136 assertSame(colors, mSwitch.getTrackTintList()); in testAccessTrackTint()
149 ColorStateList colors = ColorStateList.valueOf(Color.RED); in testAccessTrackTintBlendMode() local
[all …]
/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.java86 int[] colors = { in testDrawDoubleRoundRect() local
112 .runWithVerifier(new SamplePointVerifier(testPoints, colors)); in testDrawDoubleRoundRect()
127 int[] colors = { in testDrawDoubleRoundRectWithRadii() local
166 .runWithVerifier(new SamplePointVerifier(testPoints, colors)); in testDrawDoubleRoundRectWithRadii()
479 final int[] colors = new int[10]; in testDrawVerticesTooFewVerts() local
487 verts, 8, texs, 0, colors, 0, indices, in testDrawVerticesTooFewVerts()
495 final int[] colors = new int[10]; in testDrawVerticesTooFewTexs() local
503 verts, 0, texs, 30, colors, 0, indices, in testDrawVerticesTooFewTexs()
511 final int[] colors = new int[10]; in testDrawVerticesTooFewColors() local
519 verts, 0, texs, 0, colors, 30, indices, in testDrawVerticesTooFewColors()
[all …]
DExactCanvasTests.java281 int[] colors = new int[] { Color.BLACK, Color.BLACK, Color.BLACK }; in testBlackTriangleVertices() local
283 null, 0, colors, 0, null, 0, 0, in testBlackTriangleVertices()
342 int[] colors = new int[] { Color.BLACK, Color.BLACK, Color.BLACK }; in testBlackTriangleVertices2() local
344 null, 0, colors, 0, null, 0, 0, in testBlackTriangleVertices2()
/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/view/src/android/view/cts/
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/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/graphics/src/android/graphics/drawable/cts/
DGradientDrawableTest.java353 int[] colors; in testSetColors() local
355 colors = new int[] { Color.RED }; 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()
360 colors = null; in testSetColors()
361 gradientDrawable.setColors(colors); in testSetColors()
362 assertArrayEquals("Color was set to " + Arrays.toString(colors), in testSetColors()
363 colors, gradientDrawable.getColors()); in testSetColors()
707 int[] colors = drawable.getColors(); in testInflationWithThemeAndNonThemeResources() local
[all …]
DColorStateListDrawableTest.java56 final int[] colors = new int[]{Color.RED, Color.BLUE}; in setup() local
57 mColorStateList = new ColorStateList(state, colors); in setup()
106 final int[] colors = new int[]{Color.MAGENTA, Color.CYAN}; in testHasFocusStateSpecified() local
107 mDrawable.setColorStateList(new ColorStateList(state, colors)); in testHasFocusStateSpecified()
/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/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/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/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/uirendering/src/android/uirendering/cts/bitmapverifiers/
DSamplePointWideGamutVerifier.java33 public SamplePointWideGamutVerifier(Point[] points, Color[] colors, float eps) { in SamplePointWideGamutVerifier() argument
35 mColors = colors; in SamplePointWideGamutVerifier()
/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()
/cts/tests/inputmethod/src/android/view/inputmethod/cts/util/
DNavigationBarColorVerifier.java94 final int[] colors = new int[]{Color.RED, Color.GREEN, Color.BLUE}; in verify() local
95 for (int color : colors) { in verify()

12