ColorMatrixFilter

class ColorMatrixFilter

Classes

Type

Members:

Methods

Deserialize

MakeLightingFilter

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].

__init__

asAColorMatrix

If the filter can be represented by a 5x4 matrix, this returns list of floats appropriately.

asAColorMode

If the filter can be represented by a source color plus Mode, this returns color and mode appropriately.

asColorMode

filterColor

filterColor4f

Converts the src color (in src colorspace), into the dst colorspace, then applies this filter to it, returning the filtered color in the dst colorspace.

getFlattenableType

getTypeName

Returns the name of the object's class.

makeComposed

Construct a colorfilter whose effect is to first apply the inner filter and then apply this filter, applied to the output of the inner filter.

ref

Increment the reference count.

serialize

unique

May return true if the caller is the only owner.

unref

Decrement the reference count.

Attributes

kColorFilter_Type

kDrawLooper_Type

kDrawable_Type

kImageFilter_Type

kMaskFilter_Type

kPathEffect_Type

Methods

static ColorMatrixFilter.Deserialize(data: Buffer) skia.ColorFilter
static ColorMatrixFilter.MakeLightingFilter(mul: int, add: int) skia.ColorFilter

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.

ColorMatrixFilter.__init__(*args, **kwargs)
ColorMatrixFilter.asAColorMatrix(self: skia.ColorFilter) object

If the filter can be represented by a 5x4 matrix, this returns list of floats appropriately.

If not, this returns None.

Return type:

List[float] or None

ColorMatrixFilter.asAColorMode(self: skia.ColorFilter) object

If the filter can be represented by a source color plus Mode, this returns color and mode appropriately.

If not, this returns None.

Return type:

Tuple[int,skia.BlendMode] or None

ColorMatrixFilter.asColorMode(self: skia.ColorFilter) object
ColorMatrixFilter.filterColor(self: skia.ColorFilter, color: int) int
ColorMatrixFilter.filterColor4f(self: skia.ColorFilter, srcColor: skia.Color4f, srcCS: skia.ColorSpace, dstCS: skia.ColorSpace) skia.Color4f

Converts the src color (in src colorspace), into the dst colorspace, then applies this filter to it, returning the filtered color in the dst colorspace.

ColorMatrixFilter.getFlattenableType(self: skia.Flattanable) skia.Flattanable.Type
ColorMatrixFilter.getTypeName(self: skia.Flattanable) str

Returns the name of the object’s class.

Implemented in Drawable.

ColorMatrixFilter.makeComposed(self: skia.ColorFilter, inner: skia.ColorFilter) skia.ColorFilter

Construct a colorfilter whose effect is to first apply the inner filter and then apply this filter, applied to the output of the inner filter.

result = this(inner(…))

ColorMatrixFilter.ref(self: skia.RefCntBase) None

Increment the reference count.

Must be balanced by a call to unref().

ColorMatrixFilter.serialize(self: skia.Flattanable) skia.Data
ColorMatrixFilter.unique(self: skia.RefCntBase) bool

May return true if the caller is the only owner.

Ensures that all previous owner’s actions are complete.

ColorMatrixFilter.unref(self: skia.RefCntBase) None

Decrement the reference count.

If the reference count is 1 before the decrement, then delete the object. Note that if this is the case, then the object needs to have been allocated via new, and not on the stack.

Attributes

ColorMatrixFilter.kColorFilter_Type = <Type.kColorFilter_Type: 0>
ColorMatrixFilter.kDrawLooper_Type = <Type.kDrawLooper_Type: 3>
ColorMatrixFilter.kDrawable_Type = <Type.kDrawable_Type: 2>
ColorMatrixFilter.kImageFilter_Type = <Type.kImageFilter_Type: 4>
ColorMatrixFilter.kMaskFilter_Type = <Type.kMaskFilter_Type: 5>
ColorMatrixFilter.kPathEffect_Type = <Type.kPathEffect_Type: 6>