51 std::vector<SkColor>
colors;
52 std::vector<SkScalar> positions;
54 for (
int row = 1; row <=
kNumRows; ++row) {
62 positions.push_back(place);
63 positions.push_back(place);
65 positions.push_back(1.0f);
77 paint.setShader(shader);
static const int points[]
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorWHITE
SkISize getISize() override
SkString getName() const override
void onDraw(SkCanvas *canvas) override
HardstopGradientsManyGM()
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)
PODArray< SkColor > colors
static constexpr SkISize Make(int32_t w, int32_t h)
static constexpr SkPoint Make(float x, float y)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)