/frameworks/base/graphics/java/android/graphics/ |
H A D | SweepGradient.java | 26 * @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 D | LinearGradient.java | 25 @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. 32 int colors[], float positions[], TileMode tile) { 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 31 LinearGradient(float x0, float y0, float x1, float y1, int colors[], float positions[], TileMode tile) argument 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 D | RadialGradient.java | 25 @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 D | Canvas.java | 30 * Path, text, Bitmap), and a paint (to describe the colors and styles for the 1149 * Treat the specified array of colors as a bitmap, and draw it. This gives 1152 * which can be more efficient if the colors are changing often. 1154 * @param colors Array of colors representing the pixels of the bitmap 1155 * @param offset Offset into the array of colors for the first pixel 1156 * @param stride The number of colors in the array between rows (must be 1162 * @param hasAlpha True if the alpha channel of the colors contains valid 1167 public void drawBitmap(int[] colors, int offset, int stride, float x, argument 1181 int length = colors 1197 drawBitmap(int[] colors, int offset, int stride, int x, int y, int width, int height, boolean hasAlpha, Paint paint) argument 1252 drawBitmapMesh(Bitmap bitmap, int meshWidth, int meshHeight, float[] verts, int vertOffset, int[] colors, int colorOffset, Paint paint) argument 1318 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 1729 native_drawBitmap(int nativeCanvas, int[] colors, int offset, int stride, float x, float y, int width, int height, boolean hasAlpha, int nativePaintOrZero) argument 1736 nativeDrawBitmapMesh(int nCanvas, int nBitmap, int meshWidth, int meshHeight, float[] verts, int vertOffset, int[] colors, int colorOffset, int nPaint) argument 1740 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...] |
H A D | Bitmap.java | 250 * well as the ability to display transparent/translucent colors. 620 * pixel value set to the corresponding value in the colors array. Its 623 * @param colors Array of {@link Color} used to initialize the pixels. 625 * array of colors. 626 * @param stride Number of colors in the array between rows (must be >= 632 * bytes in the colors[] will be ignored (assumed to be FF) 636 public static Bitmap createBitmap(int colors[], int offset, int stride, argument 644 int length = colors.length; 652 return nativeCreate(colors, offset, stride, width, height, 658 * pixel value set to the corresponding value in the colors arra 671 createBitmap(int colors[], int width, int height, Config config) argument 1174 nativeCreate(int[] colors, int offset, int stride, int width, int height, int nativeConfig, boolean mutable) argument 1199 nativeSetPixels(int nativeBitmap, int[] colors, int offset, int stride, int x, int y, int width, int height) argument [all...] |
/frameworks/base/libs/hwui/ |
H A D | GradientCache.h | 34 colors = NULL; 39 GradientCacheEntry(uint32_t* colors, float* positions, int count, argument 41 copy(colors, positions, count, tileMode); 45 copy(entry.colors, entry.positions, entry.count, entry.tileMode); 49 delete[] colors; 55 delete[] colors; 58 copy(entry.colors, entry.positions, entry.count, entry.tileMode); 68 int result = memcmp(colors, rhs.colors, count * sizeof(uint32_t)); 79 uint32_t* colors; member in struct:android::uirenderer::GradientCacheEntry 86 copy(uint32_t* colors, float* positions, int count, SkShader::TileMode tileMode) argument [all...] |
H A D | GradientCache.cpp | 100 Texture* GradientCache::get(uint32_t* colors, float* positions, argument 103 GradientCacheEntry gradient(colors, positions, count, tileMode); 107 texture = addLinearGradient(gradient, colors, positions, count, tileMode); 118 uint32_t* colors, float* positions, int count, SkShader::TileMode tileMode) { 131 reinterpret_cast<const SkColor*>(colors), positions, count, tileMode); 117 addLinearGradient(GradientCacheEntry& gradient, uint32_t* colors, float* positions, int count, SkShader::TileMode tileMode) argument
|
H A D | PatchCache.cpp | 55 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 D | SkiaShader.cpp | 182 SkiaLinearGradientShader::SkiaLinearGradientShader(float* bounds, uint32_t* colors, argument 186 mBounds(bounds), mColors(colors), mPositions(positions), mCount(count) { 258 uint32_t* colors, float* positions, int count, SkShader* key, SkShader::TileMode tileMode, 260 SkiaSweepGradientShader(kCircularGradient, x, y, colors, positions, count, key, 294 SkiaSweepGradientShader::SkiaSweepGradientShader(float x, float y, uint32_t* colors, argument 298 mColors(colors), mPositions(positions), mCount(count) { 306 SkiaSweepGradientShader::SkiaSweepGradientShader(Type type, float x, float y, uint32_t* colors, argument 310 mColors(colors), mPositions(positions), mCount(count) { 257 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 D | PatchCache.h | 52 const int32_t* xDivs, const int32_t* yDivs, const uint32_t* colors,
|
H A D | SkiaShader.h | 174 ANDROID_API SkiaLinearGradientShader(float* bounds, uint32_t* colors, float* positions, 198 ANDROID_API SkiaSweepGradientShader(float x, float y, uint32_t* colors, float* positions, 209 SkiaSweepGradientShader(Type type, float x, float y, uint32_t* colors, float* positions, 223 ANDROID_API SkiaCircularGradientShader(float x, float y, float radius, uint32_t* colors,
|
H A D | DisplayListRenderer.cpp | 369 int* colors = hasColors ? getInts(colorsCount) : NULL; local 377 uint32_t* colors = NULL; local 384 colors = getUInts(numColors); 713 int* colors = hasColors ? getInts(colorsCount) : NULL; local 717 renderer.drawBitmapMesh(bitmap, meshWidth, meshHeight, vertices, colors, paint); 723 uint32_t* colors = NULL; local 732 colors = getUInts(numColors); 741 renderer.drawPatch(bitmap, xDivs, yDivs, colors, xDivsCount, yDivsCount, 1109 float* vertices, int* colors, SkPaint* paint) { 1115 if (colors) { 1108 drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight, float* vertices, int* colors, SkPaint* paint) argument 1124 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/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/core/tests/coretests/src/android/text/ |
H A D | HtmlTest.java | 80 ForegroundColorSpan[] colors; 83 colors = s.getSpans(0, s.length(), ForegroundColorSpan.class); 84 assertEquals(1, colors.length); 85 assertEquals(0xFF00FF00, colors[0].getForegroundColor()); 88 colors = s.getSpans(0, s.length(), ForegroundColorSpan.class); 89 assertEquals(1, colors.length); 90 assertEquals(0xFF000080, colors[0].getForegroundColor()); 93 colors = s.getSpans(0, s.length(), ForegroundColorSpan.class); 94 assertEquals(0, colors.length); 102 TextAppearanceSpan[] colors; [all...] |
/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 | 59 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 D | RadialGradient_Delegate.java | 58 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 D | SweepGradient_Delegate.java | 55 /*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 D | Bitmap_Delegate.java | 200 /*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 D | ColorStateList.java | 37 * 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/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/jni/android/graphics/ |
H A D | Shader.cpp | 218 SkColor colors[2]; local 219 colors[0] = color0; 220 colors[1] = color1; 222 SkShader* s = SkGradientShader::CreateLinear(pts, colors, NULL, 2, (SkShader::TileMode)tileMode); 266 SkColor colors[2]; local 267 colors[0] = color0; 268 colors[1] = color1; 270 SkShader* s = SkGradientShader::CreateRadial(center, SkFloatToScalar(radius), colors, NULL, 340 const jint* colors = env->GetIntArrayElements(jcolors, NULL); local 356 reinterpret_cast<const SkColor*>(colors), 366 SkColor colors[2]; local [all...] |
/frameworks/base/core/java/android/view/ |
H A D | GLES20RecordingCanvas.java | 130 public void drawBitmap(int[] colors, int offset, int stride, float x, float y, int width, argument 132 super.drawBitmap(colors, offset, stride, x, y, width, height, hasAlpha, paint); 137 public void drawBitmap(int[] colors, int offset, int stride, int x, int y, int width, argument 139 super.drawBitmap(colors, offset, stride, x, y, width, height, hasAlpha, paint); 145 int vertOffset, int[] colors, int colorOffset, Paint paint) { 146 super.drawBitmapMesh(bitmap, meshWidth, meshHeight, verts, vertOffset, colors, colorOffset, 301 float[] texs, int texOffset, int[] colors, int colorOffset, short[] indices, 303 super.drawVertices(mode, vertexCount, verts, vertOffset, texs, texOffset, colors, 144 drawBitmapMesh(Bitmap bitmap, int meshWidth, int meshHeight, float[] verts, int vertOffset, int[] colors, int colorOffset, Paint paint) argument 300 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/graphics/java/android/graphics/drawable/ |
H A D | GradientDrawable.java | 159 * of colors for the gradient. 161 public GradientDrawable(Orientation orientation, int[] colors) { argument 162 this(new GradientState(orientation, colors)); 526 final int[] colors = st.mColors; 527 if (colors != null) { 569 colors, st.mPositions, Shader.TileMode.CLAMP)); 577 level * st.mGradientRadius, colors, null, 583 int[] tempColors = colors; 588 final int length = colors.length; 592 System.arraycopy(colors, 920 GradientState(Orientation orientation, int[] colors) argument [all...] |
/frameworks/base/tools/aapt/ |
H A D | Images.cpp | 49 free(info9Patch.colors); 121 NOISY(printf("Image %s: w=%d, h=%d, d=%d, colors=%d, inter=%d, comp=%d\n", 468 // colors we can use in the 9-patch format. 476 image->info9Patch.colors = (uint32_t*)malloc(numColors * sizeof(uint32_t)); 519 image->info9Patch.colors[colorIndex++] = c; 531 printf(" #%08x", image->info9Patch.colors[i]); 583 assert(outPatch->colors[i] == inPatch->colors[i]); 599 if (patch1.colors[i] != patch2.colors[ 676 uint32_t colors[256], col; local [all...] |