blob: 98d9b4bcbbea61829ce3d72780b623c4b7774154 [file] [log] [blame]
fmalitabffc2562016-08-03 10:21:11 -07001/*
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
Florin Malitae932d4b2016-12-01 13:35:11 -050011#include "SkPath.h"
fmalitabffc2562016-08-03 10:21:11 -070012#include "SkSVGTransformableNode.h"
13
14class SkSVGLengthContext;
15class SkPaint;
16
17class SkSVGShape : public SkSVGTransformableNode {
18public:
Brian Salomond3b65972017-03-22 12:05:03 -040019 ~SkSVGShape() override = default;
fmalitabffc2562016-08-03 10:21:11 -070020
21 void appendChild(sk_sp<SkSVGNode>) override;
22
23protected:
24 SkSVGShape(SkSVGTag);
25
fmalita397a5172016-08-08 11:38:55 -070026 void onRender(const SkSVGRenderContext&) const final;
fmalitabffc2562016-08-03 10:21:11 -070027
Florin Malitae932d4b2016-12-01 13:35:11 -050028 virtual void onDraw(SkCanvas*, const SkSVGLengthContext&, const SkPaint&,
29 SkPath::FillType) const = 0;
30
fmalitabffc2562016-08-03 10:21:11 -070031private:
32 typedef SkSVGTransformableNode INHERITED;
33};
34
35#endif // SkSVGShape_DEFINED