4 {
5
7 const SkPoint pts[] = { { 0, 0 }, { 128, 0 } };
10}
11
13
15
16 const char* sksl =
17 "uniform shader input_1;"
18 "uniform shader input_2;"
19 "half4 main(float2 coord) {"
20 " return input_1.eval(coord) * input_2.eval(coord);"
21 "}";
23 makeGradientShader() };
24
25
26
27
30 { children, 2 });
31
32
34 p.setShader(myShader);
36
37}}
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorWHITE
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void drawPaint(const SkPaint &paint)
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)
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
static Result MakeForShader(SkString sksl, const Options &)
sk_sp< const SkImage > image
PODArray< SkColor > colors
SkSamplingOptions(SkFilterMode::kLinear))