animator.skia.ColorFilter

class animator.skia.ColorFilter

Bases: animator.skia.Flattenable

__init__(*args, **kwargs)

Methods

Deserialize(buffer)

Deserialize a color filter from a buffer.

DeserializeAsType(type, data)

Deserialize a flattenable of the given type from a buffer data.

__init__(*args, **kwargs)

asAColorMatrix(self)

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

asAColorMode(self)

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

filterColor(self, color)

filterColor4f(self, srcColor, srcCS, dstCS)

getFlattenableType(self)

getTypeName(self)

isAlphaUnchanged(self)

makeComposed(self, inner)

serialize(self)

static Deserialize(buffer: buffer) animator.skia.ColorFilter

Deserialize a color filter from a buffer.

static DeserializeAsType(type: animator.skia.Flattenable.Type, data: buffer) Union[SkColorFilter, SkBlender, SkImageFilter, SkMaskFilter, SkPathEffect, SkShader]

Deserialize a flattenable of the given type from a buffer data. The return value is correctly typed.

class Type

Bases: pybind11_builtins.pybind11_object

Members:

kColorFilter_Type

kBlender_Type

kDrawable_Type

kImageFilter_Type

kMaskFilter_Type

kPathEffect_Type

kShader_Type

property name
asAColorMatrix(self: animator.skia.ColorFilter) Optional[List[float]]

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

Returns

list of floats or None

Return type

List[float] | None

asAColorMode(self: animator.skia.ColorFilter) Optional[tuple]

If the filter can be represented by a source color plus Mode, this returns (color, mode) appropriately. If not, this returns None.

Returns

(color, mode) or None

Return type

Tuple[int, skia.BlendMode] | None

filterColor(self: animator.skia.ColorFilter, color: int) int
filterColor4f(self: animator.skia.ColorFilter, srcColor: animator.skia.Color4f, srcCS: animator.skia.ColorSpace, dstCS: animator.skia.ColorSpace) animator.skia.Color4f
getFlattenableType(self: animator.skia.Flattenable) animator.skia.Flattenable.Type
getTypeName(self: animator.skia.Flattenable) str
isAlphaUnchanged(self: animator.skia.ColorFilter) bool
makeComposed(self: animator.skia.ColorFilter, inner: animator.skia.ColorFilter) animator.skia.ColorFilter
serialize(self: animator.skia.Flattenable) animator.skia.Data