MCPcopy Create free account
hub / github.com/Tencent/tgfx / hrefTarget

Method hrefTarget

src/svg/node/SVGPattern.cpp:52–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52const SVGPattern* SVGPattern::hrefTarget(const SVGRenderContext& context) const {
53 if (Href.iri().empty()) {
54 return nullptr;
55 }
56
57 const auto href = context.findNodeById(Href);
58 if (!href || href->tag() != SVGTag::Pattern) {
59 return nullptr;
60 }
61
62 return static_cast<const SVGPattern*>(href.get());
63}
64
65template <typename T>
66int inherit_if_needed(const std::optional<T>& src, std::optional<T>& dst) {

Callers 1

resolveHrefMethod · 0.80

Calls 4

findNodeByIdMethod · 0.80
tagMethod · 0.80
emptyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected