/frameworks/base/libs/hwui/ |
H A D | GradientCache.h | 36 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 D | GradientCache.cpp | 45 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, Texture* texture) argument [all...] |
/frameworks/base/graphics/java/android/graphics/ |
H A D | SweepGradient.java | 42 * @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 107 nativeCreate1(float x, float y, int colors[], float positions[]) argument [all...] |
H A D | LinearGradient.java | 46 @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 init(nativeCreate1(x0, y0, x1, y1, colors, position 115 nativeCreate1(float x0, float y0, float x1, float y1, int colors[], float positions[], int tileMode) argument [all...] |
H A D | RadialGradient.java | 47 @param colors The colors to be distributed between the center and edge of the circle 50 the colors array. If <code>null</code>, colors are distributed evenly 55 @NonNull int colors[], @Nullable float stops[], @NonNull TileMode tileMode) { 59 if (colors.length < 2) { 60 throw new IllegalArgumentException("needs >= 2 number of colors"); 62 if (stops != null && colors.length != stops.length) { 69 mColors = colors; 72 init(nativeCreate1(centerX, centerY, radius, colors, stop 54 RadialGradient(float centerX, float centerY, float radius, @NonNull int colors[], @Nullable float stops[], @NonNull TileMode tileMode) argument 120 nativeCreate1(float x, float y, float radius, int colors[], float positions[], int tileMode) argument [all...] |
H A D | Bitmap.java | 384 * well as the ability to display transparent/translucent colors. 828 * pixel value set to the corresponding value in the colors array. Its 831 * @param colors Array of {@link Color} used to initialize the pixels. 833 * array of colors. 834 * @param stride Number of colors in the array between rows (must be >= 840 * bytes in the colors[] will be ignored (assumed to be FF) 844 public static Bitmap createBitmap(int colors[], int offset, int stride, argument 846 return createBitmap(null, colors, offset, stride, width, height, config); 851 * pixel value set to the corresponding value in the colors array. Its 856 * @param colors Arra 869 createBitmap(DisplayMetrics display, int colors[], int offset, int stride, int width, int height, Config config) argument 908 createBitmap(int colors[], int width, int height, Config config) argument 929 createBitmap(DisplayMetrics display, int colors[], int width, int height, Config config) argument 1607 nativeCreate(int[] colors, int offset, int stride, int width, int height, int nativeConfig, boolean mutable) argument 1631 nativeSetPixels(long nativeBitmap, int[] colors, int offset, int stride, int x, int y, int width, int height) argument [all...] |
H A D | Canvas.java | 36 * Path, text, Bitmap), and a paint (to describe the colors and styles for the 1437 * Treat the specified array of colors as a bitmap, and draw it. This gives 1440 * which can be more efficient if the colors are changing often. 1442 * @param colors Array of colors representing the pixels of the bitmap 1443 * @param offset Offset into the array of colors for the first pixel 1444 * @param stride The number of colors in the array between rows (must be 1450 * @param hasAlpha True if the alpha channel of the colors contains valid 1461 public void drawBitmap(@NonNull int[] colors, int offset, int stride, float x, float y, argument 1474 int length = colors 1497 drawBitmap(@onNull int[] colors, int offset, int stride, int x, int y, int width, int height, boolean hasAlpha, @Nullable Paint paint) argument 1551 drawBitmapMesh(@onNull Bitmap bitmap, int meshWidth, int meshHeight, @NonNull float[] verts, int vertOffset, @Nullable int[] colors, int colorOffset, @Nullable Paint paint) argument 1617 drawVertices(@onNull VertexMode mode, int vertexCount, @NonNull float[] verts, int vertOffset, @Nullable float[] texs, int texOffset, @Nullable int[] colors, int colorOffset, @Nullable short[] indices, int indexOffset, int indexCount, @NonNull Paint paint) argument 2060 native_drawBitmap(long nativeCanvas, int[] colors, int offset, int stride, float x, float y, int width, int height, boolean hasAlpha, long nativePaintOrZero) argument 2069 nativeDrawBitmapMesh(long nativeCanvas, long nativeBitmap, int meshWidth, int meshHeight, float[] verts, int vertOffset, int[] colors, int colorOffset, long nativePaint) argument 2075 nativeDrawVertices(long nativeCanvas, int mode, int n, float[] verts, int vertOffset, float[] texs, int texOffset, int[] colors, int colorOffset, short[] indices, int indexOffset, int indexCount, long nativePaint) argument [all...] |
/frameworks/base/graphics/tests/graphicstests/src/android/graphics/ |
H A D | BitmapTest.java | 81 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/tests/HwAccelerationTest/src/com/android/test/hwui/ |
H A D | GradientStopsActivity.java | 45 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 D | Gradient_Delegate.java | 44 * @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 D | LinearGradient_Delegate.java | 59 int colors[], float positions[], int tileMode) { 61 colors, positions, Shader_Delegate.getTileMode(tileMode)); 83 * @param colors The colors to be distributed along the gradient line 85 * corresponding color in the colors array. If this is null, the 86 * the colors are distributed evenly along the gradient line. 90 int colors[], float positions[], TileMode tile) { 91 super(colors, positions); 109 public LinearGradientPaint(float x0, float y0, float x1, float y1, int colors[], argument 111 super(colors, position 57 nativeCreate1(LinearGradient thisGradient, float x0, float y0, float x1, float y1, int colors[], float positions[], int tileMode) argument 89 LinearGradient_Delegate(float x0, float y0, float x1, float y1, int colors[], float positions[], TileMode tile) argument [all...] |
H A D | RadialGradient_Delegate.java | 58 int colors[], float positions[], int tileMode) { 60 colors, positions, Shader_Delegate.getTileMode(tileMode)); 80 * @param colors The colors to be distributed between the center and edge of 83 * color in the colors array. If this is NULL, the the colors are 87 private RadialGradient_Delegate(float x, float y, float radius, int colors[], float positions[], argument 89 super(colors, positions); 100 int[] colors, float[] positions, TileMode mode) { 101 super(colors, position 57 nativeCreate1(float x, float y, float radius, int colors[], float positions[], int tileMode) argument 99 RadialGradientPaint(float x, float y, float radius, int[] colors, float[] positions, TileMode mode) argument [all...] |
H A D | SweepGradient_Delegate.java | 55 /*package*/ static long nativeCreate1(float x, float y, int colors[], float positions[]) { argument 56 SweepGradient_Delegate newDelegate = new SweepGradient_Delegate(x, y, colors, positions); 72 * @param colors The colors to be distributed between around the center. 73 * There must be at least 2 colors in the array. 75 * each corresponding color in the colors array, beginning 78 * If positions is NULL, then the colors are automatically 82 int colors[], float positions[]) { 83 super(colors, positions); 92 public SweepGradientPaint(float cx, float cy, int[] colors, argument 81 SweepGradient_Delegate(float cx, float cy, int colors[], float positions[]) argument [all...] |
/frameworks/opt/colorpicker/src/com/android/colorpicker/ |
H A D | ColorPickerDialog.java | 31 * 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 D | ColorPickerPalette.java | 84 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/com/android/internal/util/ |
H A D | NotificationColorUtil.java | 153 * Inverts all the grayscale colors set by {@link android.text.style.TextAppearanceSpan}s on 180 int[] colors = colorStateList.getColors(); 182 for (int i = 0; i < colors.length; i++) { 183 if (ImageUtils.isGrayscale(colors[i])) { 185 // Allocate a new array so we don't change the colors in the old color state 188 colors = Arrays.copyOf(colors, colors.length); 190 colors[i] = processColor(colors[ [all...] |
/frameworks/support/v7/appcompat/src/android/support/v7/internal/widget/ |
H A D | TintManager.java | 239 final int[] colors = new int[7]; 244 colors[i] = getDisabledThemeAttrColor(R.attr.colorControlNormal); 248 colors[i] = colorControlActivated; 252 colors[i] = colorControlActivated; 256 colors[i] = colorControlActivated; 260 colors[i] = colorControlActivated; 264 colors[i] = colorControlActivated; 269 colors[i] = colorControlNormal; 272 mDefaultColorStateList = new ColorStateList(states, colors); 280 final int[] colors [all...] |
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/presentation/ |
H A D | Cube.java | 44 int colors[] = { 78 ByteBuffer cbb = ByteBuffer.allocateDirect(colors.length*4); 81 mColorBuffer.put(colors);
|
/frameworks/base/core/jni/android/graphics/ |
H A D | Shader.cpp | 124 SkColor colors[2]; local 125 colors[0] = color0; 126 colors[1] = color1; 128 SkShader* s = SkGradientShader::CreateLinear(pts, colors, NULL, 2, (SkShader::TileMode)tileMode); 166 SkColor colors[2]; local 167 colors[0] = color0; 168 colors[1] = color1; 170 SkShader* s = SkGradientShader::CreateRadial(center, radius, colors, NULL, 2, 181 const jint* colors = env->GetIntArrayElements(jcolors, NULL); local 191 reinterpret_cast<const SkColor*>(colors), po 200 SkColor colors[2]; local [all...] |
/frameworks/native/opengl/libagl/ |
H A D | dxt.cpp | 152 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/java/android/content/res/ |
H A D | ColorStateList.java | 41 * Lets you map {@link android.view.View} state sets to colors. 79 * states to colors. 81 public ColorStateList(int[][] states, int[] colors) { argument 83 mColors = colors; 86 mDefaultColor = colors[0]; 90 mDefaultColor = colors[i]; 158 * colors as this one but where each color has the specified alpha value 162 final int[] colors = new int[mColors.length]; 163 final int len = colors.length; 165 colors[ [all...] |
/frameworks/native/cmds/flatland/ |
H A D | Renderers.cpp | 22 static float colors[][4] = { member in namespace:android 33 float* color = colors[g_colorIndex]; 34 g_colorIndex = (g_colorIndex + 1) % NELEMS(colors);
|
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/ |
H A D | TitleView.java | 111 public void setSearchAffordanceColors(SearchOrbView.Colors colors) { argument 112 mSearchOrbView.setOrbColors(colors);
|
/frameworks/base/core/java/android/widget/ |
H A D | SimpleMonthAdapter.java | 87 void setCalendarTextColor(ColorStateList colors) { argument 88 mCalendarTextColors = colors;
|
/frameworks/base/include/private/graphics/ |
H A D | Canvas.h | 109 const float* verts, const float* tex, const int* colors, 121 const float* vertices, const int* colors, const SkPaint* paint) = 0;
|