public class ColorMatrixColorFilter extends ColorFilter
ColorMatrix
native_instance
Constructor and Description |
---|
ColorMatrixColorFilter(ColorMatrix matrix)
Create a color filter that transforms colors through a 4x5 color matrix.
|
ColorMatrixColorFilter(float[] array)
Create a color filter that transforms colors through a 4x5 color matrix.
|
Modifier and Type | Method and Description |
---|---|
ColorMatrix |
getColorMatrix()
Returns the
ColorMatrix used by this filter. |
void |
setColorMatrix(ColorMatrix matrix)
Specifies the color matrix used by this filter.
|
void |
setColorMatrix(float[] array)
Specifies the color matrix used by this filter.
|
finalize
public ColorMatrixColorFilter(ColorMatrix 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.public ColorMatrixColorFilter(float[] array)
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.public ColorMatrix getColorMatrix()
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)
.setColorMatrix(ColorMatrix)
public void setColorMatrix(ColorMatrix matrix)
matrix
- A ColorMatrix
or nullgetColorMatrix()
,
ColorMatrix.reset()
,
setColorMatrix(float[])
public void setColorMatrix(float[] array)
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 < 20getColorMatrix()
,
ColorMatrix.reset()
,
setColorMatrix(ColorMatrix)