/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. 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 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 | Bitmap.java | 280 * 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 D | Canvas.java | 30 * 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 D | GradientCache.h | 37 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 D | GradientCache.cpp | 114 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 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 | PatchCache.h | 52 const int32_t* xDivs, const int32_t* yDivs, const uint32_t* colors,
|
H A D | SkiaShader.h | 162 ANDROID_API SkiaLinearGradientShader(float* bounds, uint32_t* colors, float* positions, 186 ANDROID_API SkiaSweepGradientShader(float x, float y, uint32_t* colors, float* positions, 196 SkiaSweepGradientShader(Type type, float x, float y, uint32_t* colors, float* positions, 211 ANDROID_API SkiaCircularGradientShader(float x, float y, float radius, uint32_t* colors,
|
H A D | SkiaShader.cpp | 181 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
|
/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/tests/HwAccelerationTest/src/com/android/test/hwui/ |
H A D | GradientStopsActivity.java | 45 int[] colors = new int[] { 0xffff0000, 0xff0000ff }; 48 colors, positions, Shader.TileMode.CLAMP); 55 colors = new int[] { 0xffff0000, 0xff0000ff, 0xff00ff00 }; 58 colors, positions, Shader.TileMode.CLAMP); 65 colors = new int[] { 0xffff0000, 0xff0000ff, 0xff00ff00 }; 68 colors, positions, Shader.TileMode.CLAMP); 75 colors = new int[] { 0xff000000, 0xffffffff }; 77 colors, null, Shader.TileMode.CLAMP); 85 colors, null, Shader.TileMode.REPEAT); 93 colors, nul [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/native/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 | 248 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...] |
/frameworks/base/core/java/android/view/ |
H A D | GLES20RecordingCanvas.java | 131 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/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)); 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/base/tools/aapt/ |
H A D | Images.cpp | 49 free(info9Patch.colors); 128 NOISY(printf("Image %s: w=%d, h=%d, d=%d, colors=%d, inter=%d, comp=%d\n", 603 // colors we can use in the 9-patch format. 611 image->info9Patch.colors = (uint32_t*)malloc(numColors * sizeof(uint32_t)); 654 image->info9Patch.colors[colorIndex++] = c; 666 printf(" #%08x", image->info9Patch.colors[i]); 718 assert(outPatch->colors[i] == inPatch->colors[i]); 734 if (patch1.colors[i] != patch2.colors[ 811 uint32_t colors[256], col; local [all...] |