#include <SkSVGRadialGradient.h>
|
| SVG_ATTR (GradientTransform, SkSVGTransformType, SkSVGTransformType(SkMatrix::I())) SVG_ATTR(GradientUnits |
|
| SkSVGObjectBoundingBoxUnits (SkSVGObjectBoundingBoxUnits::Type::kObjectBoundingBox)) protected |
|
bool | onAsPaint (const SkSVGRenderContext &, SkPaint *) const final |
|
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 |
|
| SkSVGObjectBoundingBoxUnits |
|
static SkMatrix | ComputeViewboxMatrix (const SkRect &, const SkRect &, SkSVGPreserveAspectRatio) |
|
skia_private::STArray< 1, sk_sp< SkSVGNode >, true > | fChildren |
|
Definition at line 14 of file SkSVGRadialGradient.h.
◆ Make()
◆ onMakeShader()
Implements SkSVGGradient.
Definition at line 25 of file SkSVGRadialGradient.cpp.
28 {
32 : ctx.lengthContext();
33
43
44 if (r == 0) {
46 return SkShaders::Color(last_color, nullptr);
47 }
48
53}
static SkScalar center(float pos0, float pos1)
static sk_sp< SkShader > MakeRadial(const SkPoint ¢er, SkScalar radius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
SkScalar resolve(const SkSVGLength &, LengthType) const
constexpr SkColor4f kBlack
PODArray< SkColor > colors
static constexpr SkPoint Make(float x, float y)
◆ parseAndSetAttribute()
bool SkSVGRadialGradient::parseAndSetAttribute |
( |
const char * |
name, |
|
|
const char * |
value |
|
) |
| |
|
overrideprotectedvirtual |
Reimplemented from SkSVGGradient.
Definition at line 16 of file SkSVGRadialGradient.cpp.
16 {
18 this->setCx(SkSVGAttributeParser::parse<SkSVGLength>(
"cx",
name, value)) ||
19 this->setCy(SkSVGAttributeParser::parse<SkSVGLength>(
"cy",
name, value)) ||
20 this->setR(SkSVGAttributeParser::parse<SkSVGLength>(
"r",
name, value)) ||
21 this->setFx(SkSVGAttributeParser::parse<SkSVGLength>(
"fx",
name, value)) ||
22 this->setFy(SkSVGAttributeParser::parse<SkSVGLength>(
"fy",
name, value));
23}
bool parseAndSetAttribute(const char *, const char *) override
The documentation for this class was generated from the following files: