52 std::vector<SkColor>
colors;
53 std::vector<SkScalar> positions;
54 colors.reserve(stops.size());
55 positions.reserve(stops.size());
58 colors.push_back(stop.color);
59 positions.push_back(stop.pos);
74 paint.setShader(shader);
87 paint.setShader(shader);
static const int points[]
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorGRAY
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
void drawGradient(SkCanvas *canvas, std::initializer_list< GradientStop > stops)
SkISize getISize() override
void onDraw(SkCanvas *canvas) override
SkString getName() const override
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
static sk_sp< SkShader > MakeRadial(const SkPoint ¢er, SkScalar radius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
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)