Skia
2D Graphics Library
SkSVGFeDisplacementMap.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 SkSVGFeDisplacementMap_DEFINED
9 #define SkSVGFeDisplacementMap_DEFINED
10 
13 
14 class SK_API SkSVGFeDisplacementMap : public SkSVGFe {
15 public:
17 
20  }
21 
23  const SkSVGFilterContext&) const final;
24 
26  SVG_ATTR(XChannelSelector, ChannelSelector , ChannelSelector::kA)
27  SVG_ATTR(YChannelSelector, ChannelSelector , ChannelSelector::kA)
29 
30 protected:
31  sk_sp<SkImageFilter> onMakeImageFilter(const SkSVGRenderContext&,
32  const SkSVGFilterContext&) const override;
33 
34  std::vector<SkSVGFeInputType> getInputs() const override {
35  return {this->getIn(), this->getIn2()};
36  }
37 
38  bool parseAndSetAttribute(const char*, const char*) override;
39 
40 private:
42 
43  using INHERITED = SkSVGFe;
44 };
45 
46 #endif // SkSVGFeDisplacementMap_DEFINED
SkColorChannel
Describes different color channels one can manipulate.
Definition: SkColor.h:228
SkSVGTag
Definition: SkSVGNode.h:23
@ kFeDisplacementMap
#define SVG_ATTR(attr_name, attr_type, attr_default)
Definition: SkSVGNode.h:203
SkSVGColorspace
Definition: SkSVGTypes.h:719
SkScalar SkSVGNumberType
Definition: SkSVGTypes.h:27
Base class for image filters.
Definition: SkImageFilter.h:35
Definition: SkSVGFeDisplacementMap.h:14
SkSVGColorspace resolveColorspace(const SkSVGRenderContext &, const SkSVGFilterContext &) const final
Resolves the colorspace within which this filter effect should be applied.
static sk_sp< SkSVGFeDisplacementMap > Make()
Definition: SkSVGFeDisplacementMap.h:18
bool parseAndSetAttribute(const char *, const char *) override
Definition: SkSVGTypes.h:635
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