Lines Matching refs:colors
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[]) {
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.length];
61 positions[colors.length-1] = 1.f;
62 for (int i = 1; i < colors.length - 1 ; i++) {
67 mColors = colors;
72 * Base class for (Java) Gradient Paints. This handles computing the gradient colors based
84 protected GradientPaint(int[] colors, float[] positions, TileMode tileMode) {
85 mColors = colors;
96 * Pre-computes the colors for the gradient. This must be called once before any call