Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
SkPerlinNoiseShader::StitchData Struct Reference

#include <SkPerlinNoiseShaderImpl.h>

Public Member Functions

 StitchData ()=default
 
 StitchData (SkScalar w, SkScalar h)
 
bool operator== (const StitchData &other) const
 

Public Attributes

int fWidth = 0
 
int fWrapX = 0
 
int fHeight = 0
 
int fWrapY = 0
 

Detailed Description

Definition at line 42 of file SkPerlinNoiseShaderImpl.h.

Constructor & Destructor Documentation

◆ StitchData() [1/2]

SkPerlinNoiseShader::StitchData::StitchData ( )
default

◆ StitchData() [2/2]

SkPerlinNoiseShader::StitchData::StitchData ( SkScalar  w,
SkScalar  h 
)
inline

Definition at line 45 of file SkPerlinNoiseShaderImpl.h.

46 : fWidth(std::min(SkScalarRoundToInt(w), SK_MaxS32 - kPerlinNoise))
47 , fWrapX(kPerlinNoise + fWidth)
48 , fHeight(std::min(SkScalarRoundToInt(h), SK_MaxS32 - kPerlinNoise))
49 , fWrapY(kPerlinNoise + fHeight) {}
static constexpr int32_t SK_MaxS32
Definition: SkMath.h:21
#define SkScalarRoundToInt(x)
Definition: SkScalar.h:37
static float min(float r, float g, float b)
Definition: hsl.cpp:48
SkScalar w
SkScalar h

Member Function Documentation

◆ operator==()

bool SkPerlinNoiseShader::StitchData::operator== ( const StitchData other) const
inline

Definition at line 51 of file SkPerlinNoiseShaderImpl.h.

51 {
52 return fWidth == other.fWidth && fWrapX == other.fWrapX && fHeight == other.fHeight &&
53 fWrapY == other.fWrapY;
54 }

Member Data Documentation

◆ fHeight

int SkPerlinNoiseShader::StitchData::fHeight = 0

Definition at line 58 of file SkPerlinNoiseShaderImpl.h.

◆ fWidth

int SkPerlinNoiseShader::StitchData::fWidth = 0

Definition at line 56 of file SkPerlinNoiseShaderImpl.h.

◆ fWrapX

int SkPerlinNoiseShader::StitchData::fWrapX = 0

Definition at line 57 of file SkPerlinNoiseShaderImpl.h.

◆ fWrapY

int SkPerlinNoiseShader::StitchData::fWrapY = 0

Definition at line 59 of file SkPerlinNoiseShaderImpl.h.


The documentation for this struct was generated from the following file: