MaskFilter
- class MaskFilter
MaskFilter
is the base class for object that perform transformations on the mask before drawing it.An example subclass is Blur.
Subclasses
Applies a table lookup on each of the alpha values in the mask.
Classes
Members:
Methods
Create a blur maskfilter.
Returns the name of the object's class.
Increment the reference count.
May return true if the caller is the only owner.
Decrement the reference count.
Attributes
Methods
- static MaskFilter.Deserialize(data: Buffer) skia.MaskFilter
- static MaskFilter.MakeBlur(style: skia.BlurStyle, sigma: float, respectCTM: bool = True) skia.MaskFilter
Create a blur maskfilter.
- Parameters:
style (skia.BlurStyle) – The
BlurStyle
to usesigma (float) – Standard deviation of the Gaussian blur to apply. Must be > 0.
respectCTM (bool) – if true the blur’s sigma is modified by the CTM.
- Returns:
The new blur maskfilter
- MaskFilter.__init__(*args, **kwargs)
- MaskFilter.getFlattenableType(self: skia.Flattanable) skia.Flattanable.Type
- MaskFilter.getTypeName(self: skia.Flattanable) str
Returns the name of the object’s class.
Implemented in
Drawable
.
- MaskFilter.ref(self: skia.RefCntBase) None
Increment the reference count.
Must be balanced by a call to
unref()
.
- MaskFilter.serialize(self: skia.Flattanable) skia.Data
- MaskFilter.unique(self: skia.RefCntBase) bool
May return true if the caller is the only owner.
Ensures that all previous owner’s actions are complete.
- MaskFilter.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
- MaskFilter.kColorFilter_Type = <Type.kColorFilter_Type: 0>
- MaskFilter.kDrawLooper_Type = <Type.kDrawLooper_Type: 3>
- MaskFilter.kDrawable_Type = <Type.kDrawable_Type: 2>
- MaskFilter.kImageFilter_Type = <Type.kImageFilter_Type: 4>
- MaskFilter.kMaskFilter_Type = <Type.kMaskFilter_Type: 5>
- MaskFilter.kPathEffect_Type = <Type.kPathEffect_Type: 6>