2016-08-03 17:21:11 +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 SkSVGShape_DEFINED
|
|
|
|
#define SkSVGShape_DEFINED
|
|
|
|
|
2019-04-23 17:05:21 +00:00
|
|
|
#include "experimental/svg/model/SkSVGTransformableNode.h"
|
|
|
|
#include "include/core/SkPath.h"
|
2016-08-03 17:21:11 +00:00
|
|
|
|
|
|
|
class SkSVGLengthContext;
|
|
|
|
class SkPaint;
|
|
|
|
|
|
|
|
class SkSVGShape : public SkSVGTransformableNode {
|
|
|
|
public:
|
2017-03-22 16:05:03 +00:00
|
|
|
~SkSVGShape() override = default;
|
2016-08-03 17:21:11 +00:00
|
|
|
|
|
|
|
void appendChild(sk_sp<SkSVGNode>) override;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
SkSVGShape(SkSVGTag);
|
|
|
|
|
2016-08-08 18:38:55 +00:00
|
|
|
void onRender(const SkSVGRenderContext&) const final;
|
2016-08-03 17:21:11 +00:00
|
|
|
|
2016-12-01 18:35:11 +00:00
|
|
|
virtual void onDraw(SkCanvas*, const SkSVGLengthContext&, const SkPaint&,
|
2019-11-26 17:17:17 +00:00
|
|
|
SkPathFillType) const = 0;
|
2016-12-01 18:35:11 +00:00
|
|
|
|
2016-08-03 17:21:11 +00:00
|
|
|
private:
|
|
|
|
typedef SkSVGTransformableNode INHERITED;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SkSVGShape_DEFINED
|