102 {
104
111 };
112
113 SkScalar row3[] = {0.00f, 0.25f, 1.00f};
114 SkScalar row4[] = {0.00f, 0.25f, 0.50f, 0.50f, 1.00f};
115 SkScalar row5[] = {0.00f, 0.50f, 0.50f, 1.00f};
116 SkScalar row6[] = {0.00f, 0.00f, 1.00f};
117 SkScalar row7[] = {0.00f, 1.00f, 1.00f};
118 SkScalar row8[] = {0.00f, 0.30f, 0.30f, 1.00f};
119
121 nullptr,
122 nullptr,
123 row3,
124 row4,
125 row5,
126 row6,
127 row7,
128 row8,
129 };
130
132 2,
133 3,
134 3,
135 5,
136 4,
137 3,
138 3,
139 4,
140 };
141
146 };
147
148 for (
int cellRow = 0; cellRow <
NUM_ROWS; cellRow++) {
149 for (
int cellCol = 0; cellCol <
NUM_COLS; cellCol++) {
151
155 positions[cellRow],
156 numGradientColors[cellRow],
157 tilemodes[cellCol],
158 0,
159 nullptr);
160
162 }
163 }
164 }
static const int points[]
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
static void shade_rect(SkCanvas *canvas, sk_sp< SkShader > shader, int cellRow, int cellCol)
static void create_gradient_points(int cellRow, int cellCol, SkPoint points[2])
PODArray< SkColor > colors