blob: 88192d35a4399cdc02958d19945e683a60a78a90 [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, 256, 256, false, 0) {
5void draw(SkCanvas* canvas) {
6 SkColor colors[2] = {SK_ColorBLUE, SK_ColorYELLOW};
7 SkPaint paint;
8 paint.setShader(SkShaders::Blend(
9 SkBlendMode::kDifference,
10 SkGradientShader::MakeRadial(SkPoint::Make(128.0f, 128.0f), 180.0f, colors, NULL, 2,
11 SkTileMode::kClamp, 0, NULL),
12 SkPerlinNoiseShader::MakeTurbulence(0.025f, 0.025f, 2, 0.0f, NULL)));
13 canvas->drawPaint(paint);
14}
15} // END FIDDLE