TableMaskFilter
- class TableMaskFilter
Applies a table lookup on each of the alpha values in the mask.
Helper methods create some common tables (e.g. gamma, clipping)
Methods
Utility that creates a clipping table: clamps values below min to 0 and above max to 255, and rescales the remaining into 0..255.
Utility that sets the gamma table.
Methods
- static TableMaskFilter.Create(table: list[int]) skia.MaskFilter
- static TableMaskFilter.CreateClip(min: int, max: int) skia.MaskFilter
- static TableMaskFilter.CreateGamma(gamma: float) skia.MaskFilter
- static TableMaskFilter.MakeClipTable(min: int, max: int) object
Utility that creates a clipping table: clamps values below min to 0 and above max to 255, and rescales the remaining into 0..255.
- Returns:
clipping table
- Return type:
List[int]
- static TableMaskFilter.MakeGammaTable(gamma: float) object
Utility that sets the gamma table.
- Returns:
gamma table
- Return type:
List[int]
- TableMaskFilter.__init__(*args, **kwargs)