21 this->setX(SkSVGAttributeParser::parse<SkSVGLength>(
"x",
name,
value)) ||
22 this->setY(SkSVGAttributeParser::parse<SkSVGLength>(
"y",
name,
value)) ||
23 this->setWidth(SkSVGAttributeParser::parse<SkSVGLength>(
"width",
name,
value)) ||
24 this->setHeight(SkSVGAttributeParser::parse<SkSVGLength>(
"height",
name,
value)) ||
25 this->setPatternTransform(SkSVGAttributeParser::parse<SkSVGTransformType>(
27 this->setHref(SkSVGAttributeParser::parse<SkSVGIRI>(
"xlink:href",
name,
value));
31 if (fHref.iri().isEmpty()) {
63 PatternAttributes* attrs)
const {
68 const bool didInherit =
75 if (!contentNode->hasChildren()) {
76 contentNode = currentNode;
79 if (contentNode->hasChildren() && !didInherit) {
86 currentNode = currentNode->hrefTarget(ctx);
87 }
while (currentNode);
93 PatternAttributes attrs;
94 const auto* contentNode = this->resolveHref(ctx, &attrs);
99 attrs.fWidth.isValid() ? *attrs.fWidth :
SkSVGLength(0),
100 attrs.fHeight.isValid() ? *attrs.fHeight :
SkSVGLength(0));
102 if (tile.isEmpty()) {
106 const SkMatrix* patternTransform = attrs.fPatternTransform.isValid()
107 ? attrs.fPatternTransform.
get()
114 contentNode->SkSVGContainer::onRender(recordingContext);
int inherit_if_needed(const SkTLazy< T > &src, SkTLazy< T > &dst)
SkScalar get(int index) const
SkCanvas * beginRecording(const SkRect &bounds, sk_sp< SkBBoxHierarchy > bbh)
sk_sp< SkPicture > finishRecordingAsPicture()
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, SkFilterMode mode, const SkMatrix *localMatrix, const SkRect *tileRect) const
SkRect resolveRect(const SkSVGLength &x, const SkSVGLength &y, const SkSVGLength &w, const SkSVGLength &h) const
virtual bool parseAndSetAttribute(const char *name, const char *value)
bool onAsPaint(const SkSVGRenderContext &, SkPaint *) const override
bool parseAndSetAttribute(const char *, const char *) override
BorrowedNode findNodeById(const SkSVGIRI &) const
const SkSVGLengthContext & lengthContext() const
DEF_SWITCHES_START aot vmservice shared library name