ColorMatrixFilter
- class ColorMatrixFilter
Classes
Members:
Methods
Deserialize(data: Buffer) -> skia.ColorFilter
MakeLightingFilter(mul: int, add: int) -> skia.ColorFilter
asAColorMatrix(self: skia.ColorFilter) -> object
asAColorMode(self: skia.ColorFilter) -> object
asColorMode(self: skia.ColorFilter) -> object
filterColor(self: skia.ColorFilter, color: int) -> int
filterColor4f(self: skia.ColorFilter, srcColor: skia.Color4f, srcCS: skia.ColorSpace, dstCS: skia.ColorSpace) -> skia.Color4f
getFlattenableType(self: skia.Flattanable) -> skia.Flattanable.Type
getTypeName(self: skia.Flattanable) -> str
makeComposed(self: skia.ColorFilter, inner: skia.ColorFilter) -> skia.ColorFilter
ref(self: skia.RefCntBase) -> None
serialize(self: skia.Flattanable) -> skia.Data
unique(self: skia.RefCntBase) -> bool
unref(self: skia.RefCntBase) -> None
Attributes
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>