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 "SkPath.h" 12 #include "SkSVGTransformableNode.h" 13 14 class SkSVGLengthContext; 15 class SkPaint; 16 17 class SkSVGShape : public SkSVGTransformableNode { 18 public: 19 ~SkSVGShape() override = default; 20 21 void appendChild(sk_sp<SkSVGNode>) override; 22 23 protected: 24 SkSVGShape(SkSVGTag); 25 26 void onRender(const SkSVGRenderContext&) const final; 27 28 virtual void onDraw(SkCanvas*, const SkSVGLengthContext&, const SkPaint&, 29 SkPath::FillType) const = 0; 30 31 static SkPath::FillType FillRuleToFillType(const SkSVGFillRule&); 32 33 private: 34 typedef SkSVGTransformableNode INHERITED; 35 }; 36 37 #endif // SkSVGShape_DEFINED 38