Skia
2D Graphics Library
SkSVGContainer.h
Go to the documentation of this file.
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 "include/private/base/SkTArray.h"
12
#include "
modules/svg/include/SkSVGTransformableNode.h
"
13
14
class
SK_API
SkSVGContainer
:
public
SkSVGTransformableNode
{
15
public
:
16
void
appendChild
(
sk_sp<SkSVGNode>
)
override
;
17
18
protected
:
19
explicit
SkSVGContainer
(
SkSVGTag
);
20
21
void
onRender
(
const
SkSVGRenderContext
&)
const override
;
22
23
SkPath
onAsPath
(
const
SkSVGRenderContext
&)
const override
;
24
25
SkRect
onObjectBoundingBox
(
const
SkSVGRenderContext
&)
const override
;
26
27
bool
hasChildren
() const final;
28
29
// TODO: add some sort of child iterator, and hide the container.
30
skia_private::STArray<1,
sk_sp
<
SkSVGNode
>, true> fChildren;
31
32
private:
33
using
INHERITED
=
SkSVGTransformableNode
;
34
};
35
36
#endif
// SkSVGContainer_DEFINED
SkSVGTag
SkSVGTag
Definition:
SkSVGNode.h:23
SkSVGTransformableNode.h
SkPath
SkPath contain geometry.
Definition:
SkPath.h:58
SkSVGContainer
Definition:
SkSVGContainer.h:14
SkSVGContainer::onRender
void onRender(const SkSVGRenderContext &) const override
SkSVGContainer::onObjectBoundingBox
SkRect onObjectBoundingBox(const SkSVGRenderContext &) const override
SkSVGContainer::hasChildren
bool hasChildren() const final
SkSVGContainer::appendChild
void appendChild(sk_sp< SkSVGNode >) override
SkSVGContainer::onAsPath
SkPath onAsPath(const SkSVGRenderContext &) const override
SkSVGContainer::SkSVGContainer
SkSVGContainer(SkSVGTag)
SkSVGNode
Definition:
SkSVGNode.h:95
SkSVGRenderContext
Definition:
SkSVGRenderContext.h:61
SkSVGTransformableNode
Definition:
SkSVGTransformableNode.h:14
sk_sp< SkSVGNode >
SkRect
SkRect holds four float coordinates describing the upper and lower bounds of a rectangle.
Definition:
SkRect.h:582
modules
svg
include
SkSVGContainer.h
Generated by
Doxygen
1.9.1 on Tue Nov 14 2023