Searched refs:colors (Results 1 - 25 of 80) sorted by path

1234

/frameworks/base/core/java/android/content/res/
H A DColorStateList.java48 * Lets you map {@link android.view.View} state sets to colors.
151 * states to colors.
153 public ColorStateList(int[][] states, @ColorInt int[] colors) { argument
155 mColors = colors;
280 * Creates a new ColorStateList that has the same states and colors as this
288 final int[] colors = new int[mColors.length];
289 final int len = colors.length;
291 colors[i] = (mColors[i] & 0xFFFFFF) | (alpha << 24);
294 return new ColorStateList(mStateSpecs, colors);
578 * Return the colors i
[all...]
H A DStringBlock.java331 ColorStateList colors = res.getColorStateList(colorRes, null);
333 return new TextAppearanceSpan(null, 0, 0, colors, null);
335 c = colors.getDefaultColor();
/frameworks/base/core/java/android/widget/
H A DDatePickerCalendarDelegate.java220 // We somehow failed to obtain the colors.
225 final int[] colors = new int[] { activatedColor, defaultColor };
226 return new ColorStateList(stateSet, colors);
H A DNumberPicker.java756 ColorStateList colors = mInputText.getTextColors();
757 int color = colors.getColorForState(ENABLED_STATE_SET, Color.WHITE);
H A DSwitch.java305 ColorStateList colors;
308 colors = appearance.getColorStateList(com.android.internal.R.styleable.
310 if (colors != null) {
311 mTextColors = colors;
H A DTextView.java3258 public void setTextColor(ColorStateList colors) { argument
3259 if (colors == null) {
3263 mTextColor = colors;
3268 * Gets the text colors for the different states (normal, selected, focused) of the TextView.
3498 public final void setHintTextColor(ColorStateList colors) { argument
3499 mHintTextColor = colors;
3551 public final void setLinkTextColor(ColorStateList colors) { argument
3552 mLinkTextColor = colors;
3557 * @return the list of colors used to paint the links in the text, for the different states of
8710 ColorStateList colors
[all...]
H A DTimePickerClockDelegate.java293 // We somehow failed to obtain the colors.
298 final int[] colors = new int[] { activatedColor, defaultColor };
299 return new ColorStateList(stateSet, colors);
/frameworks/base/core/java/com/android/internal/util/
H A DNotificationColorUtil.java174 * Inverts all the grayscale colors set by {@link android.text.style.TextAppearanceSpan}s on
201 int[] colors = colorStateList.getColors();
203 for (int i = 0; i < colors.length; i++) {
204 if (ImageUtils.isGrayscale(colors[i])) {
206 // Allocate a new array so we don't change the colors in the old color state
209 colors = Arrays.copyOf(colors, colors.length);
211 colors[i] = processColor(colors[
[all...]
/frameworks/base/core/jni/android/graphics/
H A DBitmap.cpp608 const SkPMColor* colors = ctable->readColors(); local
610 *dst++ = SkUnPreMultiply::PMColorToColor(colors[*s++]);
618 const SkPMColor* colors = ctable->readColors(); local
620 SkPMColor c = colors[*s++];
630 const SkPMColor* colors = ctable->readColors(); local
632 SkPMColor c = colors[*s++];
H A DBitmapFactory.cpp372 SkPMColor colors[256]; local
374 colorTable.reset(new SkColorTable(colors, maxColors));
376 // SkColorTable expects us to initialize all of the colors before creating an
379 // It is safe for SkAndroidCodec to modify the colors because this SkBitmap is
481 // colors may not be correct, since Skia does not yet support drawing
H A DGraphicsJNI.h114 /** Copy the colors in colors[] to the bitmap, convert to the correct
118 static bool SetPixels(JNIEnv* env, jintArray colors, int srcOffset,
H A DShader.cpp142 SkColor colors[2]; local
143 colors[0] = color0;
144 colors[1] = color1;
146 SkShader* s = SkGradientShader::CreateLinear(pts, colors, NULL, 2, (SkShader::TileMode)tileMode);
184 SkColor colors[2]; local
185 colors[0] = color0;
186 colors[1] = color1;
188 SkShader* s = SkGradientShader::CreateRadial(center, radius, colors, NULL, 2,
199 const jint* colors = env->GetIntArrayElements(jcolors, NULL); local
209 reinterpret_cast<const SkColor*>(colors), po
218 SkColor colors[2]; local
[all...]
/frameworks/base/core/jni/
H A Dandroid_graphics_Canvas.cpp323 const int* colors = NULL; local
327 colors = colorA.ptr() + colorIndex;
335 get_canvas(canvasHandle)->drawVertices(mode, vertexCount, verts, texs, colors,
/frameworks/base/graphics/java/android/graphics/
H A DBitmap.java420 * well as the ability to display transparent/translucent colors.
895 * pixel value set to the corresponding value in the colors array. Its
898 * @param colors Array of {@link Color} used to initialize the pixels.
900 * array of colors.
901 * @param stride Number of colors in the array between rows (must be >=
907 * bytes in the colors[] will be ignored (assumed to be FF)
911 public static Bitmap createBitmap(int colors[], int offset, int stride, argument
913 return createBitmap(null, colors, offset, stride, width, height, config);
918 * pixel value set to the corresponding value in the colors array. Its
923 * @param colors Arra
936 createBitmap(DisplayMetrics display, int colors[], int offset, int stride, int width, int height, Config config) argument
975 createBitmap(int colors[], int width, int height, Config config) argument
996 createBitmap(DisplayMetrics display, int colors[], int width, int height, Config config) argument
1688 nativeCreate(int[] colors, int offset, int stride, int width, int height, int nativeConfig, boolean mutable) argument
1714 nativeSetPixels(long nativeBitmap, int[] colors, int offset, int stride, int x, int y, int width, int height) argument
[all...]
H A DCanvas.java40 * Path, text, Bitmap), and a paint (to describe the colors and styles for the
1436 * Treat the specified array of colors as a bitmap, and draw it. This gives
1439 * which can be more efficient if the colors are changing often.
1441 * @param colors Array of colors representing the pixels of the bitmap
1442 * @param offset Offset into the array of colors for the first pixel
1443 * @param stride The number of colors in the array between rows (must be
1449 * @param hasAlpha True if the alpha channel of the colors contains valid
1460 public void drawBitmap(@NonNull int[] colors, int offset, int stride, float x, float y, argument
1473 int length = colors
1496 drawBitmap(@onNull int[] colors, int offset, int stride, int x, int y, int width, int height, boolean hasAlpha, @Nullable Paint paint) argument
1550 drawBitmapMesh(@onNull Bitmap bitmap, int meshWidth, int meshHeight, @NonNull float[] verts, int vertOffset, @Nullable int[] colors, int colorOffset, @Nullable Paint paint) argument
1616 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
2098 native_drawBitmap(long nativeCanvas, int[] colors, int offset, int stride, float x, float y, int width, int height, boolean hasAlpha, long nativePaintOrZero) argument
2107 nativeDrawBitmapMesh(long nativeCanvas, Bitmap bitmap, int meshWidth, int meshHeight, float[] verts, int vertOffset, int[] colors, int colorOffset, long nativePaint) argument
2113 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...]
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 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 DRadialGradient.java47 @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 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
107 nativeCreate1(float x, float y, int colors[], float positions[]) argument
[all...]
/frameworks/base/graphics/java/android/graphics/drawable/
H A DGradientDrawable.java206 * of colors for the gradient.
208 public GradientDrawable(Orientation orientation, @ColorInt int[] colors) { argument
209 this(new GradientState(orientation, colors), null);
623 * Sets the colors used to draw the gradient.
626 * least 2 colors.
628 * <strong>Note</strong>: changing colors will affect all instances of a
630 * {@link #mutate()} before changing the colors.
632 * @param colors an array containing 2 or more ARGB colors
636 public void setColors(@ColorInt int[] colors) { argument
1987 setGradientColors(@ullable int[] colors) argument
1993 setSolidColors(@ullable ColorStateList colors) argument
2024 setStroke(int width, @Nullable ColorStateList colors, float dashWidth, float dashGap) 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/include/androidfw/
H A DResourceTypes.h110 * The colors array contains hints for each of the regions. They are
131 // the xDivs, yDivs and colors arrays immediately after the location
147 // The offset (from the start of this structure) to the colors array
158 const int32_t* yDivs, const uint32_t* colors);
161 const int32_t* yDivs, const uint32_t* colors, void* outData);
/frameworks/base/libs/androidfw/
H A DResourceTypes.cpp165 uint32_t* colors = getColors(); local
167 colors[i] = htonl(colors[i]);
185 uint32_t* colors = getColors(); local
187 colors[i] = ntohl(colors[i]);
204 const int32_t* yDivs, const uint32_t* colors)
209 serialize(patch, xDivs, yDivs, colors, newData);
214 const int32_t* yDivs, const uint32_t* colors, void* outData)
225 memcpy(data, colors, patc
203 serialize(const Res_png_9patch& patch, const int32_t* xDivs, const int32_t* yDivs, const uint32_t* colors) argument
213 serialize(const Res_png_9patch& patch, const int32_t* xDivs, const int32_t* yDivs, const uint32_t* colors, void* outData) argument
[all...]
/frameworks/base/libs/hwui/
H A DBakedOpDispatcher.cpp451 const int* colors = op.colors; local
453 if (!colors) {
457 colors = tempColors.get();
484 ColorTextureVertex::set(vertex++, vertices[dx], vertices[dy], u2, v2, colors[dx / 2]);
485 ColorTextureVertex::set(vertex++, vertices[ax], vertices[ay], u1, v2, colors[ax / 2]);
486 ColorTextureVertex::set(vertex++, vertices[bx], vertices[by], u1, v1, colors[bx / 2]);
488 ColorTextureVertex::set(vertex++, vertices[dx], vertices[dy], u2, v2, colors[dx / 2]);
489 ColorTextureVertex::set(vertex++, vertices[bx], vertices[by], u1, v1, colors[bx / 2]);
490 ColorTextureVertex::set(vertex++, vertices[cx], vertices[cy], u2, v1, colors[c
[all...]
H A DDisplayListCanvas.cpp313 const float* vertices, const int* colors, const SkPaint* paint) {
317 colors = refBuffer<int>(colors, vertexCount); // 1 color per vertex
320 vertices, colors, paint));
312 drawBitmapMesh(const SkBitmap& bitmap, int meshWidth, int meshHeight, const float* vertices, const int* colors, const SkPaint* paint) argument
H A DDisplayListCanvas.h193 const float* verts, const float* tex, const int* colors,
205 const float* vertices, const int* colors, const SkPaint* paint) override;

Completed in 2091 milliseconds

1234