Fields Summary |
---|
private static final long | serialVersionUIDThe Constant serialVersionUID. |
public static final int | TYPE_XYZThe Constant TYPE_XYZ indicates XYZ color space type. |
public static final int | TYPE_LabThe Constant TYPE_Lab indicates Lab color space type. |
public static final int | TYPE_LuvThe Constant TYPE_Luv indicates Luv color space type. |
public static final int | TYPE_YCbCrThe Constant TYPE_YCbCr indicates YCbCr color space type. |
public static final int | TYPE_YxyThe Constant TYPE_Yxy indicates Yxy color space type. |
public static final int | TYPE_RGBThe Constant TYPE_RGB indicates RGB color space type. |
public static final int | TYPE_GRAYThe Constant TYPE_GRAY indicates Gray color space type. |
public static final int | TYPE_HSVThe Constant TYPE_HSV indicates HSV color space type. |
public static final int | TYPE_HLSThe Constant TYPE_HLS indicates HLS color space type. |
public static final int | TYPE_CMYKThe Constant TYPE_CMYK indicates CMYK color space type. |
public static final int | TYPE_CMYThe Constant TYPE_CMY indicates CMY color space type. |
public static final int | TYPE_2CLRThe Constant TYPE_2CLR indicates color spaces with 2 components. |
public static final int | TYPE_3CLRThe Constant TYPE_3CLR indicates color spaces with 3 components. |
public static final int | TYPE_4CLRThe Constant TYPE_4CLR indicates color spaces with 4 components. |
public static final int | TYPE_5CLRThe Constant TYPE_5CLR indicates color spaces with 5 components. |
public static final int | TYPE_6CLRThe Constant TYPE_6CLR indicates color spaces with 6 components. |
public static final int | TYPE_7CLRThe Constant TYPE_7CLR indicates color spaces with 7 components. |
public static final int | TYPE_8CLRThe Constant TYPE_8CLR indicates color spaces with 8 components. |
public static final int | TYPE_9CLRThe Constant TYPE_9CLR indicates color spaces with 9 components. |
public static final int | TYPE_ACLRThe Constant TYPE_ACLR indicates color spaces with 10 components. |
public static final int | TYPE_BCLRThe Constant TYPE_BCLR indicates color spaces with 11 components. |
public static final int | TYPE_CCLRThe Constant TYPE_CCLR indicates color spaces with 12 components. |
public static final int | TYPE_DCLRThe Constant TYPE_DCLR indicates color spaces with 13 components. |
public static final int | TYPE_ECLRThe Constant TYPE_ECLR indicates color spaces with 14 components. |
public static final int | TYPE_FCLRThe Constant TYPE_FCLR indicates color spaces with 15 components. |
public static final int | CS_sRGBThe Constant CS_sRGB indicates standard RGB color space. |
public static final int | CS_LINEAR_RGBThe Constant CS_LINEAR_RGB indicates linear RGB color space. |
public static final int | CS_CIEXYZThe Constant CS_CIEXYZ indicates CIEXYZ conversion color space. |
public static final int | CS_PYCCThe Constant CS_PYCC indicates Photo YCC conversion color space. |
public static final int | CS_GRAYThe Constant CS_GRAY indicates linear gray scale color space. |
private static ColorSpace | cs_GrayThe cs_ gray. |
private static ColorSpace | cs_PYCCThe cs_ pycc. |
private static ColorSpace | cs_CIEXYZThe cs_ ciexyz. |
private static ColorSpace | cs_LRGBThe cs_ lrgb. |
private static ColorSpace | cs_sRGBThe cs_s rgb. |
private int | typeThe type. |
private int | numComponentsThe num components. |
Methods Summary |
---|
public abstract float[] | fromCIEXYZ(float[] colorvalue)Performs the transformation of a color from the CS_CIEXYZ color space
into this ColorSpace.
|
public abstract float[] | fromRGB(float[] rgbvalue)Performs the transformation of a color from the RGB color space into this
ColorSpace.
|
public static java.awt.color.ColorSpace | getInstance(int colorspace)Gets the single instance of ColorSpace with the specified ColorSpace:
CS_sRGB, CS_LINEAR_RGB, CS_CIEXYZ, CS_GRAY, or CS_PYCC.
switch (colorspace) {
case CS_sRGB:
if (cs_sRGB == null) {
cs_sRGB = new ICC_ColorSpace(
new ICC_ProfileStub(CS_sRGB));
LUTColorConverter.sRGB_CS = cs_sRGB;
//ICC_Profile.getInstance (CS_sRGB));
}
return cs_sRGB;
case CS_CIEXYZ:
if (cs_CIEXYZ == null) {
cs_CIEXYZ = new ICC_ColorSpace(
new ICC_ProfileStub(CS_CIEXYZ));
//ICC_Profile.getInstance (CS_CIEXYZ));
}
return cs_CIEXYZ;
case CS_GRAY:
if (cs_Gray == null) {
cs_Gray = new ICC_ColorSpace(
new ICC_ProfileStub(CS_GRAY));
LUTColorConverter.LINEAR_GRAY_CS = cs_Gray;
//ICC_Profile.getInstance (CS_GRAY));
}
return cs_Gray;
case CS_PYCC:
if (cs_PYCC == null) {
cs_PYCC = new ICC_ColorSpace(
new ICC_ProfileStub(CS_PYCC));
//ICC_Profile.getInstance (CS_PYCC));
}
return cs_PYCC;
case CS_LINEAR_RGB:
if (cs_LRGB == null) {
cs_LRGB = new ICC_ColorSpace(
new ICC_ProfileStub(CS_LINEAR_RGB));
LUTColorConverter.LINEAR_GRAY_CS = cs_Gray;
//ICC_Profile.getInstance (CS_LINEAR_RGB));
}
return cs_LRGB;
default:
}
// Unknown argument passed
// awt.16B=Not a predefined colorspace
throw new IllegalArgumentException(Messages.getString("Not a predefined colorspace")); //$NON-NLS-1$
|
public float | getMaxValue(int component)Gets the maximum normalized color component value for the specified
component.
if (component < 0 || component > numComponents - 1) {
// awt.16A=Invalid component index: {0}
throw new IllegalArgumentException(Messages.getString("awt.16A", component)); //$NON-NLS-1$
}
return 1;
|
public float | getMinValue(int component)Gets the minimum normalized color component value for the specified
component.
if (component < 0 || component > numComponents - 1) {
// awt.16A=Invalid component index: {0}
throw new IllegalArgumentException(Messages.getString("awt.16A", component)); //$NON-NLS-1$
}
return 0;
|
public java.lang.String | getName(int idx)Gets the name of the component for the specified component index.
if (idx < 0 || idx > numComponents - 1) {
// awt.16A=Invalid component index: {0}
throw new IllegalArgumentException(Messages.getString("awt.16A", idx)); //$NON-NLS-1$
}
return "Unnamed color component #" + idx; //$NON-NLS-1$
|
public int | getNumComponents()Gets the number of components for this ColorSpace.
return numComponents;
|
public int | getType()Gets the type of the ColorSpace.
return type;
|
public boolean | isCS_sRGB()Checks if this ColorSpace has CS_sRGB type or not.
// If our color space is sRGB, then cs_sRGB
// is already initialized
return (this == cs_sRGB);
|
public abstract float[] | toCIEXYZ(float[] colorvalue)Performs the transformation of a color from this ColorSpace into the
CS_CIEXYZ color space.
|
public abstract float[] | toRGB(float[] colorvalue)Performs the transformation of a color from this ColorSpace into the RGB
color space.
|