Skia
2D Graphics Library
SkPerlinNoiseShader.h
Go to the documentation of this file.
1 /*
2  * Copyright 2013 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef SkPerlinNoiseShader_DEFINED
9 #define SkPerlinNoiseShader_DEFINED
10 
11 #include "include/core/SkRefCnt.h"
12 #include "include/core/SkScalar.h"
13 #include "include/core/SkShader.h" // IWYU pragma: keep
14 #include "include/private/base/SkAPI.h"
15 
16 struct SkISize;
17 
30 namespace SkShaders {
45 SK_API sk_sp<SkShader> MakeFractalNoise(SkScalar baseFrequencyX, SkScalar baseFrequencyY,
46  int numOctaves, SkScalar seed,
47  const SkISize* tileSize = nullptr);
48 SK_API sk_sp<SkShader> MakeTurbulence(SkScalar baseFrequencyX, SkScalar baseFrequencyY,
49  int numOctaves, SkScalar seed,
50  const SkISize* tileSize = nullptr);
51 } // namespace SkShaders
52 
53 #endif
float SkScalar
Definition: SkScalar.h:14
Definition: SkShader.h:86
SK_API sk_sp< SkShader > MakeTurbulence(SkScalar baseFrequencyX, SkScalar baseFrequencyY, int numOctaves, SkScalar seed, const SkISize *tileSize=nullptr)
SK_API sk_sp< SkShader > MakeFractalNoise(SkScalar baseFrequencyX, SkScalar baseFrequencyY, int numOctaves, SkScalar seed, const SkISize *tileSize=nullptr)
This will construct Perlin noise of the given type (Fractal Noise or Turbulence).
Definition: SkSize.h:15