Searched defs:colors (Results 1 - 25 of 35) sorted by relevance

12

/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...]
/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 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...]
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 DBitmap_Delegate.java258 /*package*/ static Bitmap nativeCreate(int[] colors, int offset, int stride, int width, argument
265 if (colors != null) {
266 image.setRGB(0, 0, width, height, colors, offset, stride);
444 /*package*/ static void nativeSetPixels(int nativeBitmap, int[] colors, int offset, argument
451 delegate.getImage().setRGB(x, y, width, height, colors, offset, stride);
/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/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.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
H A DDisplayListRenderer.cpp309 float* vertices, int* colors, SkPaint* paint) {
314 colors = refBuffer<int>(colors, count);
317 vertices, colors, paint));
308 drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight, float* vertices, int* colors, SkPaint* paint) argument
/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/opt/colorpicker/src/com/android/colorpicker/
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
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...]
/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...]
H A DBitmap.cpp226 const SkPMColor* colors = ctable->lockColors(); local
228 *dst++ = SkUnPreMultiply::PMColorToColor(colors[*s++]);
237 const SkPMColor* colors = ctable->lockColors(); local
239 SkPMColor c = colors[*s++];
250 const SkPMColor* colors = ctable->lockColors(); local
252 SkPMColor c = colors[*s++];
732 if (memcmp(alc0.colors(), alc1.colors(), size) != 0) {
H A DCanvas.cpp731 const SkColor* colors = NULL; local
734 colors = (const SkColor*)(colorA.ptr() + colorIndex);
740 canvas->drawVertices(mode, ptCount, verts, texs, colors, NULL,
/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...]
H A Dtexture.cpp256 GGLfixed colors[4] = { 0, 0, 0, 0x10000 }; local
263 ggl->color4xv(ggl, 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/native/opengl/libs/ETC1/
H A Detc1.cpp379 int r1, g1, b1, r2, g2, b2; // 8 bit base colors for sub-blocks
486 etc1_byte colors[6]; local
488 etc_average_colors_subblock(pIn, inMask, colors, false, false);
489 etc_average_colors_subblock(pIn, inMask, colors + 3, false, true);
494 etc_encode_block_helper(pIn, inMask, colors, &a, false);
/frameworks/base/core/jni/
H A Dandroid_view_GLES20Canvas.cpp409 OpenGLRenderer* renderer, jintArray colors, jint offset, jint stride,
420 if (!GraphicsJNI::SetPixels(env, colors, offset, stride, 0, 0, width, height, *bitmap, true)) {
435 jint meshWidth, jint meshHeight, jfloatArray vertices, jint offset, jintArray colors,
441 jint* colorsArray = colors ? env->GetIntArrayElements(colors, NULL) + colorOffset : NULL;
446 if (colors) env->ReleaseIntArrayElements(colors, colorsArray, 0);
408 android_view_GLES20Canvas_drawBitmapData(JNIEnv* env, jobject clazz, OpenGLRenderer* renderer, jintArray colors, jint offset, jint stride, jfloat left, jfloat top, jint width, jint height, jboolean hasAlpha, SkPaint* paint) argument
433 android_view_GLES20Canvas_drawBitmapMesh(JNIEnv* env, jobject clazz, OpenGLRenderer* renderer, SkBitmap* bitmap, jbyteArray buffer, jint meshWidth, jint meshHeight, jfloatArray vertices, jint offset, jintArray colors, jint colorOffset, SkPaint* paint) argument

Completed in 371 milliseconds

12