|
xmlgraphics-commons 2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.color.ColorSpace
org.apache.xmlgraphics.java2d.color.NamedColorSpace
public class NamedColorSpace
Implements a pseudo color space for a named color which is defined in the CIE XYZ color space. At the moment, this color space always returns the fully opaque color regardless of the single component value (tint) given to its conversion methods.
| Field Summary |
|---|
| Fields inherited from class java.awt.color.ColorSpace |
|---|
CS_CIEXYZ, CS_GRAY, CS_LINEAR_RGB, CS_PYCC, CS_sRGB, TYPE_2CLR, TYPE_3CLR, TYPE_4CLR, TYPE_5CLR, TYPE_6CLR, TYPE_7CLR, TYPE_8CLR, TYPE_9CLR, TYPE_ACLR, TYPE_BCLR, TYPE_CCLR, TYPE_CMY, TYPE_CMYK, TYPE_DCLR, TYPE_ECLR, TYPE_FCLR, TYPE_GRAY, TYPE_HLS, TYPE_HSV, TYPE_Lab, TYPE_Luv, TYPE_RGB, TYPE_XYZ, TYPE_YCbCr, TYPE_Yxy |
| Constructor Summary | |
|---|---|
NamedColorSpace(String name,
Color color)
Creates a new named color. |
|
NamedColorSpace(String name,
Color color,
String profileName,
String profileURI)
Creates a new named color. |
|
NamedColorSpace(String name,
float[] xyz)
Creates a new named color. |
|
NamedColorSpace(String name,
float[] xyz,
String profileName,
String profileURI)
Creates a new named color. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
float[] |
fromCIEXYZ(float[] colorvalue)
|
float[] |
fromRGB(float[] rgbvalue)
|
String |
getColorName()
Returns the color name. |
float |
getMaxValue(int component)
|
float |
getMinValue(int component)
|
String |
getName(int component)
|
String |
getProfileName()
Returns the name of the profile used to identify the color space in a particular context. |
String |
getProfileURI()
Returns the URI identifying the associate color profile. |
Color |
getRGBColor()
Returns an sRGB-based color representing the full-tint color defined by this named color space. |
float[] |
getXYZ()
Returns the XYZ coordinates of the named color. |
int |
hashCode()
|
float[] |
toCIEXYZ(float[] colorvalue)
|
float[] |
toRGB(float[] colorvalue)
|
String |
toString()
|
| Methods inherited from class java.awt.color.ColorSpace |
|---|
getInstance, getNumComponents, getType, isCS_sRGB |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NamedColorSpace(String name,
float[] xyz)
name - the color namexyz - the CIE XYZ coordinates (valid values: 0.0f to 1.0f, although
values slightly larger than 1.0f are common)
public NamedColorSpace(String name,
float[] xyz,
String profileName,
String profileURI)
name - the color namexyz - the CIE XYZ coordinates (valid values: 0.0f to 1.0f, although
values slightly larger than 1.0f are common)profileName - Optional profile name associated with this color spaceprofileURI - Optional profile URI associated with this color space
public NamedColorSpace(String name,
Color color,
String profileName,
String profileURI)
name - the color namecolor - the color to use when the named color's specific color properties are not
available.profileName - Optional profile name associated with this color spaceprofileURI - Optional profile URI associated with this color space
public NamedColorSpace(String name,
Color color)
name - the color namecolor - the color to use when the named color's specific color properties are not
available.| Method Detail |
|---|
public String getColorName()
public String getProfileName()
getProfileName in interface ColorSpaceOriginpublic String getProfileURI()
getProfileURI in interface ColorSpaceOriginpublic float[] getXYZ()
public Color getRGBColor()
public float getMinValue(int component)
getMinValue in class ColorSpacepublic float getMaxValue(int component)
getMaxValue in class ColorSpacepublic String getName(int component)
getName in class ColorSpacepublic float[] fromCIEXYZ(float[] colorvalue)
fromCIEXYZ in class ColorSpacepublic float[] fromRGB(float[] rgbvalue)
fromRGB in class ColorSpacepublic float[] toCIEXYZ(float[] colorvalue)
toCIEXYZ in class ColorSpacepublic float[] toRGB(float[] colorvalue)
toRGB in class ColorSpacepublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
xmlgraphics-commons 2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||