Skia
2D Graphics Library
|
Functions | |
SK_API sk_sp< SkShader > | Empty () |
SK_API sk_sp< SkShader > | Color (SkColor) |
SK_API sk_sp< SkShader > | Color (const SkColor4f &, sk_sp< SkColorSpace >) |
SK_API sk_sp< SkShader > | Blend (SkBlendMode mode, sk_sp< SkShader > dst, sk_sp< SkShader > src) |
SK_API sk_sp< SkShader > | Blend (sk_sp< SkBlender >, sk_sp< SkShader > dst, sk_sp< SkShader > src) |
SK_API sk_sp< SkShader > | CoordClamp (sk_sp< SkShader >, const SkRect &subset) |
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). More... | |
SK_API sk_sp< SkShader > | MakeTurbulence (SkScalar baseFrequencyX, SkScalar baseFrequencyY, int numOctaves, SkScalar seed, const SkISize *tileSize=nullptr) |
SK_API sk_sp<SkShader> SkShaders::Blend | ( | sk_sp< SkBlender > | , |
sk_sp< SkShader > | dst, | ||
sk_sp< SkShader > | src | ||
) |
SK_API sk_sp<SkShader> SkShaders::Blend | ( | SkBlendMode | mode, |
sk_sp< SkShader > | dst, | ||
sk_sp< SkShader > | src | ||
) |
SK_API sk_sp<SkShader> SkShaders::Color | ( | const SkColor4f & | , |
sk_sp< SkColorSpace > | |||
) |
SK_API sk_sp<SkShader> SkShaders::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).
Both base frequencies (X and Y) have a usual range of (0..1) and must be non-negative.
The number of octaves provided should be fairly small, with a limit of 255 enforced. Each octave doubles the frequency, so 10 octaves would produce noise from baseFrequency * 1, * 2, * 4, ..., * 512, which quickly yields insignificantly small periods and resembles regular unstructured noise rather than Perlin noise.
If tileSize isn't NULL or an empty size, the tileSize parameter will be used to modify the frequencies so that the noise will be tileable for the given tile size. If tileSize is NULL or an empty size, the frequencies will be used as is without modification.