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