Flutter Engine
The Flutter Engine
SkSVGFeBlend.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 SkSVGFeBlend_DEFINED
9#define SkSVGFeBlend_DEFINED
10
13
14class SK_API SkSVGFeBlend : public SkSVGFe {
15public:
16 enum class Mode {
17 kNormal,
19 kScreen,
20 kDarken,
22 };
23
25
28
29protected:
30 sk_sp<SkImageFilter> onMakeImageFilter(const SkSVGRenderContext&,
31 const SkSVGFilterContext&) const override;
32
33 std::vector<SkSVGFeInputType> getInputs() const override {
34 return {this->getIn(), this->getIn2()};
35 }
36
37 bool parseAndSetAttribute(const char*, const char*) override;
38
39private:
41
42 using INHERITED = SkSVGFe;
43};
44
45#endif // SkSVGFeBlend_DEFINED
#define SK_API
Definition: SkAPI.h:35
@ kLighten
rc = s + d - min(s*da, d*sa), ra = kSrcOver
@ kMultiply
r = s*(1-da) + d*(1-sa) + s*d
@ kScreen
r = s + d - s*d
@ kDarken
rc = s + d - max(s*da, d*sa), ra = kSrcOver
@ kNormal
glyph outlines modified to improve constrast
#define INHERITED(method,...)
Definition: SkRecorder.cpp:128
SkSVGTag
Definition: SkSVGNode.h:23
#define SVG_ATTR(attr_name, attr_type, attr_default)
Definition: SkSVGNode.h:210
static sk_sp< SkSVGFeBlend > Make()
Definition: SkSVGFeBlend.h:24
bool parseAndSetAttribute(const char *, const char *) override
Definition: SkSVGFe.cpp:93
SkSVGFe(SkSVGTag t)
Definition: SkSVGFe.h:67
@ kNormal
Default priority level.
Definition: embedder.h:262
Definition: ref_ptr.h:256