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
|
|
|
|
|
2016-12-01 18:35:11 +00:00
|
|
|
#include "SkPath.h"
|
2016-08-03 17:21:11 +00:00
|
|
|
#include "SkSVGTransformableNode.h"
|
|
|
|
|
|
|
|
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&,
|
|
|
|
SkPath::FillType) const = 0;
|
|
|
|
|
2016-08-03 17:21:11 +00:00
|
|
|
private:
|
|
|
|
typedef SkSVGTransformableNode INHERITED;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SkSVGShape_DEFINED
|