/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...] |
/frameworks/base/libs/hwui/ |
H A D | GradientCache.h | 38 colors = nullptr; 42 GradientCacheEntry(uint32_t* colors, float* positions, uint32_t count) { argument 43 copy(colors, positions, count); 47 copy(entry.colors.get(), entry.positions.get(), entry.count); 52 copy(entry.colors.get(), entry.positions.get(), entry.count); 70 std::unique_ptr<uint32_t[]> colors; member in struct:android::uirenderer::GradientCacheEntry 75 void copy(uint32_t* colors, float* positions, uint32_t count) { argument 77 this->colors.reset(new uint32_t[count]); 80 memcpy(this->colors.get(), colors, coun [all...] |
H A D | GradientCache.cpp | 45 hash = JenkinsHashMix(hash, android::hash_type(colors[i])); 55 deltaInt = memcmp(lhs.colors.get(), rhs.colors.get(), lhs.count * sizeof(uint32_t)); 125 Texture* GradientCache::get(uint32_t* colors, float* positions, int count) { argument 126 GradientCacheEntry gradient(colors, positions, count); 130 texture = addLinearGradient(gradient, colors, positions, count); 140 void GradientCache::getGradientInfo(const uint32_t* colors, const int count, argument 153 if (((colors[i] >> 24) & 0xff) < 255) { 164 uint32_t* colors, float* positions, int count) { 167 getGradientInfo(colors, coun 163 addLinearGradient(GradientCacheEntry& gradient, uint32_t* colors, float* positions, int count) argument 234 generateTexture(uint32_t* colors, float* positions, Texture* texture) 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/support/v7/appcompat/src/android/support/v7/internal/widget/ |
H A D | TintManager.java | 336 final int[] colors = new int[7]; 341 colors[i] = getDisabledThemeAttrColor(context, R.attr.colorControlNormal); 345 colors[i] = colorControlActivated; 349 colors[i] = colorControlActivated; 353 colors[i] = colorControlActivated; 357 colors[i] = colorControlActivated; 361 colors[i] = colorControlActivated; 366 colors[i] = colorControlNormal; 369 mDefaultColorStateList = new ColorStateList(states, colors); 376 final int[] colors [all...] |
H A D | ThemeUtils.java | 49 final int[] colors = new int[2]; 54 colors[i] = disabledTextColor; 59 colors[i] = textColor; 62 return new ColorStateList(states, colors);
|
/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 | 61 int colors[], float positions[], int tileMode) { 63 colors, positions, Shader_Delegate.getTileMode(tileMode)); 85 * @param colors The colors to be distributed along the gradient line 87 * corresponding color in the colors array. If this is null, the 88 * the colors are distributed evenly along the gradient line. 92 int colors[], float positions[], TileMode tile) { 93 super(colors, positions); 111 public LinearGradientPaint(float x0, float y0, float x1, float y1, int colors[], argument 113 super(colors, position 59 nativeCreate1(LinearGradient thisGradient, float x0, float y0, float x1, float y1, int colors[], float positions[], int tileMode) argument 91 LinearGradient_Delegate(float x0, float y0, float x1, float y1, int colors[], float positions[], TileMode tile) argument [all...] |
H A D | RadialGradient_Delegate.java | 60 int colors[], float positions[], int tileMode) { 62 colors, positions, Shader_Delegate.getTileMode(tileMode)); 82 * @param colors The colors to be distributed between the center and edge of 85 * color in the colors array. If this is NULL, the the colors are 89 private RadialGradient_Delegate(float x, float y, float radius, int colors[], float positions[], argument 91 super(colors, positions); 102 int[] colors, float[] positions, TileMode mode) { 103 super(colors, position 59 nativeCreate1(float x, float y, float radius, int colors[], float positions[], int tileMode) argument 101 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/support/design/base/android/support/design/widget/ |
H A D | CircularBorderDrawable.java | 150 final int[] colors = new int[6]; 151 colors[0] = ColorUtils.compositeColors(mTopOuterStrokeColor, mTintColor); 152 colors[1] = ColorUtils.compositeColors(mTopInnerStrokeColor, mTintColor); 153 colors[2] = ColorUtils.compositeColors( 155 colors[3] = ColorUtils.compositeColors( 157 colors[4] = ColorUtils.compositeColors(mBottomInnerStrokeColor, mTintColor); 158 colors[5] = ColorUtils.compositeColors(mBottomOuterStrokeColor, mTintColor); 171 colors, positions,
|
/frameworks/support/v7/palette/src/main/java/android/support/v7/graphics/ |
H A D | ColorCutQuantizer.java | 33 * colors rather than representation colors. 37 * requested number of colors. An average color is then generated from each cube. 41 * This means that the color space is divided into distinct colors, rather than representative 42 * colors. 68 * @param maxColors The maximum number of colors that should be in the result palette. 88 // Now let's count the number of distinct colors 102 mTimingLogger.addSplit("Filtered colors and distinct colors counted"); 105 // Now lets go through create an array consisting of only distinct colors [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"; 64 public static ColorPickerDialog newInstance(int titleResId, int[] colors, int selectedColor, argument 67 ret.initialize(titleResId, colors, selectedColor, columns, size); 71 public void initialize(int titleResId, int[] colors, int selectedColor, int columns, int size) { argument 73 setColors(colors, selectedColor); 163 public void setColors(int[] colors, int selectedColor) { argument 164 if (mColors != colors || mSelectedColor != selectedColor) { 165 mColors = colors; 171 public void setColors(int[] colors) { argument [all...] |
H A D | ColorPickerPalette.java | 84 public void drawPalette(int[] colors, int selectedColor) { argument 85 drawPalette(colors, selectedColor, null); 91 public void drawPalette(int[] colors, int selectedColor, String[] colorContentDescriptions) { argument 92 if (colors == null) { 101 // Fills the table with swatches based on the array of colors. 103 for (int color : colors) { 142 * Add a content description to the specified swatch view. Because the colors get added in a 143 * snaking form, every other row will need to compensate for the fact that the colors are added
|
/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/java/com/android/internal/util/ |
H A D | NotificationColorUtil.java | 168 * Inverts all the grayscale colors set by {@link android.text.style.TextAppearanceSpan}s on 195 int[] colors = colorStateList.getColors(); 197 for (int i = 0; i < colors.length; i++) { 198 if (ImageUtils.isGrayscale(colors[i])) { 200 // Allocate a new array so we don't change the colors in the old color state 203 colors = Arrays.copyOf(colors, colors.length); 205 colors[i] = processColor(colors[ [all...] |
/frameworks/base/core/jni/android/graphics/ |
H A D | Shader.cpp | 137 SkColor colors[2]; local 138 colors[0] = color0; 139 colors[1] = color1; 141 SkShader* s = SkGradientShader::CreateLinear(pts, colors, NULL, 2, (SkShader::TileMode)tileMode); 179 SkColor colors[2]; local 180 colors[0] = color0; 181 colors[1] = color1; 183 SkShader* s = SkGradientShader::CreateRadial(center, radius, colors, NULL, 2, 194 const jint* colors = env->GetIntArrayElements(jcolors, NULL); local 204 reinterpret_cast<const SkColor*>(colors), po 213 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 | 47 * Lets you map {@link android.view.View} state sets to colors. 98 * states to colors. 100 public ColorStateList(int[][] states, @ColorInt int[] colors) { argument 102 mColors = colors; 227 * Creates a new ColorStateList that has the same states and colors as this 235 final int[] colors = new int[mColors.length]; 236 final int len = colors.length; 238 colors[i] = (mColors[i] & 0xFFFFFF) | (alpha << 24); 241 return new ColorStateList(mStateSpecs, colors); 522 * Return the colors i [all...] |
/frameworks/support/design/eclair-mr1/android/support/design/widget/ |
H A D | FloatingActionButtonEclairMr1.java | 251 final int[] colors = new int[3]; 255 colors[i] = selectedColor; 259 colors[i] = selectedColor; 264 colors[i] = Color.TRANSPARENT; 267 return new ColorStateList(states, colors);
|
/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 | 110 public void setSearchAffordanceColors(SearchOrbView.Colors colors) { argument 111 mSearchOrbView.setOrbColors(colors);
|