Flutter Engine
The Flutter Engine
SkSVGFeColorMatrix.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 SkSVGFeColorMatrix_DEFINED
9#define SkSVGFeColorMatrix_DEFINED
10
14
15class SK_API SkSVGFeColorMatrix final : public SkSVGFe {
16public:
19 }
20
23
24protected:
25 sk_sp<SkImageFilter> onMakeImageFilter(const SkSVGRenderContext&,
26 const SkSVGFilterContext&) const override;
27
28 std::vector<SkSVGFeInputType> getInputs() const override { return {this->getIn()}; }
29
30 bool parseAndSetAttribute(const char*, const char*) override;
31
32private:
34
35 SkColorMatrix makeMatrixForType() const;
36
37 static SkColorMatrix MakeSaturate(SkSVGNumberType s);
38
39 static SkColorMatrix MakeHueRotate(SkSVGNumberType degrees);
40
41 static SkColorMatrix MakeLuminanceToAlpha();
42
43 using INHERITED = SkSVGFe;
44};
45
46#endif // SkSVGFeColorMatrix_DEFINED
#define SK_API
Definition: SkAPI.h:35
#define INHERITED(method,...)
Definition: SkRecorder.cpp:128
SkSVGTag
Definition: SkSVGNode.h:23
@ kFeColorMatrix
#define SVG_ATTR(attr_name, attr_type, attr_default)
Definition: SkSVGNode.h:210
std::vector< SkSVGNumberType > SkSVGFeColorMatrixValues
Definition: SkSVGTypes.h:677
SkScalar SkSVGNumberType
Definition: SkSVGTypes.h:27
SkSVGFeColorMatrixType
Definition: SkSVGTypes.h:670
static sk_sp< SkSVGFeColorMatrix > Make()
bool parseAndSetAttribute(const char *, const char *) override
Definition: SkSVGFe.cpp:93
SkSVGFe(SkSVGTag t)
Definition: SkSVGFe.h:67
struct MyStruct s
Definition: ref_ptr.h:256