2016-07-27 01:46:34 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2016 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SkSVGContainer_DEFINED
|
|
|
|
#define SkSVGContainer_DEFINED
|
|
|
|
|
2019-04-23 17:05:21 +00:00
|
|
|
#include "experimental/svg/model/SkSVGTransformableNode.h"
|
|
|
|
#include "include/private/SkTArray.h"
|
2016-07-27 01:46:34 +00:00
|
|
|
|
|
|
|
class SkSVGContainer : public SkSVGTransformableNode {
|
|
|
|
public:
|
2017-03-22 16:05:03 +00:00
|
|
|
~SkSVGContainer() override = default;
|
2016-07-27 01:46:34 +00:00
|
|
|
|
|
|
|
void appendChild(sk_sp<SkSVGNode>) override;
|
|
|
|
|
|
|
|
protected:
|
2016-09-13 00:06:47 +00:00
|
|
|
explicit SkSVGContainer(SkSVGTag);
|
2016-07-27 01:46:34 +00:00
|
|
|
|
2016-08-08 18:38:55 +00:00
|
|
|
void onRender(const SkSVGRenderContext&) const override;
|
2016-07-27 01:46:34 +00:00
|
|
|
|
2016-12-08 14:26:47 +00:00
|
|
|
SkPath onAsPath(const SkSVGRenderContext&) const override;
|
|
|
|
|
2016-09-20 22:45:57 +00:00
|
|
|
bool hasChildren() const final;
|
|
|
|
|
2016-09-13 00:06:47 +00:00
|
|
|
// TODO: add some sort of child iterator, and hide the container.
|
2016-07-27 01:46:34 +00:00
|
|
|
SkSTArray<1, sk_sp<SkSVGNode>, true> fChildren;
|
|
|
|
|
2016-09-13 00:06:47 +00:00
|
|
|
private:
|
2020-09-03 02:42:33 +00:00
|
|
|
using INHERITED = SkSVGTransformableNode;
|
2016-07-27 01:46:34 +00:00
|
|
|
};
|
|
|
|
|
2017-10-11 18:02:11 +00:00
|
|
|
#endif // SkSVGContainer_DEFINED
|