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
|
|
|
|
|
|
|
|
#include "SkSVGTransformableNode.h"
|
|
|
|
#include "SkTArray.h"
|
|
|
|
|
|
|
|
class SkSVGContainer : public SkSVGTransformableNode {
|
|
|
|
public:
|
|
|
|
virtual ~SkSVGContainer() = default;
|
|
|
|
|
|
|
|
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-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:
|
2016-07-27 01:46:34 +00:00
|
|
|
typedef SkSVGTransformableNode INHERITED;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SkSVGSVG_DEFINED
|