blob: ff57d5bfa5db8af7b6752d8084cb8cadec6fee0c [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
Mike Kleinc0bd9f92019-04-23 12:05:21 -050011#include "experimental/svg/model/SkSVGTransformableNode.h"
12#include "include/core/SkPath.h"
fmalitabffc2562016-08-03 10:21:11 -070013
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&,
Mike Reed7d34dc72019-11-26 12:17:17 -050029 SkPathFillType) const = 0;
Florin Malitae932d4b2016-12-01 13:35:11 -050030
fmalitabffc2562016-08-03 10:21:11 -070031private:
32 typedef SkSVGTransformableNode INHERITED;
33};
34
35#endif // SkSVGShape_DEFINED