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

12

/frameworks/base/graphics/java/android/graphics/
H A DSweepGradient.java26 * @param colors The colors to be distributed between around the center.
27 * There must be at least 2 colors in the array.
29 * each corresponding color in the colors array, beginning
32 * If positions is NULL, then the colors are automatically
36 int colors[], float positions[]) {
37 if (colors.length < 2) {
38 throw new IllegalArgumentException("needs >= 2 number of colors");
40 if (positions != null && colors.length != positions.length) {
44 native_instance = nativeCreate1(cx, cy, colors, position
35 SweepGradient(float cx, float cy, int colors[], float positions[]) argument
61 nativeCreate1(float x, float y, int colors[], float positions[]) argument
64 nativePostCreate1(int native_shader, float cx, float cy, int[] colors, float[] positions) argument
[all...]
H A DLinearGradient.java25 @param colors The colors to be distributed along the gradient line
27 each corresponding color in the colors array. If this is null,
28 the the colors are distributed evenly along the gradient line.
31 public LinearGradient(float x0, float y0, float x1, float y1, int colors[], float positions[], argument
33 if (colors.length < 2) {
34 throw new IllegalArgumentException("needs >= 2 number of colors");
36 if (positions != null && colors.length != positions.length) {
39 native_instance = nativeCreate1(x0, y0, x1, y1, colors, positions, tile.nativeInt);
40 native_shader = nativePostCreate1(native_instance, x0, y0, x1, y1, colors, position
60 nativeCreate1(float x0, float y0, float x1, float y1, int colors[], float positions[], int tileMode) argument
64 nativePostCreate1(int native_shader, float x0, float y0, float x1, float y1, int colors[], float positions[], int tileMode) argument
[all...]
H A DRadialGradient.java25 @param colors The colors to be distributed between the center and edge of the circle
27 each corresponding color in the colors array. If this is NULL,
28 the the colors are distributed evenly between the center and edge of the circle.
32 int colors[], float positions[], TileMode tile) {
36 if (colors.length < 2) {
37 throw new IllegalArgumentException("needs >= 2 number of colors");
39 if (positions != null && colors.length != positions.length) {
42 native_instance = nativeCreate1(x, y, radius, colors, positions, tile.nativeInt);
43 native_shader = nativePostCreate1(native_instance, x, y, radius, colors, position
31 RadialGradient(float x, float y, float radius, int colors[], float positions[], TileMode tile) argument
65 nativeCreate1(float x, float y, float radius, int colors[], float positions[], int tileMode) argument
70 nativePostCreate1(int native_shader, float x, float y, float radius, int colors[], float positions[], int tileMode) argument
[all...]
H A DBitmap.java280 * well as the ability to display transparent/translucent colors.
707 * pixel value set to the corresponding value in the colors array. Its
710 * @param colors Array of {@link Color} used to initialize the pixels.
712 * array of colors.
713 * @param stride Number of colors in the array between rows (must be >=
719 * bytes in the colors[] will be ignored (assumed to be FF)
723 public static Bitmap createBitmap(int colors[], int offset, int stride, argument
725 return createBitmap(null, colors, offset, stride, width, height, config);
730 * pixel value set to the corresponding value in the colors array. Its
735 * @param colors Arra
748 createBitmap(DisplayMetrics display, int colors[], int offset, int stride, int width, int height, Config config) argument
787 createBitmap(int colors[], int width, int height, Config config) argument
808 createBitmap(DisplayMetrics display, int colors[], int width, int height, Config config) argument
1393 nativeCreate(int[] colors, int offset, int stride, int width, int height, int nativeConfig, boolean mutable) argument
1417 nativeSetPixels(int nativeBitmap, int[] colors, int offset, int stride, int x, int y, int width, int height) argument
[all...]
H A DCanvas.java30 * Path, text, Bitmap), and a paint (to describe the colors and styles for the
1133 * Treat the specified array of colors as a bitmap, and draw it. This gives
1136 * which can be more efficient if the colors are changing often.
1138 * @param colors Array of colors representing the pixels of the bitmap
1139 * @param offset Offset into the array of colors for the first pixel
1140 * @param stride The number of colors in the array between rows (must be
1146 * @param hasAlpha True if the alpha channel of the colors contains valid
1151 public void drawBitmap(int[] colors, int offset, int stride, float x, float y, argument
1164 int length = colors
1180 drawBitmap(int[] colors, int offset, int stride, int x, int y, int width, int height, boolean hasAlpha, Paint paint) argument
1234 drawBitmapMesh(Bitmap bitmap, int meshWidth, int meshHeight, float[] verts, int vertOffset, int[] colors, int colorOffset, Paint paint) argument
1299 drawVertices(VertexMode mode, int vertexCount, float[] verts, int vertOffset, float[] texs, int texOffset, int[] colors, int colorOffset, short[] indices, int indexOffset, int indexCount, Paint paint) argument
1713 native_drawBitmap(int nativeCanvas, int[] colors, int offset, int stride, float x, float y, int width, int height, boolean hasAlpha, int nativePaintOrZero) argument
1720 nativeDrawBitmapMesh(int nCanvas, int nBitmap, int meshWidth, int meshHeight, float[] verts, int vertOffset, int[] colors, int colorOffset, int nPaint) argument
1724 nativeDrawVertices(int nCanvas, int mode, int n, float[] verts, int vertOffset, float[] texs, int texOffset, int[] colors, int colorOffset, short[] indices, int indexOffset, int indexCount, int nPaint) argument
[all...]
/frameworks/base/libs/hwui/
H A DGradientCache.h37 colors = NULL;
41 GradientCacheEntry(uint32_t* colors, float* positions, int count) { argument
42 copy(colors, positions, count);
46 copy(entry.colors, entry.positions, entry.count);
50 delete[] colors;
56 delete[] colors;
59 copy(entry.colors, entry.positions, entry.count);
68 int result = memcmp(colors, rhs.colors, count * sizeof(uint32_t));
78 uint32_t* colors; member in struct:android::uirenderer::GradientCacheEntry
85 copy(uint32_t* colors, float* positions, int count) argument
[all...]
H A DPatchCache.cpp55 const int32_t* xDivs, const int32_t* yDivs, const uint32_t* colors,
63 if (colors[i] == 0x0) {
53 get(const float bitmapWidth, const float bitmapHeight, const float pixelWidth, const float pixelHeight, const int32_t* xDivs, const int32_t* yDivs, const uint32_t* colors, const uint32_t width, const uint32_t height, const int8_t numColors) argument
H A DGradientCache.cpp114 Texture* GradientCache::get(uint32_t* colors, float* positions, int count) { argument
116 GradientCacheEntry gradient(colors, positions, count);
120 texture = addLinearGradient(gradient, colors, positions, count);
130 void GradientCache::getGradientInfo(const uint32_t* colors, const int count, argument
140 if (((colors[i] >> 24) & 0xff) < 255) {
151 uint32_t* colors, float* positions, int count) {
154 getGradientInfo(colors, count, info);
168 generateTexture(colors, positions, count, texture);
176 void GradientCache::generateTexture(uint32_t* colors, float* positions, argument
185 float startA = (colors[
150 addLinearGradient(GradientCacheEntry& gradient, uint32_t* colors, float* positions, int count) argument
[all...]
H A DSkiaShader.cpp181 SkiaLinearGradientShader::SkiaLinearGradientShader(float* bounds, uint32_t* colors, argument
185 mBounds(bounds), mColors(colors), mPositions(positions), mCount(count) {
261 uint32_t* colors, float* positions, int count, SkShader* key, SkShader::TileMode tileMode,
263 SkiaSweepGradientShader(kCircularGradient, x, y, colors, positions, count, key,
299 SkiaSweepGradientShader::SkiaSweepGradientShader(float x, float y, uint32_t* colors, argument
303 mColors(colors), mPositions(positions), mCount(count) {
313 SkiaSweepGradientShader::SkiaSweepGradientShader(Type type, float x, float y, uint32_t* colors, argument
317 mColors(colors), mPositions(positions), mCount(count) {
260 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.cpp496 int* colors = hasColors ? getInts(colorsCount) : NULL; local
504 uint32_t* colors = NULL; local
511 colors = getUInts(numColors);
1115 int32_t* colors = hasColors ? getInts(colorsCount) : NULL; local
1120 colors, paint);
1126 uint32_t* colors = NULL; local
1135 colors = getUInts(numColors);
1146 drawGlStatus |= renderer.drawPatch(bitmap, xDivs, yDivs, colors,
1628 float* vertices, int* colors, SkPaint* paint) {
1634 if (colors) {
1627 drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight, float* vertices, int* colors, SkPaint* paint) argument
1644 drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int32_t* yDivs, const uint32_t* colors, uint32_t width, uint32_t height, int8_t numColors, float left, float top, float right, float bottom, SkPaint* paint) 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.java200 /*package*/ static Bitmap nativeCreate(int[] colors, int offset, int stride, int width, argument
207 if (colors != null) {
208 image.setRGB(0, 0, width, height, colors, offset, stride);
372 /*package*/ static void nativeSetPixels(int nativeBitmap, int[] colors, int offset, argument
379 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/core/java/android/view/
H A DGLES20RecordingCanvas.java131 public void drawBitmap(int[] colors, int offset, int stride, float x, float y, int width, argument
133 super.drawBitmap(colors, offset, stride, x, y, width, height, hasAlpha, paint);
138 public void drawBitmap(int[] colors, int offset, int stride, int x, int y, int width, argument
140 super.drawBitmap(colors, offset, stride, x, y, width, height, hasAlpha, paint);
146 int vertOffset, int[] colors, int colorOffset, Paint paint) {
148 colors, colorOffset, paint);
297 float[] texs, int texOffset, int[] colors, int colorOffset, short[] indices,
299 super.drawVertices(mode, vertexCount, verts, vertOffset, texs, texOffset, colors,
145 drawBitmapMesh(Bitmap bitmap, int meshWidth, int meshHeight, float[] verts, int vertOffset, int[] colors, int colorOffset, Paint paint) argument
296 drawVertices(VertexMode mode, int vertexCount, float[] verts, int vertOffset, float[] texs, int texOffset, int[] colors, int colorOffset, short[] indices, int indexOffset, int indexCount, Paint paint) argument
/frameworks/base/core/jni/android/graphics/
H A DBitmap.cpp171 const SkPMColor* colors = ctable->lockColors(); local
173 *dst++ = SkUnPreMultiply::PMColorToColor(colors[*s++]);
182 const SkPMColor* colors = ctable->lockColors(); local
184 SkPMColor c = colors[*s++];
635 if (memcmp(alc0.colors(), alc1.colors(), size) != 0) {
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 DCanvas.cpp722 const SkColor* colors = NULL; local
725 colors = (const SkColor*)(colorA.ptr() + colorIndex);
731 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.java159 * of colors for the gradient.
161 public GradientDrawable(Orientation orientation, int[] colors) { argument
162 this(new GradientState(orientation, colors));
406 * <p>Sets the colors used to draw the gradient. Each color is specified as an
407 * ARGB integer and the array must contain at least 2 colors.</p>
412 * @param colors 2 or more ARGB colors
417 public void setColors(int[] colors) { argument
418 mGradientState.setColors(colors);
701 final int[] colors
1103 GradientState(Orientation orientation, int[] colors) argument
1175 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.cpp361 OpenGLRenderer* renderer, jintArray colors, jint offset, jint stride,
372 if (!GraphicsJNI::SetPixels(env, colors, offset, stride, 0, 0, width, height, *bitmap)) {
388 jintArray colors, jint colorOffset, SkPaint* paint) {
393 jint* colorsArray = colors ? env->GetIntArrayElements(colors, NULL) + colorOffset : NULL;
398 if (colors) env->ReleaseIntArrayElements(colors, colorsArray, 0);
412 &patch->colors[0], patch->numXDivs, patch->numYDivs, patch->numColors,
360 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
385 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 5898 milliseconds

12