Flutter Engine
The Flutter Engine
|
#include <SkShaderBase.h>
Public Attributes | |
int | fColorCount = 0 |
In-out parameter, specifies passed size. More... | |
SkColor * | fColors = nullptr |
The colors in the gradient. More... | |
SkScalar * | fColorOffsets = nullptr |
The unit offset for color transitions. More... | |
SkPoint | fPoint [2] |
Type specific, see above. More... | |
SkScalar | fRadius [2] |
Type specific, see above. More... | |
SkTileMode | fTileMode |
uint32_t | fGradientFlags = 0 |
see SkGradientShader::Flags More... | |
If the shader subclass can be represented as a gradient, asGradient returns the matching GradientType enum (or GradientType::kNone if it cannot). Also, if info is not null, asGradient populates info with the relevant (see below) parameters for the gradient. fColorCount is both an input and output parameter. On input, it indicates how many entries in fColors and fColorOffsets can be used, if they are non-NULL. After asGradient has run, fColorCount indicates how many color-offset pairs there are in the gradient. If there is insufficient space to store all of the color-offset pairs, fColors and fColorOffsets will not be altered. fColorOffsets specifies where on the range of 0 to 1 to transition to the given color. The meaning of fPoint and fRadius is dependent on the type of gradient.
None: info is ignored. Color: fColorOffsets[0] is meaningless. Linear: fPoint[0] and fPoint[1] are the end-points of the gradient Radial: fPoint[0] and fRadius[0] are the center and radius Conical: fPoint[0] and fRadius[0] are the center and radius of the 1st circle fPoint[1] and fRadius[1] are the center and radius of the 2nd circle Sweep: fPoint[0] is the center of the sweep.
Definition at line 242 of file SkShaderBase.h.
int SkShaderBase::GradientInfo::fColorCount = 0 |
In-out parameter, specifies passed size.
Definition at line 243 of file SkShaderBase.h.
SkScalar* SkShaderBase::GradientInfo::fColorOffsets = nullptr |
The unit offset for color transitions.
Definition at line 248 of file SkShaderBase.h.
SkColor* SkShaderBase::GradientInfo::fColors = nullptr |
The colors in the gradient.
Definition at line 247 of file SkShaderBase.h.
uint32_t SkShaderBase::GradientInfo::fGradientFlags = 0 |
Definition at line 252 of file SkShaderBase.h.
SkPoint SkShaderBase::GradientInfo::fPoint[2] |
Type specific, see above.
Definition at line 249 of file SkShaderBase.h.
SkScalar SkShaderBase::GradientInfo::fRadius[2] |
Type specific, see above.
Definition at line 250 of file SkShaderBase.h.
SkTileMode SkShaderBase::GradientInfo::fTileMode |
Definition at line 251 of file SkShaderBase.h.