1 /* 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 11 #include "include/core/SkRefCnt.h" 12 #include "include/private/base/SkAPI.h" 13 #include "modules/svg/include/SkSVGTransformableNode.h" 14 15 class SkCanvas; 16 class SkPaint; 17 class SkSVGLengthContext; 18 class SkSVGNode; 19 class SkSVGRenderContext; 20 enum class SkPathFillType; 21 enum class SkSVGTag; 22 23 class SK_API SkSVGShape : public SkSVGTransformableNode { 24 public: 25 void appendChild(sk_sp<SkSVGNode>) override; 26 27 protected: 28 SkSVGShape(SkSVGTag); 29 30 void onRender(const SkSVGRenderContext&) const final; 31 32 virtual void onDraw(SkCanvas*, const SkSVGLengthContext&, const SkPaint&, 33 SkPathFillType) const = 0; 34 35 private: 36 using INHERITED = SkSVGTransformableNode; 37 }; 38 39 #endif // SkSVGShape_DEFINED 40