OLD | NEW |
(Empty) | |
| 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 SkSVGPath_DEFINED |
| 9 #define SkSVGPath_DEFINED |
| 10 |
| 11 #include "SkPath.h" |
| 12 #include "SkSVGTransformableNode.h" |
| 13 |
| 14 class SkSVGPath final : public SkSVGTransformableNode { |
| 15 public: |
| 16 virtual ~SkSVGPath() = default; |
| 17 static sk_sp<SkSVGPath> Make() { return sk_sp<SkSVGPath>(new SkSVGPath()); } |
| 18 |
| 19 void appendChild(sk_sp<SkSVGNode>) override { } |
| 20 |
| 21 void setPath(const SkPath& path) { fPath = path; } |
| 22 |
| 23 protected: |
| 24 void onRender(SkCanvas*, const SkSVGRenderContext&) const override; |
| 25 |
| 26 void onSetAttribute(SkSVGAttribute, const SkSVGValue&) override; |
| 27 |
| 28 private: |
| 29 SkSVGPath(); |
| 30 |
| 31 void doRender(SkCanvas*, const SkPaint*) const; |
| 32 |
| 33 SkPath fPath; |
| 34 |
| 35 typedef SkSVGTransformableNode INHERITED; |
| 36 }; |
| 37 |
| 38 #endif // SkSVGPath_DEFINED |
OLD | NEW |