Skia
2DGraphicsLibrary
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SkColorMatrixFilter Class Reference
Inheritance diagram for SkColorMatrixFilter:
SkColorFilter SkFlattenable SkRefCnt SkRefCntBase

Static Public Member Functions

static sk_sp< SkColorFilterMakeLightingFilter (SkColor mul, SkColor add)
 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]. More...
 
- Static Public Member Functions inherited from SkColorFilter
static sk_sp< SkColorFilterMakeModeFilter (SkColor c, SkBlendMode mode)
 Create a colorfilter that uses the specified color and mode. More...
 
static sk_sp< SkColorFilterMakeComposeFilter (sk_sp< SkColorFilter > outer, sk_sp< SkColorFilter > inner)
 Construct a colorfilter whose effect is to first apply the inner filter and then apply the outer filter to the result of the inner's. More...
 
static sk_sp< SkColorFilterMakeMatrixFilterRowMajor255 (const SkScalar array[20])
 Construct a color filter that transforms a color by a 4x5 matrix. More...
 
- Static Public Member Functions inherited from SkFlattenable
static Factory NameToFactory (const char name[])
 
static const char * FactoryToName (Factory)
 
static bool NameToType (const char name[], Type *type)
 
static void Register (const char name[], Factory, Type)
 

Additional Inherited Members

- Public Types inherited from SkColorFilter
enum  Flags { kAlphaUnchanged_Flag = 1 << 0 }
 
- Public Types inherited from SkFlattenable
enum  Type {
  kSkColorFilter_Type, kSkDrawable_Type, kSkDrawLooper_Type, kSkImageFilter_Type,
  kSkMaskFilter_Type, kSkPathEffect_Type, kSkPixelRef_Type, kSkRasterizer_Type,
  kSkShaderBase_Type, kSkUnused_Type, kSkUnused_Xfermode_Type, kSkNormalSource_Type
}
 
typedef sk_sp< SkFlattenable >(* Factory )(SkReadBuffer &)
 
- Public Member Functions inherited from SkColorFilter
virtual bool asColorMode (SkColor *color, SkBlendMode *bmode) const
 If the filter can be represented by a source color plus Mode, this returns true, and sets (if not NULL) the color and mode appropriately. More...
 
virtual bool asColorMatrix (SkScalar matrix[20]) const
 If the filter can be represented by a 5x4 matrix, this returns true, and sets the matrix appropriately. More...
 
virtual bool asComponentTable (SkBitmap *table) const
 If the filter can be represented by per-component table, return true, and if table is not null, copy the bitmap containing the table into it. More...
 
virtual void filterSpan (const SkPMColor src[], int count, SkPMColor result[]) const =0
 Called with a scanline of colors, as if there was a shader installed. More...
 
void appendStages (SkRasterPipeline *, SkColorSpace *, SkArenaAlloc *, bool shaderIsOpaque) const
 
virtual uint32_t getFlags () const
 Returns the flags for this filter. More...
 
virtual sk_sp< SkColorFiltermakeComposed (sk_sp< SkColorFilter >) const
 If this subclass can optimally createa composition with the inner filter, return it as a new filter (which the caller must unref() when it is done). More...
 
SkColor filterColor (SkColor) const
 Apply this colorfilter to the specified SkColor. More...
 
SkColor4f filterColor4f (const SkColor4f &) const
 Filters a single color.
 
virtual sk_sp
< GrFragmentProcessor > 
asFragmentProcessor (GrContext *, SkColorSpace *dstColorSpace) const
 A subclass may implement this factory function to work with the GPU backend. More...
 
bool affectsTransparentBlack () const
 
- Public Member Functions inherited from SkFlattenable
virtual Factory getFactory () const =0
 Implement this to return a factory function pointer that can be called to recreate your class given a buffer (previously written to by your override of flatten().
 
virtual const char * getTypeName () const
 Returns the name of the object's class. More...
 
virtual void flatten (SkWriteBuffer &) const
 Override this if your subclass needs to record data that it will need to recreate itself from its CreateProc (returned by getFactory()).
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 Default construct, initializing the reference count to 1.
 
virtual ~SkRefCntBase ()
 Destruct, asserting that the reference count is 1.
 
int32_t getRefCnt () const
 Return the reference count. More...
 
void validate () const
 
bool unique () const
 May return true if the caller is the only owner. More...
 
void ref () const
 Increment the reference count. More...
 
void unref () const
 Decrement the reference count. More...
 
- Protected Member Functions inherited from SkColorFilter
sk_sp< SkColorFiltermakeColorSpace (SkColorSpaceXformer *xformer) const
 
virtual sk_sp< SkColorFilteronMakeColorSpace (SkColorSpaceXformer *) const
 
- Protected Member Functions inherited from SkRefCntBase
void internal_dispose_restore_refcnt_to_1 () const
 Allow subclasses to call this if they've overridden internal_dispose so they can reset fRefCnt before the destructor is called or if they choose not to call the destructor (e.g. More...
 

Member Function Documentation

static sk_sp<SkColorFilter> SkColorMatrixFilter::MakeLightingFilter ( SkColor  mul,
SkColor  add 
)
static

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.


The documentation for this class was generated from the following file: