ColorMatrixColorFilter
Create a [ColorFilter] that transforms colors through a 4x5 color matrix. This filter can be used
ColorMatrixColorFilter
Class
Common
class ColorMatrixColorFilter
internal constructor(private var colorMatrix: ColorMatrix?, nativeColorFilter: NativeColorFilter) :
ColorFilter(nativeColorFilter)
Create a ColorFilter that transforms colors through a 4x5 color matrix. This filter can be used
to change the saturation of pixels, convert from YUV to RGB, etc.
Secondary Constructors
constructor(
colorMatrix: ColorMatrix
) : this(colorMatrix, actualColorMatrixColorFilter(colorMatrix))
Functions
fun copyColorMatrix(targetColorMatrix: ColorMatrix = ColorMatrix()): ColorMatrix
Copy the internal ColorMatrix into the provided ColorMatrix instance. By default this
creates a new ColorMatrix instance, however, consumers are encouraged to create and re-use
instances of ColorMatrix. This method returns the copied result for convenience
Parameters
| targetColorMatrix | Optional ColorMatrix to copy contents into |
Returns
the copied ColorMatrix instance |
