8 #ifndef SkSGGradient_DEFINED
9 #define SkSGGradient_DEFINED
36 SG_ATTRIBUTE(ColorStops, std::vector<ColorStop>, fColorStops)
43 const std::vector<
SkScalar >& positions) const = 0;
66 const std::vector<SkScalar >&)
const override;
90 const std::vector<SkScalar >&)
const override;
Types, consts, functions, and macros for colors.
#define SG_ATTRIBUTE(attr_name, attr_type, attr_container)
Definition: SkSGNode.h:99
float SkScalar
Definition: SkScalar.h:14
SkTileMode
Definition: SkTileMode.h:13
Shaders specify the source color(s) for what is being drawn.
Definition: SkShader.h:35
Gradient base class.
Definition: SkSGGradient.h:25
sk_sp< SkShader > onRevalidateShader() final
virtual sk_sp< SkShader > onMakeShader(const std::vector< SkColor4f > &colors, const std::vector< SkScalar > &positions) const =0
Definition: SkSGGradient.h:55
sk_sp< SkShader > onMakeShader(const std::vector< SkColor4f > &, const std::vector< SkScalar > &) const override
static sk_sp< LinearGradient > Make()
Definition: SkSGGradient.h:57
Definition: SkSGGradient.h:77
sk_sp< SkShader > onMakeShader(const std::vector< SkColor4f > &, const std::vector< SkScalar > &) const override
static sk_sp< RadialGradient > Make()
Definition: SkSGGradient.h:79
Shader base class.
Definition: SkSGRenderEffect.h:33
sk_sp< SkDrawLooper > SK_API Make(SkColor4f color, SkColorSpace *cs, SkScalar sigma, SkScalar dx, SkScalar dy)
RGBA color value, holding four floating point components.
Definition: SkSGGradient.h:27
SkColor4f fColor
Definition: SkSGGradient.h:29
bool operator==(const ColorStop &other) const
Definition: SkSGGradient.h:31
SkScalar fPosition
Definition: SkSGGradient.h:28