blob: 671d103e69c85cdef71ae230a60bd0836d70d605 [file] [log] [blame]
Hal Canary6c8422c2020-01-10 15:22:09 -05001// Copyright 2020 Google LLC.
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3#include "tools/fiddle/examples.h"
4REG_FIDDLE(skpaint_compose_shader, 256, 256, false, 0) {
5// skpaint_compose_shader
6void draw(SkCanvas* canvas) {
7 SkColor colors[2] = {SK_ColorBLUE, SK_ColorYELLOW};
8 SkPaint paint;
9 paint.setShader(SkShaders::Blend(
10 SkBlendMode::kDifference,
11 SkGradientShader::MakeRadial(SkPoint::Make(128.0f, 128.0f), 180.0f, colors, nullptr,
12 2, SkTileMode::kClamp, 0, nullptr),
13 SkPerlinNoiseShader::MakeTurbulence(0.025f, 0.025f, 2, 0.0f, nullptr)));
14 canvas->drawPaint(paint);
15}
16} // END FIDDLE