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
|
|
|
|
|
|
|
|
#include "SkSVGTransformableNode.h"
|
|
|
|
|
|
|
|
class SkSVGLengthContext;
|
|
|
|
class SkPaint;
|
|
|
|
|
|
|
|
class SkSVGShape : public SkSVGTransformableNode {
|
|
|
|
public:
|
|
|
|
virtual ~SkSVGShape() = default;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
virtual void onDraw(SkCanvas*, const SkSVGLengthContext&, const SkPaint&) const = 0;
|
|
|
|
|
|
|
|
private:
|
|
|
|
typedef SkSVGTransformableNode INHERITED;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SkSVGShape_DEFINED
|