Skia
2D Graphics Library
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
11
#include "
include/effects/SkColorMatrix.h
"
12
#include "
modules/svg/include/SkSVGFe.h
"
13
#include "
modules/svg/include/SkSVGTypes.h
"
14
15
class
SK_API
SkSVGFeColorMatrix
final :
public
SkSVGFe
{
16
public
:
17
static
sk_sp<SkSVGFeColorMatrix>
Make
() {
18
return
sk_sp<SkSVGFeColorMatrix>
(
new
SkSVGFeColorMatrix
());
19
}
20
21
SVG_ATTR
(Type,
SkSVGFeColorMatrixType
,
SkSVGFeColorMatrixType
(
SkSVGFeColorMatrixType::kMatrix
))
22
SVG_ATTR
(Values,
SkSVGFeColorMatrixValues
,
SkSVGFeColorMatrixValues
())
23
24
protected:
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
32
private
:
33
SkSVGFeColorMatrix
() :
INHERITED
(
SkSVGTag
::
kFeColorMatrix
) {}
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
SkColorMatrix.h
SkSVGFe.h
SkSVGTag
SkSVGTag
Definition:
SkSVGNode.h:23
SkSVGTag::kFeColorMatrix
@ kFeColorMatrix
SVG_ATTR
#define SVG_ATTR(attr_name, attr_type, attr_default)
Definition:
SkSVGNode.h:203
SkSVGTypes.h
SkSVGFeColorMatrixValues
std::vector< SkSVGNumberType > SkSVGFeColorMatrixValues
Definition:
SkSVGTypes.h:677
SkSVGNumberType
SkScalar SkSVGNumberType
Definition:
SkSVGTypes.h:27
SkSVGFeColorMatrixType
SkSVGFeColorMatrixType
Definition:
SkSVGTypes.h:670
SkSVGFeColorMatrixType::kMatrix
@ kMatrix
SkColorMatrix
Definition:
SkColorMatrix.h:18
SkImageFilter
Base class for image filters.
Definition:
SkImageFilter.h:35
SkSVGFeColorMatrix
Definition:
SkSVGFeColorMatrix.h:15
SkSVGFeColorMatrix::parseAndSetAttribute
bool parseAndSetAttribute(const char *, const char *) override
SkSVGFeColorMatrix::Make
static sk_sp< SkSVGFeColorMatrix > Make()
Definition:
SkSVGFeColorMatrix.h:17
SkSVGFeInputType
Definition:
SkSVGTypes.h:635
SkSVGFe
Definition:
SkSVGFe.h:18
SkSVGFe::SkSVGFe
SkSVGFe(SkSVGTag t)
Definition:
SkSVGFe.h:65
SkSVGFilterContext
Definition:
SkSVGFilterContext.h:21
SkSVGRenderContext
Definition:
SkSVGRenderContext.h:61
SkSVGTransformableNode
Definition:
SkSVGTransformableNode.h:14
sk_sp
Shared pointer class to wrap classes that support a ref()/unref() interface.
Definition:
SkRefCnt.h:220
modules
svg
include
SkSVGFeColorMatrix.h
Generated by
Doxygen
1.9.1 on Tue Nov 14 2023