Skia
2D Graphics Library
SkSVGFeMorphology.h
Go to the documentation of this file.
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 SkSVGFeMorphology_DEFINED
9 #define SkSVGFeMorphology_DEFINED
10 
13 
14 class SkSVGFeMorphology : public SkSVGFe {
15 public:
16  struct Radius {
19  };
20 
21  enum class Operator {
22  kErode,
23  kDilate,
24  };
25 
28  }
29 
31  SVG_ATTR(Radius , Radius , Radius({0, 0}))
32 
33 protected:
35  const SkSVGFilterContext&) const override;
36 
37  std::vector<SkSVGFeInputType> getInputs() const override { return {this->getIn()}; }
38 
39  bool parseAndSetAttribute(const char*, const char*) override;
40 
41 private:
43 
44  using INHERITED = SkSVGFe;
45 };
46 
47 #endif // SkSVGFeMorphology_DEFINED
SkSVGTag
Definition: SkSVGNode.h:23
#define SVG_ATTR(attr_name, attr_type, attr_default)
Definition: SkSVGNode.h:203
SkScalar SkSVGNumberType
Definition: SkSVGTypes.h:27
Base class for image filters.
Definition: SkImageFilter.h:35
Definition: SkSVGTypes.h:635
Definition: SkSVGFeMorphology.h:14
sk_sp< SkImageFilter > onMakeImageFilter(const SkSVGRenderContext &, const SkSVGFilterContext &) const override
bool parseAndSetAttribute(const char *, const char *) override
Operator
Definition: SkSVGFeMorphology.h:21
static sk_sp< SkSVGFeMorphology > Make()
Definition: SkSVGFeMorphology.h:26
std::vector< SkSVGFeInputType > getInputs() const override
Definition: SkSVGFeMorphology.h:37
Definition: SkSVGFe.h:18
SkSVGFe(SkSVGTag t)
Definition: SkSVGFe.h:65
Definition: SkSVGFilterContext.h:21
Definition: SkSVGRenderContext.h:61
Definition: SkSVGTransformableNode.h:14
Shared pointer class to wrap classes that support a ref()/unref() interface.
Definition: SkRefCnt.h:220
Definition: SkSVGFeMorphology.h:16
SkSVGNumberType fY
Definition: SkSVGFeMorphology.h:18
SkSVGNumberType fX
Definition: SkSVGFeMorphology.h:17