animator.skia.Shader¶
- class animator.skia.Shader¶
Bases:
animator.skia.Flattenable
Functions from the SkShaders namespace are also available here as static methods.
- __init__(*args, **kwargs)¶
Methods
Blend
(*args, **kwargs)Overloaded function.
Color
(*args, **kwargs)Overloaded function.
CoordClamp
(shader, subset)Deserialize
(type, data)Deserialize a flattenable of the given type from a buffer data.
DeserializeAsType
(type, data)Deserialize a flattenable of the given type from a buffer data.
Empty
()MakeFractalNoise
(baseFrequencyX, ...[, tileSize])MakeTurbulence
(baseFrequencyX, ...[, tileSize])__init__
(*args, **kwargs)getFlattenableType
(self)getTypeName
(self)isAImage
(self)Iff this shader is backed by a single
Image
, return it, the local matrix, and the tile mode.isOpaque
(self)makeWithColorFilter
(self, filter)makeWithLocalMatrix
(self, localMatrix)serialize
(self)- static Blend(*args, **kwargs)¶
Overloaded function.
Blend(mode: animator.skia.BlendMode, dst: animator.skia.Shader, src: animator.skia.Shader) -> animator.skia.Shader
Blend(blender: animator.skia.Blender, dst: animator.skia.Shader, src: animator.skia.Shader) -> animator.skia.Shader
- static Color(*args, **kwargs)¶
Overloaded function.
Color(color: int) -> animator.skia.Shader
Color(color: animator.skia.Color4f, space: animator.skia.ColorSpace = None) -> animator.skia.Shader
- static CoordClamp(shader: animator.skia.Shader, subset: animator.skia.Rect) animator.skia.Shader ¶
- static Deserialize(type: animator.skia.Flattenable.Type, data: buffer) animator.skia.Flattenable ¶
Deserialize a flattenable of the given type from a buffer data.
- 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.
- static Empty() animator.skia.Shader ¶
- static MakeFractalNoise(baseFrequencyX: float, baseFrequencyY: float, numOctaves: int, seed: float, tileSize: animator.skia.ISize = None) animator.skia.Shader ¶
- static MakeTurbulence(baseFrequencyX: float, baseFrequencyY: float, numOctaves: int, seed: float, tileSize: animator.skia.ISize = None) animator.skia.Shader ¶
- class Type¶
Bases:
pybind11_builtins.pybind11_object
Members:
kColorFilter_Type
kBlender_Type
kDrawable_Type
kImageFilter_Type
kMaskFilter_Type
kPathEffect_Type
kShader_Type
- property name¶
- getFlattenableType(self: animator.skia.Flattenable) animator.skia.Flattenable.Type ¶
- getTypeName(self: animator.skia.Flattenable) str ¶
- isAImage(self: animator.skia.Shader) Optional[tuple] ¶
Iff this shader is backed by a single
Image
, return it, the local matrix, and the tile mode. Else returnNone
.
- isOpaque(self: animator.skia.Shader) bool ¶
- makeWithColorFilter(self: animator.skia.Shader, filter: animator.skia.ColorFilter) animator.skia.Shader ¶
- makeWithLocalMatrix(self: animator.skia.Shader, localMatrix: animator.skia.Matrix) animator.skia.Shader ¶
- serialize(self: animator.skia.Flattenable) animator.skia.Data ¶