Home
last modified time | relevance | path

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

/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.java203 int[] colors = createColors(100); in testCreateBitmap1() local
204 Bitmap bitmap = Bitmap.createBitmap(colors, 10, 10, Config.RGB_565); in testCreateBitmap1()
332 int[] colors = createColors(100); in testCreateBitmapFromColorsNegativeWidthHeight() local
335 Bitmap.createBitmap(colors, 0, 100, -1, 100, Config.RGB_565); in testCreateBitmapFromColorsNegativeWidthHeight()
340 int[] colors = createColors(100); in testCreateBitmapFromColorsIllegalStride() local
343 Bitmap.createBitmap(colors, 10, 10, 100, 100, Config.RGB_565); in testCreateBitmapFromColorsIllegalStride()
348 int[] colors = createColors(100); in testCreateBitmapFromColorsNegativeOffset() local
351 Bitmap.createBitmap(colors, -10, 100, 100, 100, Config.RGB_565); in testCreateBitmapFromColorsNegativeOffset()
356 int[] colors = createColors(100); in testCreateBitmapFromColorsOffsetTooLarge() local
359 Bitmap.createBitmap(colors, 10, 100, 100, 100, Config.RGB_565); in testCreateBitmapFromColorsOffsetTooLarge()
[all …]
DCanvasTest.java1531 final int[] colors = new int[2008]; in testDrawBitmapInts() local
1534 mCanvas.drawBitmap(colors, 10, 10, 10, 10, 0, 10, true, null); in testDrawBitmapInts()
1537 mCanvas.drawBitmap(colors, 10, 10, 10, 10, 10, 0, true, null); in testDrawBitmapInts()
1540 mCanvas.drawBitmap(colors, 10, 10, 10, 10, 10, 29, true, null); in testDrawBitmapInts()
1541 mCanvas.drawBitmap(colors, 10, 10, 10, 10, 10, 29, true, mPaint); in testDrawBitmapInts()
1578 final int[] colors = new int[2008]; in testDrawBitmapFloats() local
1581 mCanvas.drawBitmap(colors, 10, 10, 10.0f, 10.0f, 0, 10, true, null); in testDrawBitmapFloats()
1584 mCanvas.drawBitmap(colors, 10, 10, 10.0f, 10.0f, 10, 0, true, null); in testDrawBitmapFloats()
1587 mCanvas.drawBitmap(colors, 10, 10, 10.0f, 10.0f, 10, 29, true, null); in testDrawBitmapFloats()
1588 mCanvas.drawBitmap(colors, 10, 10, 10.0f, 10.0f, 10, 29, true, mPaint); in testDrawBitmapFloats()
[all …]
DPaintFlagsDrawFilterTest.java120 int colors[] = new int [] { Color.WHITE, Color.BLACK }; in testPaintFlagsDrawFilter2() local
125 grid.setPixel(i, j, colors[k]); in testPaintFlagsDrawFilter2()
/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 …]
DTextUtilsTest.java2066 ColorStateList colors = new ColorStateList(new int[][] { in testWriteToParcel() local
2071 null, Typeface.ITALIC, textSize, colors, null); in testWriteToParcel()
2091 … assertEquals(colors.toString(), ((TextAppearanceSpan) spans[1]).getTextColor().toString()); in testWriteToParcel()
/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()
DResources_ThemeTest.java76 XmlPullParser parser = getContext().getResources().getXml(R.xml.colors); in testObtainStyledAttributes()
78 attrs[0] = R.xml.colors; in testObtainStyledAttributes()
/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()
DImageReaderDecoderTest.java635 int[][] colors = new int[][] { in validateSwirl() local
692 + Arrays.toString(colors[layer]) + " vs " in validateSwirl()
694 Math.abs(stats[i] - colors[layer][i]) < COLOR_DELTA_ALLOWANCE); in validateSwirl()
/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/suite/cts/utils/
Dgrapher.py29 colors = { variable
68 clr = colors.get(name, "#%06X" % (hash(name) % 0xFFFFFF))
/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()
DTextViewTest.java621 ColorStateList colors = new ColorStateList(new int[][] { in testAccessTextColor() local
624 mTextView.setTextColor(colors); in testAccessTextColor()
625 assertSame(colors, mTextView.getTextColors()); in testAccessTextColor()
846 ColorStateList colors = new ColorStateList(new int[][] { in testAccessHintTextColor() local
849 mTextView.setHintTextColor(colors); in testAccessHintTextColor()
850 assertSame(colors, mTextView.getHintTextColors()); in testAccessHintTextColor()
876 ColorStateList colors = new ColorStateList(new int[][] { in testAccessLinkTextColor() local
879 mTextView.setLinkTextColor(colors); in testAccessLinkTextColor()
880 assertSame(colors, mTextView.getLinkTextColors()); in testAccessLinkTextColor()
4415 ColorStateList colors = ColorStateList.valueOf(Color.RED); in testAccessCompoundDrawableTint() local
[all …]
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DGradientDrawableTest.java339 int[] colors; in testSetColors() local
341 colors = new int[] { Color.RED }; in testSetColors()
342 gradientDrawable.setColors(colors); in testSetColors()
343 assertArrayEquals("Color was set to " + Arrays.toString(colors), in testSetColors()
344 colors, gradientDrawable.getColors()); in testSetColors()
346 colors = null; in testSetColors()
347 gradientDrawable.setColors(colors); in testSetColors()
348 assertArrayEquals("Color was set to " + Arrays.toString(colors), in testSetColors()
349 colors, gradientDrawable.getColors()); in testSetColors()
DNinePatchDrawableTest.java364 int[] colors = new int[sourceWidth * sourceHeight]; in testInflate() local
366 colors, sourceWidth, sourceHeight, Bitmap.Config.RGB_565); in testInflate()
/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/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/apps/CameraITS/tests/dng_noise_model/
Ddng_noise_model.py54 colors = 'rygcbm'
166 plt_s.plot(means_e, vars_e, colors[b%len(colors)] + ',')
/cts/tests/tests/text/src/android/text/style/cts/
DTextAppearanceSpanTest.java48 int[] colors = new int[] { Color.rgb(0, 0, 255), Color.BLACK }; in setup() local
49 mColorStateList = new ColorStateList(states, colors); in setup()
/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()