Package snap.swing
Class AWTEnv.AWTColorSpace
java.lang.Object
snap.gfx.ColorSpace
snap.swing.AWTEnv.AWTColorSpace
- Enclosing class:
- AWTEnv
Implementation of snap ColorSpace using java.awt.color.ColorSpace.
-
Nested Class Summary
Nested classes/interfaces inherited from class snap.gfx.ColorSpace
ColorSpace.ColorSpaceFactory
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat[]
fromCIEXYZ
(float[] colorvalue) Transforms a color value assumed to be in the CS_CIEXYZ conversion color space into this ColorSpace.float[]
fromRGB
(float[] rgbvalue) Transforms a color value assumed to be in the default CS_sRGB color space into this ColorSpace.getName
(int idx) Returns the name of the component given the component index.int
Returns the number of components of this ColorSpace.int
getType()
Returns the color space type of this ColorSpace (for example TYPE_RGB, TYPE_XYZ, ...).boolean
Returns true if the ColorSpace is CS_sRGB.float[]
toCIEXYZ
(float[] colorvalue) Transforms a color value assumed to be in this ColorSpace into the CS_CIEXYZ conversion color space.float[]
toRGB
(float[] colorvalue) Transforms a color value assumed to be in this ColorSpace into a value in the default CS_sRGB color space.Methods inherited from class snap.gfx.ColorSpace
createColorSpaceICC, getInstance, getMaxValue, getMinValue
-
Method Details
-
isCS_sRGB
public boolean isCS_sRGB()Description copied from class:ColorSpace
Returns true if the ColorSpace is CS_sRGB.- Overrides:
isCS_sRGB
in classColorSpace
-
toRGB
public float[] toRGB(float[] colorvalue) Description copied from class:ColorSpace
Transforms a color value assumed to be in this ColorSpace into a value in the default CS_sRGB color space.- Specified by:
toRGB
in classColorSpace
-
fromRGB
public float[] fromRGB(float[] rgbvalue) Description copied from class:ColorSpace
Transforms a color value assumed to be in the default CS_sRGB color space into this ColorSpace.- Specified by:
fromRGB
in classColorSpace
-
toCIEXYZ
public float[] toCIEXYZ(float[] colorvalue) Description copied from class:ColorSpace
Transforms a color value assumed to be in this ColorSpace into the CS_CIEXYZ conversion color space.- Specified by:
toCIEXYZ
in classColorSpace
-
fromCIEXYZ
public float[] fromCIEXYZ(float[] colorvalue) Description copied from class:ColorSpace
Transforms a color value assumed to be in the CS_CIEXYZ conversion color space into this ColorSpace.- Specified by:
fromCIEXYZ
in classColorSpace
-
getType
public int getType()Description copied from class:ColorSpace
Returns the color space type of this ColorSpace (for example TYPE_RGB, TYPE_XYZ, ...). The type defines the number of components of the color space and the interpretation, e.g. TYPE_RGB identifies a color space with three components - red, green, and blue. It does not define the particular color characteristics of the space, e.g. the chromaticities of the primaries.- Overrides:
getType
in classColorSpace
-
getNumComponents
public int getNumComponents()Description copied from class:ColorSpace
Returns the number of components of this ColorSpace.- Overrides:
getNumComponents
in classColorSpace
-
getName
Description copied from class:ColorSpace
Returns the name of the component given the component index.- Overrides:
getName
in classColorSpace
-