public class LowVisionType extends Object
PageImageFactory
Modifier and Type | Field and Description |
---|---|
static int |
CVD_DEUTAN
Color vision deficiency type: Deutan
|
static int |
CVD_PROTAN
Color vision deficiency type: Protan
|
static int |
CVD_TRITAN
Color vision deficiency type: Tritan
|
Constructor and Description |
---|
LowVisionType()
Constructor of LowVisionType
|
Modifier and Type | Method and Description |
---|---|
int |
convertColor(int _src)
Convert target color based on current low vision simulation type
configuration
|
int |
countTypes()
Get number of enabled simulation types
|
boolean |
doBlur()
Check if a blur type simulation is enabled
|
boolean |
doChangeColors()
Check if at least one of color related simulation (color vision
deficiency, color filter, or glare) is enabled
|
boolean |
doColorFilter()
Check if a color filter type simulation is enabled
|
boolean |
doCVD()
Check if a color vision deficiency type simulation is enabled
|
boolean |
doEyesight()
Check if an eyesight type simulation is enabled
|
boolean |
doGlare()
Check if a glare type simulation is enabled
|
float[] |
getColorFilterRGB()
Get color filter value array (Red, Green and Blue).
|
int |
getCVDType()
Get target color vision deficiency type
|
double |
getDisplayHeight()
Get height of target display.
|
int |
getDisplayResolution()
Get vertical resolution of target display.
|
double |
getEyeDisplayDistance()
Get distance between user's eye and display.
|
float |
getEyesightDegree()
Get target eyesight degree of eyesight type simulation
|
double |
getEyesightLength()
Get indistinguishable length for target eyesight degree
|
double |
getEyesightPixel()
Get indistinguishable pixel size for target eyesight degree
|
int |
getEyesightRadius()
Get indistinguishable radius for target eyesight degree
|
float |
getGlareDegree()
Get target degree of glare
|
void |
setColorFilter(boolean enable)
Turn on/off a color filter type simulation
|
void |
setColorFilterDegree(float _degree)
Set degree of color filter
|
void |
setCVD(boolean enable)
Turn on/off a color vision deficiency type simulation
|
void |
setCVDType(int cvd_type)
Set target color vision deficiency type
|
void |
setDisplayHeight(double height)
Set display height in target environment
|
void |
setDisplayResolution(int resolution)
Set resolution of target display
|
void |
setEyeDisplayDistance(double distance)
Set distance between user's eye and display
|
void |
setEyesight(boolean enable)
Turn on/off an eyesight type simulation
|
void |
setEyesightDegree(float _deg)
Set target eyesight degree of eyesight type simulation
|
void |
setGlare(boolean enable)
Turn on/off a glare type simulation
|
void |
setGlareDegree(float _deg)
Set target degree of glare
|
String |
toString() |
public static final int CVD_PROTAN
public static final int CVD_DEUTAN
public static final int CVD_TRITAN
public boolean doEyesight()
public void setEyesight(boolean enable)
enable
- set true to turn onpublic float getEyesightDegree()
public void setEyesightDegree(float _deg) throws LowVisionException
_deg
- target eyesight degreeLowVisionException
- if target degree is not positive valuepublic double getEyesightPixel()
public int getEyesightRadius()
public double getEyesightLength()
public boolean doCVD()
public void setCVD(boolean enable)
enable
- set true to turn onpublic int getCVDType()
public void setCVDType(int cvd_type) throws LowVisionException
cvd_type
- target color vision deficiency typeLowVisionException
- if target type is not CVD_DEUTAN,CVD_PROTAN, or CVD_TRITANpublic boolean doColorFilter()
public void setColorFilter(boolean enable)
enable
- set true to turn onpublic float[] getColorFilterRGB()
public void setColorFilterDegree(float _degree) throws LowVisionException
_degree
- degree of color filterLowVisionException
- if resulting filter value exceeds the range of [0.0, 1.0].public boolean doGlare()
public void setGlare(boolean enable)
enable
- set true to turn onpublic float getGlareDegree()
public void setGlareDegree(float _deg)
_deg
- target degree of glarepublic int countTypes()
public boolean doBlur()
public boolean doChangeColors()
public int convertColor(int _src) throws LowVisionException
_src
- target colorLowVisionException
public double getDisplayHeight()
public int getDisplayResolution()
public double getEyeDisplayDistance()
public void setDisplayHeight(double height)
height
- target display heightpublic void setDisplayResolution(int resolution)
resolution
- resolution of target displaypublic void setEyeDisplayDistance(double distance)
distance
- distance between user's eye and display