24 static constexpr SkPoint pts[] = {{0, 0}, {0, 30}};
25 static constexpr SkScalar pos[] = {0.f, 9.f / 20, 9.f / 20, 11.f / 20, 11.f / 20, 20.f / 20};
32 paint.setShader(grad);
33 static constexpr int kMirrorX = 400;
34 static constexpr int kMirrorY = 200;
35 canvas->translate(50, 50);
36 for (
int i = 0;
i < 4; ++
i) {
39 canvas->translate(0, kMirrorY);
40 canvas->scale(1.f, -1.f);
43 canvas->translate(kMirrorX, 0);
44 canvas->scale(-1.f, 1.f);
46 canvas->drawRect({0, 0, 150, 30},
paint);
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)
DEF_SIMPLE_GM(crbug_938592, canvas, 500, 300)
PODArray< SkColor > colors