8 #ifndef SkColorFilter_DEFINED
9 #define SkColorFilter_DEFINED
14 #include "include/private/base/SkAPI.h"
79 friend class SkColorFilterBase;
129 const uint8_t tableR[256],
130 const uint8_t tableG[256],
131 const uint8_t tableB[256]);
SkBlendMode
Blends are operators that take in two colors (source, destination) and return a new color.
Definition: SkBlendMode.h:38
Types, consts, functions, and macros for colors.
uint32_t SkColor
32-bit ARGB color value, unpremultiplied.
Definition: SkColor.h:37
ColorFilters are optional objects in the drawing pipeline.
Definition: SkColorFilter.h:35
bool asAColorMode(SkColor *color, SkBlendMode *mode) const
If the filter can be represented by a source color plus Mode, this returns true, and sets (if not NUL...
bool asAColorMatrix(float matrix[20]) const
If the filter can be represented by a 5x4 matrix, this returns true, and sets the matrix appropriatel...
bool isAlphaUnchanged() const
sk_sp< SkColorFilter > makeComposed(sk_sp< SkColorFilter > inner) const
Construct a colorfilter whose effect is to first apply the inner filter and then apply this filter,...
SkColor4f filterColor4f(const SkColor4f &srcColor, SkColorSpace *srcCS, SkColorSpace *dstCS) const
Converts the src color (in src colorspace), into the dst colorspace, then applies this filter to it,...
sk_sp< SkColorFilter > makeWithWorkingColorSpace(sk_sp< SkColorSpace >) const
Return a colorfilter that will compute this filter in a specific color space.
static sk_sp< SkColorFilter > Deserialize(const void *data, size_t size, const SkDeserialProcs *procs=nullptr)
SkColor filterColor(SkColor) const
Definition: SkColorFilter.h:84
static sk_sp< SkColorFilter > Lighting(SkColor mul, SkColor add)
Create a colorfilter that multiplies the RGB channels by one color, and then adds a second color,...
static sk_sp< SkColorFilter > LinearToSRGBGamma()
static sk_sp< SkColorFilter > Blend(const SkColor4f &c, sk_sp< SkColorSpace >, SkBlendMode mode)
static sk_sp< SkColorFilter > HSLAMatrix(const float rowMajor[20])
static sk_sp< SkColorFilter > Blend(SkColor c, SkBlendMode mode)
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])
Create a table colorfilter, with a different table for each component [A, R, G, B].
static sk_sp< SkColorFilter > HSLAMatrix(const SkColorMatrix &)
static sk_sp< SkColorFilter > Table(sk_sp< SkColorTable > table)
Create a table colorfilter that holds a ref to the shared color table.
static sk_sp< SkColorFilter > Matrix(const float rowMajor[20])
static sk_sp< SkColorFilter > SRGBToLinearGamma()
static sk_sp< SkColorFilter > Compose(const sk_sp< SkColorFilter > &outer, sk_sp< SkColorFilter > inner)
Definition: SkColorFilter.h:86
static sk_sp< SkColorFilter > Matrix(const SkColorMatrix &)
static sk_sp< SkColorFilter > Table(const uint8_t table[256])
Create a table colorfilter, copying the table into the filter, and applying it to all 4 components.
static sk_sp< SkColorFilter > Lerp(float t, sk_sp< SkColorFilter > dst, sk_sp< SkColorFilter > src)
Definition: SkColorMatrix.h:18
Definition: SkColorSpace.h:107
SkColorTable holds the lookup tables for each channel (ARGB) used to define the filter behavior of Sk...
Definition: SkColorTable.h:25
SkFlattenable is the base class for objects that need to be flattened into a data stream for either t...
Definition: SkFlattenable.h:28
SkFlattenable()
Definition: SkFlattenable.h:43
RGBA color value, holding four floating point components.
Definition: SkSerialProcs.h:97