java.lang.Object | ||
↳ | 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.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a color filter that transforms colors through a 4x5 color matrix.
| |||||||||||
Create a color filter that transforms colors through a 4x5 color matrix.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the
ColorMatrix used by this filter. | |||||||||||
Specifies the color matrix used by this filter.
| |||||||||||
Specifies the color matrix used by this filter.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.graphics.ColorFilter
| |||||||||||
From class
java.lang.Object
|
Create a color filter that transforms colors through a 4x5 color matrix.
matrix | 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. |
---|
Create a color filter that transforms colors through a 4x5 color matrix.
array | 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. |
---|
Returns the ColorMatrix
used by this filter. The returned
value is never null. Modifying the returned matrix does not have
any effect until you call setColorMatrix(ColorMatrix)
.
Specifies the color matrix used by this filter. If the specified color matrix is null, this filter's color matrix will be reset to the identity matrix.
array | 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 . |
---|
ArrayIndexOutOfBoundsException | if the specified array's length is < 20 |
---|
Specifies the color matrix used by this filter. If the specified color matrix is null, this filter's color matrix will be reset to the identity matrix.
matrix | A ColorMatrix or null |
---|