Debian Codegraph @

modules/svg/include/SkSVGShape.h

raw
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 SkSVGShape_DEFINED
9 #define SkSVGShape_DEFINED
10
11 #include "include/core/SkPathTypes.h"
12 #include "include/core/SkRect.h"
13 #include "include/core/SkRefCnt.h"
14 #include "include/private/base/SkAPI.h"
15 #include "modules/svg/include/SkSVGTransformableNode.h"
16
17 class SkCanvas;
18 class SkPaint;
19 class SkSVGLengthContext;
20 class SkSVGNode;
21 class SkSVGRenderContext;
22 enum class SkSVGTag;
23
24 class SK_API SkSVGShape : public SkSVGTransformableNode {
25 public:
26 void appendChild(sk_sp<SkSVGNode>) override;
27
28 protected:
29 explicit SkSVGShape(SkSVGTag);
30
31 void onRender(const SkSVGRenderContext&) const final;
32
33 virtual void onDraw(SkCanvas*, const SkSVGLengthContext&, const SkPaint&,
34 SkPathFillType) const = 0;
35
36 private:
37 using INHERITED = SkSVGTransformableNode;
38 };
39
40 #endif // SkSVGShape_DEFINED