/src/skia/modules/svg/include/SkSVGFeOffset.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright 2020 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 SkSVGFeOffset_DEFINED |
9 | | #define SkSVGFeOffset_DEFINED |
10 | | |
11 | | #include "include/core/SkRefCnt.h" |
12 | | #include "include/private/base/SkAPI.h" |
13 | | #include "modules/svg/include/SkSVGFe.h" |
14 | | #include "modules/svg/include/SkSVGNode.h" |
15 | | #include "modules/svg/include/SkSVGTypes.h" |
16 | | |
17 | | #include <vector> |
18 | | |
19 | | class SkImageFilter; |
20 | | class SkSVGFilterContext; |
21 | | class SkSVGRenderContext; |
22 | | |
23 | | class SK_API SkSVGFeOffset : public SkSVGFe { |
24 | | public: |
25 | 0 | static sk_sp<SkSVGFeOffset> Make() { return sk_sp<SkSVGFeOffset>(new SkSVGFeOffset()); } |
26 | | |
27 | | SVG_ATTR(Dx, SkSVGNumberType, SkSVGNumberType(0)) |
28 | | SVG_ATTR(Dy, SkSVGNumberType, SkSVGNumberType(0)) |
29 | | |
30 | | protected: |
31 | | sk_sp<SkImageFilter> onMakeImageFilter(const SkSVGRenderContext&, |
32 | | const SkSVGFilterContext&) const override; |
33 | | |
34 | 0 | std::vector<SkSVGFeInputType> getInputs() const override { return {this->getIn()}; } |
35 | | |
36 | | bool parseAndSetAttribute(const char*, const char*) override; |
37 | | |
38 | | private: |
39 | 0 | SkSVGFeOffset() : INHERITED(SkSVGTag::kFeOffset) {} |
40 | | |
41 | | using INHERITED = SkSVGFe; |
42 | | }; |
43 | | |
44 | | #endif // SkSVGFeOffset_DEFINED |