• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 SkSVGFeGaussianBlur_DEFINED
9 #define SkSVGFeGaussianBlur_DEFINED
10 
11 #include "modules/svg/include/SkSVGFe.h"
12 #include "modules/svg/include/SkSVGTypes.h"
13 
14 class SkSVGFeGaussianBlur : public SkSVGFe {
15 public:
16     struct StdDeviation {
17         SkSVGNumberType fX;
18         SkSVGNumberType fY;
19     };
20 
Make()21     static sk_sp<SkSVGFeGaussianBlur> Make() {
22         return sk_sp<SkSVGFeGaussianBlur>(new SkSVGFeGaussianBlur());
23     }
24 
25     SVG_ATTR(StdDeviation, StdDeviation, StdDeviation({0, 0}))
26 
27 protected:
28     sk_sp<SkImageFilter> onMakeImageFilter(const SkSVGRenderContext&,
29                                            const SkSVGFilterContext&) const override;
30 
getInputs()31     std::vector<SkSVGFeInputType> getInputs() const override { return {this->getIn()}; }
32 
33     bool parseAndSetAttribute(const char*, const char*) override;
34 
35 private:
SkSVGFeGaussianBlur()36     SkSVGFeGaussianBlur() : INHERITED(SkSVGTag::kFeGaussianBlur) {}
37 
38     using INHERITED = SkSVGFe;
39 };
40 
41 #endif  // SkSVGFeGaussianBlur_DEFINED
42