#include <SkColorFilter.h>
|
static sk_sp< SkColorFilter > | Compose (const sk_sp< SkColorFilter > &outer, sk_sp< SkColorFilter > inner) |
|
static sk_sp< SkColorFilter > | Blend (const SkColor4f &c, sk_sp< SkColorSpace >, SkBlendMode mode) |
|
static sk_sp< SkColorFilter > | Blend (SkColor c, SkBlendMode mode) |
|
static sk_sp< SkColorFilter > | Matrix (const SkColorMatrix &) |
|
static sk_sp< SkColorFilter > | Matrix (const float rowMajor[20]) |
|
static sk_sp< SkColorFilter > | HSLAMatrix (const SkColorMatrix &) |
|
static sk_sp< SkColorFilter > | HSLAMatrix (const float rowMajor[20]) |
|
static sk_sp< SkColorFilter > | LinearToSRGBGamma () |
|
static sk_sp< SkColorFilter > | SRGBToLinearGamma () |
|
static sk_sp< SkColorFilter > | Lerp (float t, sk_sp< SkColorFilter > dst, sk_sp< SkColorFilter > src) |
|
static sk_sp< SkColorFilter > | Table (const uint8_t table[256]) |
|
static sk_sp< SkColorFilter > | TableARGB (const uint8_t tableA[256], const uint8_t tableR[256], const uint8_t tableG[256], const uint8_t tableB[256]) |
|
static sk_sp< SkColorFilter > | Table (sk_sp< SkColorTable > table) |
|
static sk_sp< SkColorFilter > | Lighting (SkColor mul, SkColor add) |
|
Definition at line 90 of file SkColorFilter.h.
◆ Blend() [1/2]
Definition at line 89 of file SkBlendModeColorFilter.cpp.
91 {
93 return nullptr;
94 }
95
96
97
99
100
101 float alpha = srgb.fA;
106 if (0.f == alpha) {
108 } else if (1.f == alpha) {
110 }
111
112 }
113
114
123 return nullptr;
124 }
125
127}
@ kSrcOver
r = s + (1-sa)*d
@ kXor
r = s*(1-da) + d*(1-sa)
@ kSrcATop
r = s*da + d*(1-sa)
@ kDstOver
r = d + (1-da)*s
@ kDarken
rc = s + d - max(s*da, d*sa), ra = kSrcOver
SkColorSpace * sk_srgb_singleton()
static bool SkIsValidMode(SkBlendMode mode)
constexpr SkColor4f kTransparent
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
◆ Blend() [2/2]
Definition at line 129 of file SkBlendModeColorFilter.cpp.
129 {
131}
static sk_sp< SkColorFilter > Blend(const SkColor4f &c, sk_sp< SkColorSpace >, SkBlendMode mode)
◆ Compose()
Definition at line 92 of file SkColorFilter.h.
93 {
95 : std::move(inner);
96 }
sk_sp< SkColorFilter > makeComposed(sk_sp< SkColorFilter > inner) const
◆ HSLAMatrix() [1/2]
Definition at line 107 of file SkMatrixColorFilter.cpp.
107 {
109}
static sk_sp< SkColorFilter > MakeMatrix(const float array[20], SkMatrixColorFilter::Domain domain)
◆ HSLAMatrix() [2/2]
◆ Lerp()
Definition at line 116 of file SkRuntimeColorFilter.cpp.
117 {
119
120 if (!cf0 && !cf1) {
121 return nullptr;
122 }
124 return nullptr;
125 }
126
127 if (cf0 == cf1) {
128 return cf0;
129 }
130
131 if (weight <= 0) {
132 return cf0;
133 }
134 if (weight >= 1) {
135 return cf1;
136 }
137
139
143}
static constexpr bool SkIsNaN(T x)
static sk_sp< SkData > MakeWithCopy(const void *data, size_t length)
sk_sp< SkColorFilter > makeColorFilter(sk_sp< const SkData > uniforms) const
const SkRuntimeEffect * GetKnownRuntimeEffect(StableKey stableKey)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
◆ Lighting()
Create a colorfilter that multiplies the RGB channels by one color, and then adds a second color, pinning the result for each component to [0..255]. The alpha components of the mul and add arguments are ignored.
Definition at line 26 of file SkColorMatrixFilter.cpp.
26 {
28
29 if (0 == (add & ~opaqueAlphaMask)) {
31 }
32
37 1);
41 0);
43}
static SkScalar byte_to_unit_float(U8CPU byte)
#define SkColorGetR(color)
#define SkColorGetG(color)
constexpr SkColor SK_ColorBLACK
#define SkColorGetB(color)
static sk_sp< SkColorFilter > Matrix(const SkColorMatrix &)
unsigned useCenter Optional< SkMatrix > matrix
◆ LinearToSRGBGamma()
Definition at line 82 of file SkColorSpaceXformColorFilter.cpp.
82 {
86}
sk_sp< T > sk_ref_sp(T *obj)
static sk_sp< SkColorSpace > MakeSRGB()
static sk_sp< SkColorSpace > MakeSRGBLinear()
◆ Matrix() [1/2]
◆ Matrix() [2/2]
◆ SRGBToLinearGamma()
◆ Table() [1/2]
Create a table colorfilter, copying the table into the filter, and applying it to all 4 components. a' = table[a]; r' = table[r]; g' = table[g]; b' = table[b]; Components are operated on in unpremultiplied space. If the incomming colors are premultiplied, they are temporarily unpremultiplied, then the table is applied, and then the result is remultiplied.
Definition at line 55 of file SkTableColorFilter.cpp.
55 {
57}
static sk_sp< SkColorFilter > Table(const uint8_t table[256])
static sk_sp< SkColorTable > Make(const uint8_t table[256])
◆ Table() [2/2]
Create a table colorfilter that holds a ref to the shared color table.
Definition at line 66 of file SkTableColorFilter.cpp.
66 {
68 return nullptr;
69 }
70 return sk_make_sp<SkTableColorFilter>(std::move(
table));
71}
◆ TableARGB()
sk_sp< SkColorFilter > SkColorFilters::TableARGB |
( |
const uint8_t |
tableA[256], |
|
|
const uint8_t |
tableR[256], |
|
|
const uint8_t |
tableG[256], |
|
|
const uint8_t |
tableB[256] |
|
) |
| |
|
static |
Create a table colorfilter, with a different table for each component [A, R, G, B]. If a given table is NULL, then it is treated as identity, with the component left unchanged. If a table is not null, then its contents are copied into the filter.
Definition at line 59 of file SkTableColorFilter.cpp.
The documentation for this class was generated from the following files: