public class DisplayTransformManager extends Object
Modifier and Type | Field and Description |
---|---|
static int |
LEVEL_COLOR_MATRIX_GRAYSCALE
Color transform level used by A11y services to make the display monochromatic.
|
static int |
LEVEL_COLOR_MATRIX_INVERT_COLOR
Color transform level used by A11y services to invert the display colors.
|
static int |
LEVEL_COLOR_MATRIX_NIGHT_DISPLAY
Color transform level used by Night display to tint the display red.
|
Modifier and Type | Method and Description |
---|---|
float[] |
getColorMatrix(int key)
Returns a copy of the color transform matrix set for a given level.
|
int |
getDaltonizerMode()
Returns the current Daltonization mode.
|
void |
setColorMatrix(int level,
float[] value)
Sets and applies a current color transform matrix for a given level.
|
void |
setDaltonizerMode(int mode)
Sets the current Daltonization mode.
|
public static final int LEVEL_COLOR_MATRIX_NIGHT_DISPLAY
public static final int LEVEL_COLOR_MATRIX_GRAYSCALE
public static final int LEVEL_COLOR_MATRIX_INVERT_COLOR
public float[] getColorMatrix(int key)
public void setColorMatrix(int level, float[] value)
Note: all color transforms are first composed to a single matrix in ascending order based on level before being applied to the display.
level
- the level used to identify and compose the color transform (low -> high)value
- the 4x4 color transform matrix (in column-major order), or null
to
remove the color transform matrix associated with the provided levelpublic int getDaltonizerMode()
public void setDaltonizerMode(int mode)
mode
- the new Daltonization mode, or -1 to disable