/frameworks/base/core/java/android/content/res/ |
H A D | ColorStateList.java | 48 * 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...] |
/frameworks/base/core/java/android/widget/ |
H A D | TextView.java | 3258 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...] |
/frameworks/base/core/jni/android/graphics/ |
H A D | Bitmap.cpp | 608 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 D | BitmapFactory.cpp | 372 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 D | Shader.cpp | 142 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 D | android_graphics_Canvas.cpp | 323 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 D | Bitmap.java | 420 * 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 D | Canvas.java | 40 * 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 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 | 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...] |
/frameworks/base/graphics/java/android/graphics/drawable/ |
H A D | GradientDrawable.java | 206 * 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/libs/androidfw/ |
H A D | ResourceTypes.cpp | 165 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 D | BakedOpDispatcher.cpp | 451 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 D | DisplayListCanvas.cpp | 313 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 D | DisplayListOp.h | 742 const float* vertices, const int* colors, const SkPaint* paint) 745 mVertices(vertices), mColors(colors) {} 741 DrawBitmapMeshOp(const SkBitmap* bitmap, int meshWidth, int meshHeight, const float* vertices, const int* colors, const SkPaint* paint) argument
|
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)); 108 Texture* GradientCache::get(uint32_t* colors, float* positions, int count) { argument 109 GradientCacheEntry gradient(colors, positions, count); 113 texture = addLinearGradient(gradient, colors, positions, count); 123 void GradientCache::getGradientInfo(const uint32_t* colors, const int count, argument 136 if (((colors[i] >> 24) & 0xff) < 255) { 147 uint32_t* colors, float* positions, int count) { 150 getGradientInfo(colors, coun 146 addLinearGradient(GradientCacheEntry& gradient, uint32_t* colors, float* positions, int count) argument 222 generateTexture(uint32_t* colors, float* positions, const uint32_t width, const uint32_t height, Texture* texture) argument [all...] |
H A D | GradientCache.h | 37 colors = nullptr; 41 GradientCacheEntry(uint32_t* colors, float* positions, uint32_t count) { argument 42 copy(colors, positions, count); 46 copy(entry.colors.get(), entry.positions.get(), entry.count); 51 copy(entry.colors.get(), entry.positions.get(), entry.count); 69 std::unique_ptr<uint32_t[]> colors; member in struct:android::uirenderer::GradientCacheEntry 74 void copy(uint32_t* colors, float* positions, uint32_t count) { argument 76 this->colors.reset(new uint32_t[count]); 79 memcpy(this->colors.get(), colors, coun [all...] |
H A D | OpenGLRenderer.cpp | 593 * quad is used to multiply the colors in the frame buffer. This is achieved by 984 uint32_t colors[] = { local 999 paint.setColor(colors[offset + (i & 0x1)]); 1512 const float* vertices, const int* colors, const SkPaint* paint) { 1528 if (!colors) { 1532 colors = tempColors.get(); 1558 ColorTextureVertex::set(vertex++, vertices[dx], vertices[dy], u2, v2, colors[dx / 2]); 1559 ColorTextureVertex::set(vertex++, vertices[ax], vertices[ay], u1, v2, colors[ax / 2]); 1560 ColorTextureVertex::set(vertex++, vertices[bx], vertices[by], u1, v1, colors[bx / 2]); 1562 ColorTextureVertex::set(vertex++, vertices[dx], vertices[dy], u2, v2, colors[d 1511 drawBitmapMesh(const SkBitmap* bitmap, int meshWidth, int meshHeight, const float* vertices, const int* colors, const SkPaint* paint) argument [all...] |
H A D | RecordedOp.h | 225 const float* vertices, const int* colors) 231 , colors(colors) {} 236 const int* colors; member in struct:android::uirenderer::BitmapMeshOp 224 BitmapMeshOp(BASE_PARAMS, const SkBitmap* bitmap, int meshWidth, int meshHeight, const float* vertices, const int* colors) argument
|
H A D | RecordingCanvas.cpp | 506 const float* vertices, const int* colors, const SkPaint* paint) { 514 refBuffer<int>(colors, vertexCount))); // 1 color per vertex 505 drawBitmapMesh(const SkBitmap& bitmap, int meshWidth, int meshHeight, const float* vertices, const int* colors, const SkPaint* paint) argument
|
H A D | SkiaCanvas.cpp | 134 const float* verts, const float* tex, const int* colors, 145 const float* vertices, const int* colors, const SkPaint* paint) override; 615 const float* verts, const float* texs, const int* colors, 622 (SkColor*)colors, NULL, indices, indexCount, paint); 648 const float* vertices, const int* colors, const SkPaint* paint) { 740 texs, (const SkColor*)colors, NULL, indices, 614 drawVertices(SkCanvas::VertexMode vertexMode, int vertexCount, const float* verts, const float* texs, const int* colors, const uint16_t* indices, int indexCount, const SkPaint& paint) argument 647 drawBitmapMesh(const SkBitmap& bitmap, int meshWidth, int meshHeight, const float* vertices, const int* colors, const SkPaint* paint) argument
|
H A D | SkiaCanvasProxy.cpp | 142 const SkPoint texs[], const SkColor colors[], SkXfermode*, const uint16_t indices[], 152 const int* cArray = (colors) ? (int*)colors : NULL; 360 void SkiaCanvasProxy::onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], argument 373 if (SkPatchUtils::getVertexData(&data, cubics, colors, texCoords, lod.width(), lod.height())) { 141 onDrawVertices(VertexMode mode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], SkXfermode*, const uint16_t indices[], int indexCount, const SkPaint& paint) argument
|
/frameworks/base/libs/hwui/tests/unit/ |
H A D | GradientCacheTests.cpp | 31 SkColor colors[] = { 0xFF00FF00, 0xFFFF0000, 0xFF0000FF }; local 33 Texture* texture = cache.get(colors, positions, 3);
|
/frameworks/base/libs/hwui/utils/ |
H A D | NinePatchImpl.cpp | 250 const uint32_t* colors = chunk.getColors(); local 254 color = colors[colorIndex++];
|