Skia
2D Graphics Library
SkSVGFeComposite.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 SkSVGFeComposite_DEFINED
9 #define SkSVGFeComposite_DEFINED
10 
14 
15 class SK_API SkSVGFeComposite final : public SkSVGFe {
16 public:
19  }
20 
27 
28 protected:
29  sk_sp<SkImageFilter> onMakeImageFilter(const SkSVGRenderContext&,
30  const SkSVGFilterContext&) const override;
31 
32  std::vector<SkSVGFeInputType> getInputs() const override {
33  return {this->getIn(), this->getIn2()};
34  }
35 
36  bool parseAndSetAttribute(const char*, const char*) override;
37 
38 private:
40 
41  static SkBlendMode BlendModeForOperator(SkSVGFeCompositeOperator);
42 
43  using INHERITED = SkSVGFe;
44 };
45 
46 #endif // SkSVGFeComposite_DEFINED
SkBlendMode
Blends are operators that take in two colors (source, destination) and return a new color.
Definition: SkBlendMode.h:38
SkSVGTag
Definition: SkSVGNode.h:23
#define SVG_ATTR(attr_name, attr_type, attr_default)
Definition: SkSVGNode.h:203
SkSVGFeCompositeOperator
Definition: SkSVGTypes.h:679
SkScalar SkSVGNumberType
Definition: SkSVGTypes.h:27
Base class for image filters.
Definition: SkImageFilter.h:35
Definition: SkSVGFeComposite.h:15
static sk_sp< SkSVGFeComposite > Make()
Definition: SkSVGFeComposite.h:17
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