59const int M2_POSITIONS[] = { 0, 1,1, 2,2, 3,3, 4,4, 5,5, 6,6, 7,7, 8 };
60const int M3_POSITIONS[] = { 0, 1, 2,2, 3, 4,4, 5, 6,6, 7, 8 };
61const int M4_POSITIONS[] = { 0, 1,1, 2, 3,3, 4, 5,5, 6, 7,7, 8 };
122 paint.setShader(shader);
147 for (
int cellRow = 0; cellRow <
NUM_ROWS; cellRow++) {
151 for (
int cellCol = 0; cellCol <
NUM_COLS; cellCol++) {
155 int colorCount = colorCounts[cellCol];
164 for (
int i = 0; i < colorCount; i++) {
static const int points[]
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorLTGRAY
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorDKGRAY
const int INT4_COLOR_COUNTS[]
const int INT3_COLOR_COUNTS[]
const int INT5_COLOR_COUNTS[]
const int INT7_COLOR_COUNTS[]
const int INT2_COLOR_COUNTS[]
const int INT8_COLOR_COUNTS[]
const int INT6_COLOR_COUNTS[]
const int INT1_COLOR_COUNTS[]
static void shade_rect(SkCanvas *canvas, sk_sp< SkShader > shader, int cellRow, int cellCol)
const int * M_POSITIONS[]
const int * INTERVAL_COLOR_COUNTS[]
AnalyticGradientShaderGM()
void onDraw(SkCanvas *canvas) override
SkString getName() const override
SkISize getISize() override
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
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 constexpr SkISize Make(int32_t w, int32_t h)
static constexpr SkPoint Make(float x, float y)
static constexpr SkRect MakeWH(float w, float h)