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

123

/frameworks/base/libs/hwui/
H A DGradientCache.h36 colors = NULL;
40 GradientCacheEntry(uint32_t* colors, float* positions, uint32_t count) { argument
41 copy(colors, positions, count);
45 copy(entry.colors, entry.positions, entry.count);
49 delete[] colors;
55 delete[] colors;
58 copy(entry.colors, entry.positions, entry.count);
76 uint32_t* colors; member in struct:android::uirenderer::GradientCacheEntry
81 void copy(uint32_t* colors, float* positions, uint32_t count) { argument
83 this->colors
[all...]
H A DGradientCache.cpp45 hash = JenkinsHashMix(hash, android::hash_type(colors[i]));
55 deltaInt = memcmp(lhs.colors, rhs.colors, lhs.count * sizeof(uint32_t));
132 Texture* GradientCache::get(uint32_t* colors, float* positions, int count) { argument
133 GradientCacheEntry gradient(colors, positions, count);
137 texture = addLinearGradient(gradient, colors, positions, count);
147 void GradientCache::getGradientInfo(const uint32_t* colors, const int count, argument
160 if (((colors[i] >> 24) & 0xff) < 255) {
171 uint32_t* colors, float* positions, int count) {
174 getGradientInfo(colors, coun
170 addLinearGradient(GradientCacheEntry& gradient, uint32_t* colors, float* positions, int count) argument
241 generateTexture(uint32_t* colors, float* positions, int count, Texture* texture) argument
[all...]
H A DSkiaShader.h161 ANDROID_API SkiaLinearGradientShader(float* bounds, uint32_t* colors, float* positions,
185 ANDROID_API SkiaSweepGradientShader(float x, float y, uint32_t* colors, float* positions,
195 SkiaSweepGradientShader(Type type, float x, float y, uint32_t* colors, float* positions,
210 ANDROID_API SkiaCircularGradientShader(float x, float y, float radius, uint32_t* colors,
H A DSkiaShader.cpp185 SkiaLinearGradientShader::SkiaLinearGradientShader(float* bounds, uint32_t* colors, argument
189 mBounds(bounds), mColors(colors), mPositions(positions), mCount(count) {
265 uint32_t* colors, float* positions, int count, SkShader* key, SkShader::TileMode tileMode,
267 SkiaSweepGradientShader(kCircularGradient, x, y, colors, positions, count, key,
303 SkiaSweepGradientShader::SkiaSweepGradientShader(float x, float y, uint32_t* colors, argument
307 mColors(colors), mPositions(positions), mCount(count) {
317 SkiaSweepGradientShader::SkiaSweepGradientShader(Type type, float x, float y, uint32_t* colors, argument
321 mColors(colors), mPositions(positions), mCount(count) {
264 SkiaCircularGradientShader(float x, float y, float radius, uint32_t* colors, float* positions, int count, SkShader* key, SkShader::TileMode tileMode, SkMatrix* matrix, bool blend) argument
/frameworks/base/graphics/java/android/graphics/
H A DSweepGradient.java42 * @param colors The colors to be distributed between around the center.
43 * There must be at least 2 colors in the array.
45 * each corresponding color in the colors array, beginning
48 * If positions is NULL, then the colors are automatically
52 int colors[], float positions[]) {
53 if (colors.length < 2) {
54 throw new IllegalArgumentException("needs >= 2 number of colors");
56 if (positions != null && colors.length != positions.length) {
63 mColors = colors;
51 SweepGradient(float cx, float cy, int colors[], float positions[]) argument
109 nativeCreate1(float x, float y, int colors[], float positions[]) argument
112 nativePostCreate1(int native_shader, float cx, float cy, int[] colors, float[] positions) argument
[all...]
H A DLinearGradient.java46 @param colors The colors to be distributed along the gradient line
48 each corresponding color in the colors array. If this is null,
49 the the colors are distributed evenly along the gradient line.
52 public LinearGradient(float x0, float y0, float x1, float y1, int colors[], float positions[], argument
54 if (colors.length < 2) {
55 throw new IllegalArgumentException("needs >= 2 number of colors");
57 if (positions != null && colors.length != positions.length) {
65 mColors = colors;
68 native_instance = nativeCreate1(x0, y0, x1, y1, colors, position
119 nativeCreate1(float x0, float y0, float x1, float y1, int colors[], float positions[], int tileMode) argument
123 nativePostCreate1(int native_shader, float x0, float y0, float x1, float y1, int colors[], float positions[], int tileMode) argument
[all...]
H A DRadialGradient.java44 @param colors The colors to be distributed between the center and edge of the circle
46 each corresponding color in the colors array. If this is NULL,
47 the the colors are distributed evenly between the center and edge of the circle.
51 int colors[], float positions[], TileMode tile) {
55 if (colors.length < 2) {
56 throw new IllegalArgumentException("needs >= 2 number of colors");
58 if (positions != null && colors.length != positions.length) {
65 mColors = colors;
68 native_instance = nativeCreate1(x, y, radius, colors, position
50 RadialGradient(float x, float y, float radius, int colors[], float positions[], TileMode tile) argument
120 nativeCreate1(float x, float y, float radius, int colors[], float positions[], int tileMode) argument
125 nativePostCreate1(int native_shader, float x, float y, float radius, int colors[], float positions[], int tileMode) argument
[all...]
H A DBitmap.java382 * well as the ability to display transparent/translucent colors.
825 * pixel value set to the corresponding value in the colors array. Its
828 * @param colors Array of {@link Color} used to initialize the pixels.
830 * array of colors.
831 * @param stride Number of colors in the array between rows (must be >=
837 * bytes in the colors[] will be ignored (assumed to be FF)
841 public static Bitmap createBitmap(int colors[], int offset, int stride, argument
843 return createBitmap(null, colors, offset, stride, width, height, config);
848 * pixel value set to the corresponding value in the colors array. Its
853 * @param colors Arra
866 createBitmap(DisplayMetrics display, int colors[], int offset, int stride, int width, int height, Config config) argument
905 createBitmap(int colors[], int width, int height, Config config) argument
926 createBitmap(DisplayMetrics display, int colors[], int width, int height, Config config) argument
1568 nativeCreate(int[] colors, int offset, int stride, int width, int height, int nativeConfig, boolean mutable) argument
1593 nativeSetPixels(int nativeBitmap, int[] colors, int offset, int stride, int x, int y, int width, int height, boolean isPremultiplied) argument
[all...]
H A DCanvas.java30 * Path, text, Bitmap), and a paint (to describe the colors and styles for the
1207 * Treat the specified array of colors as a bitmap, and draw it. This gives
1210 * which can be more efficient if the colors are changing often.
1212 * @param colors Array of colors representing the pixels of the bitmap
1213 * @param offset Offset into the array of colors for the first pixel
1214 * @param stride The number of colors in the array between rows (must be
1220 * @param hasAlpha True if the alpha channel of the colors contains valid
1225 public void drawBitmap(int[] colors, int offset, int stride, float x, float y, argument
1238 int length = colors
1254 drawBitmap(int[] colors, int offset, int stride, int x, int y, int width, int height, boolean hasAlpha, Paint paint) argument
1308 drawBitmapMesh(Bitmap bitmap, int meshWidth, int meshHeight, float[] verts, int vertOffset, int[] colors, int colorOffset, Paint paint) argument
1373 drawVertices(VertexMode mode, int vertexCount, float[] verts, int vertOffset, float[] texs, int texOffset, int[] colors, int colorOffset, short[] indices, int indexOffset, int indexCount, Paint paint) argument
1799 native_drawBitmap(int nativeCanvas, int[] colors, int offset, int stride, float x, float y, int width, int height, boolean hasAlpha, int nativePaintOrZero) argument
1806 nativeDrawBitmapMesh(int nCanvas, int nBitmap, int meshWidth, int meshHeight, float[] verts, int vertOffset, int[] colors, int colorOffset, int nPaint) argument
1810 nativeDrawVertices(int nCanvas, int mode, int n, float[] verts, int vertOffset, float[] texs, int texOffset, int[] colors, int colorOffset, short[] indices, int indexOffset, int indexCount, int nPaint) argument
[all...]
/frameworks/base/graphics/tests/graphicstests/src/android/graphics/
H A DBitmapTest.java81 int[] colors = new int[100];
83 colors[i] = (0xFF << 24) | (i << 16) | (i << 8) | i;
86 Bitmap bm = Bitmap.createBitmap(colors, 10, 10,
98 assertEquals("getPixel", p, colors[i]);
107 int[] colors = new int[100];
109 colors[i] = (0xFF << 24) | (i << 16) | (i << 8) | i;
112 Bitmap bm = Bitmap.createBitmap(colors, 10, 10, Bitmap.Config.RGB_565);
124 int[] colors = new int[100];
126 colors[i] = (0xFF << 24) | (i << 16) | (i << 8) | i;
130 Bitmap bm1 = Bitmap.createBitmap(colors, 1
[all...]
/frameworks/base/core/tests/coretests/src/android/text/
H A DHtmlTest.java80 ForegroundColorSpan[] colors;
83 colors = s.getSpans(0, s.length(), ForegroundColorSpan.class);
84 assertEquals(1, colors.length);
85 assertEquals(0xFF00FF00, colors[0].getForegroundColor());
88 colors = s.getSpans(0, s.length(), ForegroundColorSpan.class);
89 assertEquals(1, colors.length);
90 assertEquals(0xFF000080, colors[0].getForegroundColor());
93 colors = s.getSpans(0, s.length(), ForegroundColorSpan.class);
94 assertEquals(0, colors.length);
102 TextAppearanceSpan[] colors;
[all...]
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
H A DGradientStopsActivity.java45 int[] colors = new int[] { 0xffff0000, 0xff0000ff };
48 colors, positions, Shader.TileMode.CLAMP);
55 colors = new int[] { 0xffff0000, 0xff0000ff, 0xff00ff00 };
58 colors, positions, Shader.TileMode.CLAMP);
65 colors = new int[] { 0xffff0000, 0xff0000ff, 0xff00ff00 };
68 colors, positions, Shader.TileMode.CLAMP);
75 colors = new int[] { 0xff000000, 0xffffffff };
77 colors, null, Shader.TileMode.CLAMP);
85 colors, null, Shader.TileMode.REPEAT);
93 colors, nul
[all...]
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
H A DGradient_Delegate.java44 * @param colors The colors to be distributed along the gradient line
46 * corresponding color in the colors array. If this is null, the
47 * the colors are distributed evenly along the gradient line.
49 protected Gradient_Delegate(int colors[], float positions[]) { argument
50 if (colors.length < 2) {
51 throw new IllegalArgumentException("needs >= 2 number of colors");
53 if (positions != null && colors.length != positions.length) {
58 float spacing = 1.f / (colors.length - 1);
59 positions = new float[colors
84 GradientPaint(int[] colors, float[] positions, TileMode tileMode) argument
[all...]
H A DLinearGradient_Delegate.java59 int colors[], float positions[], int tileMode) {
61 colors, positions, Shader_Delegate.getTileMode(tileMode));
77 int colors[], float positions[], int tileMode) {
99 * @param colors The colors to be distributed along the gradient line
101 * corresponding color in the colors array. If this is null, the
102 * the colors are distributed evenly along the gradient line.
106 int colors[], float positions[], TileMode tile) {
107 super(colors, positions);
125 public LinearGradientPaint(float x0, float y0, float x1, float y1, int colors[], argument
57 nativeCreate1(LinearGradient thisGradient, float x0, float y0, float x1, float y1, int colors[], float positions[], int tileMode) argument
75 nativePostCreate1(LinearGradient thisGradient, int native_shader, float x0, float y0, float x1, float y1, int colors[], float positions[], int tileMode) argument
105 LinearGradient_Delegate(float x0, float y0, float x1, float y1, int colors[], float positions[], TileMode tile) argument
[all...]
H A DRadialGradient_Delegate.java58 int colors[], float positions[], int tileMode) {
60 colors, positions, Shader_Delegate.getTileMode(tileMode));
73 int colors[], float positions[], int tileMode) {
94 * @param colors The colors to be distributed between the center and edge of
97 * color in the colors array. If this is NULL, the the colors are
101 private RadialGradient_Delegate(float x, float y, float radius, int colors[], float positions[], argument
103 super(colors, positions);
114 int[] colors, floa
57 nativeCreate1(float x, float y, float radius, int colors[], float positions[], int tileMode) argument
72 nativePostCreate1(int native_shader, float x, float y, float radius, int colors[], float positions[], int tileMode) argument
113 RadialGradientPaint(float x, float y, float radius, int[] colors, float[] positions, TileMode mode) argument
[all...]
H A DSweepGradient_Delegate.java55 /*package*/ static int nativeCreate1(float x, float y, int colors[], float positions[]) { argument
56 SweepGradient_Delegate newDelegate = new SweepGradient_Delegate(x, y, colors, positions);
67 int[] colors, float[] positions) {
86 * @param colors The colors to be distributed between around the center.
87 * There must be at least 2 colors in the array.
89 * each corresponding color in the colors array, beginning
92 * If positions is NULL, then the colors are automatically
96 int colors[], float positions[]) {
97 super(colors, position
66 nativePostCreate1(int native_shader, float cx, float cy, int[] colors, float[] positions) argument
95 SweepGradient_Delegate(float cx, float cy, int colors[], float positions[]) argument
106 SweepGradientPaint(float cx, float cy, int[] colors, float[] positions) argument
[all...]
/frameworks/opt/colorpicker/src/com/android/colorpicker/
H A DColorPickerDialog.java31 * A dialog which takes in as input an array of colors and creates a palette allowing the user to
42 protected static final String KEY_COLORS = "colors";
62 public static ColorPickerDialog newInstance(int titleResId, int[] colors, int selectedColor, argument
65 ret.initialize(titleResId, colors, selectedColor, columns, size);
69 public void initialize(int titleResId, int[] colors, int selectedColor, int columns, int size) { argument
71 setColors(colors, selectedColor);
159 public void setColors(int[] colors, int selectedColor) { argument
160 if (mColors != colors || mSelectedColor != selectedColor) {
161 mColors = colors;
167 public void setColors(int[] colors) { argument
[all...]
H A DColorPickerPalette.java84 public void drawPalette(int[] colors, int selectedColor) { argument
85 if (colors == null) {
94 // Fills the table with swatches based on the array of colors.
96 for (int color : colors) {
136 * Add a content description to the specified swatch view. Because the colors get added in a
137 * snaking form, every other row will need to compensate for the fact that the colors are added
/frameworks/base/core/java/android/content/res/
H A DColorStateList.java37 * Lets you map {@link android.view.View} state sets to colors.
76 * states to colors.
78 public ColorStateList(int[][] states, int[] colors) { argument
80 mColors = colors;
83 mDefaultColor = colors[0];
87 mDefaultColor = colors[i];
156 * colors as this one but where each color has the specified alpha value
160 int[] colors = new int[mColors.length];
162 int len = colors.length;
164 colors[
[all...]
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/presentation/
H A DCube.java44 int colors[] = {
78 ByteBuffer cbb = ByteBuffer.allocateDirect(colors.length*4);
81 mColorBuffer.put(colors);
/frameworks/native/opengl/libagl/
H A Ddxt.cpp152 uint32_t colors = *d32++; local
155 colors = swap(colors);
158 uint16_t color0 = colors & 0xffff;
159 uint16_t color1 = colors >> 16;
207 // Specified colors from the previous block
215 uint32_t colors = *d32++; local
219 colors = swap(colors);
223 // Raw colors
338 uint32_t colors = *d32++; local
462 uint32_t colors = *d32++; local
[all...]
/frameworks/base/core/jni/android/graphics/
H A DShader.cpp248 SkColor colors[2]; local
249 colors[0] = color0;
250 colors[1] = color1;
252 SkShader* s = SkGradientShader::CreateLinear(pts, colors, NULL, 2, (SkShader::TileMode)tileMode);
296 SkColor colors[2]; local
297 colors[0] = color0;
298 colors[1] = color1;
300 SkShader* s = SkGradientShader::CreateRadial(center, SkFloatToScalar(radius), colors, NULL,
370 const jint* colors = env->GetIntArrayElements(jcolors, NULL); local
386 reinterpret_cast<const SkColor*>(colors),
396 SkColor colors[2]; local
[all...]
/frameworks/native/cmds/flatland/
H A DRenderers.cpp22 static float colors[][4] = { member in namespace:android
33 float* color = colors[g_colorIndex];
34 g_colorIndex = (g_colorIndex + 1) % NELEMS(colors);
/frameworks/base/graphics/java/android/graphics/drawable/
H A DGradientDrawable.java160 * of colors for the gradient.
162 public GradientDrawable(Orientation orientation, int[] colors) { argument
163 this(new GradientState(orientation, colors));
407 * <p>Sets the colors used to draw the gradient. Each color is specified as an
408 * ARGB integer and the array must contain at least 2 colors.</p>
413 * @param colors 2 or more ARGB colors
418 public void setColors(int[] colors) { argument
419 mGradientState.setColors(colors);
707 final int[] colors
1106 GradientState(Orientation orientation, int[] colors) argument
1178 setColors(int[] colors) argument
[all...]
/frameworks/base/tools/aapt/
H A DImages.cpp49 free(info9Patch.colors);
128 NOISY(printf("Image %s: w=%d, h=%d, d=%d, colors=%d, inter=%d, comp=%d\n",
603 // colors we can use in the 9-patch format.
611 image->info9Patch.colors = (uint32_t*)malloc(numColors * sizeof(uint32_t));
654 image->info9Patch.colors[colorIndex++] = c;
666 printf(" #%08x", image->info9Patch.colors[i]);
718 assert(outPatch->colors[i] == inPatch->colors[i]);
734 if (patch1.colors[i] != patch2.colors[
811 uint32_t colors[256], col; local
[all...]

Completed in 3162 milliseconds

123