#include <SkSVGGradient.h>
|
| SVG_ATTR (GradientTransform, SkSVGTransformType, SkSVGTransformType(SkMatrix::I())) SVG_ATTR(GradientUnits |
|
| SkSVGObjectBoundingBoxUnits (SkSVGObjectBoundingBoxUnits::Type::kObjectBoundingBox)) protected |
|
bool | parseAndSetAttribute (const char *, const char *) override |
|
bool | onAsPaint (const SkSVGRenderContext &, SkPaint *) const final |
|
virtual sk_sp< SkShader > | onMakeShader (const SkSVGRenderContext &, const SkColor4f *, const SkScalar *, int count, SkTileMode, const SkMatrix &localMatrix) const =0 |
|
void | appendChild (sk_sp< SkSVGNode >) override |
|
void | setTransform (const SkSVGTransformType &t) |
|
| ~SkSVGNode () override |
|
SkSVGTag | tag () const |
|
void | render (const SkSVGRenderContext &) const |
|
bool | asPaint (const SkSVGRenderContext &, SkPaint *) const |
|
SkPath | asPath (const SkSVGRenderContext &) const |
|
SkRect | objectBoundingBox (const SkSVGRenderContext &) const |
|
void | setAttribute (SkSVGAttribute, const SkSVGValue &) |
|
bool | setAttribute (const char *attributeName, const char *attributeValue) |
|
| SkRefCntBase () |
|
virtual | ~SkRefCntBase () |
|
bool | unique () const |
|
void | ref () const |
|
void | unref () const |
|
Definition at line 19 of file SkSVGGradient.h.
◆ onAsPaint()
Reimplemented from SkSVGNode.
Definition at line 70 of file SkSVGGradient.cpp.
70 {
72 StopPositionArray
pos;
73
74 this->collectColorStops(ctx, &
pos, &colors);
75
76
77
78
79
80
81
88 const auto tileMode =
static_cast<SkTileMode>(fSpreadMethod.type());
89
93 * fGradientTransform;
94
96 localMatrix));
97 return true;
98}
static SkMatrix Scale(SkScalar sx, SkScalar sy)
static SkMatrix Translate(SkScalar dx, SkScalar dy)
virtual sk_sp< SkShader > onMakeShader(const SkSVGRenderContext &, const SkColor4f *, const SkScalar *, int count, SkTileMode, const SkMatrix &localMatrix) const =0
OBBTransform transformForCurrentOBB(SkSVGObjectBoundingBoxUnits) const
PODArray< SkColor > colors
◆ onMakeShader()
◆ parseAndSetAttribute()
bool SkSVGGradient::parseAndSetAttribute |
( |
const char * |
name, |
|
|
const char * |
value |
|
) |
| |
|
overridevirtual |
Reimplemented from SkSVGNode.
Reimplemented in SkSVGLinearGradient, and SkSVGRadialGradient.
Definition at line 15 of file SkSVGGradient.cpp.
15 {
17 this->setGradientTransform(SkSVGAttributeParser::parse<SkSVGTransformType>(
18 "gradientTransform",
name, value)) ||
19 this->setHref(SkSVGAttributeParser::parse<SkSVGIRI>(
"xlink:href",
name, value)) ||
20 this->setSpreadMethod(
21 SkSVGAttributeParser::parse<SkSVGSpreadMethod>(
"spreadMethod",
name, value)) ||
22 this->setGradientUnits(SkSVGAttributeParser::parse<SkSVGObjectBoundingBoxUnits>(
23 "gradientUnits",
name, value));
24}
virtual bool parseAndSetAttribute(const char *name, const char *value)
◆ SkSVGObjectBoundingBoxUnits()
◆ SVG_ATTR()
◆ SkSVGObjectBoundingBoxUnits
SkSVGGradient::SkSVGObjectBoundingBoxUnits |
The documentation for this class was generated from the following files: