Flutter Engine
The Flutter Engine
SkSVGFeComponentTransfer.h
Go to the documentation of this file.
1/*
2 * Copyright 2024 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 SkSVGFeComponentTransfer_DEFINED
9#define SkSVGFeComponentTransfer_DEFINED
10
15
16#include <cstdint>
17
18class SkSVGFeFunc final : public SkSVGHiddenContainer {
19public:
22 }
23
26 }
27
30 }
31
34 }
35
36 SVG_ATTR(Amplitude , SkSVGNumberType, 1)
37 SVG_ATTR(Exponent , SkSVGNumberType, 1)
38 SVG_ATTR(Intercept , SkSVGNumberType, 0)
39 SVG_ATTR(Offset , SkSVGNumberType, 0)
40 SVG_ATTR(Slope , SkSVGNumberType, 1)
41 SVG_ATTR(TableValues, std::vector<SkSVGNumberType>, {})
43
44 std::vector<uint8_t> getTable() const;
45
46protected:
47 bool parseAndSetAttribute(const char*, const char*) override;
48
49private:
50 SkSVGFeFunc(SkSVGTag tag) : INHERITED(tag) {}
51
52 using INHERITED = SkSVGHiddenContainer;
53};
54
56public:
58
61 }
62
63protected:
65 const SkSVGFilterContext&) const override;
66
67 std::vector<SkSVGFeInputType> getInputs() const override { return {this->getIn()}; }
68
69private:
71
72 using INHERITED = SkSVGFe;
73};
74
75#endif // SkSVGFeComponentTransfer_DEFINED
#define SK_API
Definition: SkAPI.h:35
#define INHERITED(method,...)
Definition: SkRecorder.cpp:128
SkSVGTag
Definition: SkSVGNode.h:23
@ kFeComponentTransfer
#define SVG_ATTR(attr_name, attr_type, attr_default)
Definition: SkSVGNode.h:210
SkSVGFeFuncType
Definition: SkSVGTypes.h:732
SkScalar SkSVGNumberType
Definition: SkSVGTypes.h:27
std::vector< SkSVGFeInputType > getInputs() const override
static sk_sp< SkSVGFeComponentTransfer > Make()
static sk_sp< SkSVGFeFunc > MakeFuncG()
bool parseAndSetAttribute(const char *, const char *) override
std::vector< uint8_t > getTable() const
static sk_sp< SkSVGFeFunc > MakeFuncR()
static sk_sp< SkSVGFeFunc > MakeFuncB()
static sk_sp< SkSVGFeFunc > MakeFuncA()
SkSVGFe(SkSVGTag t)
Definition: SkSVGFe.h:67
virtual sk_sp< SkImageFilter > onMakeImageFilter(const SkSVGRenderContext &, const SkSVGFilterContext &) const =0
SkSVGTag tag() const
Definition: SkSVGNode.h:106
Definition: ref_ptr.h:256