1 /* 2 * Copyright 2016 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #ifndef SkSVGContainer_DEFINED 9 #define SkSVGContainer_DEFINED 10 11 #include "SkSVGTransformableNode.h" 12 #include "SkTArray.h" 13 14 class SkSVGContainer : public SkSVGTransformableNode { 15 public: 16 ~SkSVGContainer() override = default; 17 18 void appendChild(sk_sp<SkSVGNode>) override; 19 20 protected: 21 explicit SkSVGContainer(SkSVGTag); 22 23 void onRender(const SkSVGRenderContext&) const override; 24 25 SkPath onAsPath(const SkSVGRenderContext&) const override; 26 27 bool hasChildren() const final; 28 29 // TODO: add some sort of child iterator, and hide the container. 30 SkSTArray<1, sk_sp<SkSVGNode>, true> fChildren; 31 32 private: 33 typedef SkSVGTransformableNode INHERITED; 34 }; 35 36 #endif // SkSVGSVG_DEFINED 37