ColorMatrixColorFilter
open class ColorMatrixColorFilter : ColorFilter
kotlin.Any | ||
↳ | android.graphics.ColorFilter | |
↳ | android.graphics.ColorMatrixColorFilter |
A color filter 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.
Summary
Public constructors | |
---|---|
ColorMatrixColorFilter(matrix: ColorMatrix) Create a color filter that transforms colors through a 4x5 color matrix. |
|
ColorMatrixColorFilter(array: FloatArray) Create a color filter that transforms colors through a 4x5 color matrix. |
Public methods | |
---|---|
open Unit |
getColorMatrix(colorMatrix: ColorMatrix!) Copies the ColorMatrix from the filter into the passed ColorMatrix. |
Public constructors
ColorMatrixColorFilter
ColorMatrixColorFilter(matrix: ColorMatrix)
Create a color filter that transforms colors through a 4x5 color matrix.
Parameters | |
---|---|
matrix |
ColorMatrix: 4x5 matrix used to transform colors. It is copied into the filter, so changes made to the matrix after the filter is constructed will not be reflected in the filter. This value cannot be null . |
ColorMatrixColorFilter
ColorMatrixColorFilter(array: FloatArray)
Create a color filter that transforms colors through a 4x5 color matrix.
Parameters | |
---|---|
array |
FloatArray: Array of floats used to transform colors, treated as a 4x5 matrix. The first 20 entries of the array are copied into the filter. See ColorMatrix. This value cannot be null . |
Public methods
getColorMatrix
open fun getColorMatrix(colorMatrix: ColorMatrix!): Unit
Copies the ColorMatrix from the filter into the passed ColorMatrix.
Parameters | |
---|---|
colorMatrix |
ColorMatrix!: Set to the current value of the filter's ColorMatrix. |