public class IcyColorSpace extends java.awt.color.ColorSpace implements ChangeListener, IcyColorMapListener
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 and Description |
---|
IcyColorSpace(int numComponents)
Create an icy colorspace object
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(IcyColorSpaceListener listener)
Add a listener
|
void |
beginUpdate() |
void |
colorMapChanged(IcyColorMapEvent e) |
void |
copyColormap(int component,
IcyColorMap map)
Deprecated.
Use
setColormap(channel, map) instead. |
void |
copyColormap(int component,
IcyColorMap map,
boolean copyName)
Deprecated.
Use
setColormap(channel, map) instead. |
void |
copyColormap(int component,
IcyColorMap map,
boolean copyName,
boolean copyAlpha)
Deprecated.
Use
setColormap(channel, map) instead. |
void |
copyColormaps(java.awt.image.ColorModel cm)
Deprecated.
Use
setColorMaps(ColorModel) instead. |
void |
copyColormaps(IcyColorSpace source)
Deprecated.
Use
setColorMaps(IcyColorSpace, boolean) instead. |
void |
endUpdate() |
void |
fillARGBBuffer(int[][] unnormSrc,
int[] dest)
Set 8 bit ARGB data in an ARGB buffer from a scaled input buffer
|
void |
fillARGBBuffer(int[][] unnormSrc,
int[] dest,
int offset,
int length)
Set 8 bit ARGB data in an ARGB buffer from a scaled input buffer
|
void |
fireEvent(IcyColorSpaceEvent e)
fire event
|
float[] |
fromCIEXYZ(float[] colorvalue) |
float[] |
fromRGB(float[] rgb) |
float[] |
fromRGB(int rgb)
return normalized component values from ARGB packed integer values
|
IcyColorMap |
getColormap(int component)
Deprecated.
Use
getColorMap(int) instead (different case). |
IcyColorMap |
getColorMap(int component)
Return the colormap of the specified component.
|
FromRGBColorMap |
getFromRGBMap(int component)
Return the RGB inverse colormap for specified RGB component.
|
java.lang.String |
getName(int idx) |
int |
getNumComponents()
Return the number of component of colorSpace
|
boolean |
hasAlphaComponent()
Return true if the colorspace's colormap contains an alpha component
This is different from the isAlphaEnabled flag |
int |
indexOfColorMap(IcyColorMap colormap)
get index of the specified colormap
|
boolean |
isUpdating() |
void |
onChanged(CollapsibleEvent compare)
process on colorspace change
|
void |
removeListener(IcyColorSpaceListener listener)
Remove a listener
|
void |
setColormap(int component,
IcyColorMap map)
Deprecated.
Use
setColorMap(int, IcyColorMap, boolean) instead. |
void |
setColorMap(int component,
IcyColorMap colorMap,
boolean setAlpha)
Set the colormap for the specified component (actually copy the content of source colormap).
|
void |
setColormaps(java.awt.image.ColorModel cm)
Deprecated.
Use
setColorMaps(ColorModel) instead (different case). |
void |
setColorMaps(java.awt.image.ColorModel cm)
Set the RGB colormaps from a compatible colorModel.
|
void |
setColormaps(IcyColorSpace source)
Deprecated.
Use
setColorMaps(IcyColorSpace, boolean) instead. |
void |
setColorMaps(IcyColorSpace source,
boolean setAlpha)
Set colormaps from specified colorSpace (do a copy).
|
float[] |
toCIEXYZ(float[] colorvalue) |
float[] |
toRGB(float[] colorvalue) |
int |
toRGBUnnorm(int[] colorvalue)
return unnormalized ARGB values from colorMap scaled components values
|
public IcyColorSpace(int numComponents)
numComponents
- number of color componentpublic boolean hasAlphaComponent()
public float[] fromCIEXYZ(float[] colorvalue)
fromCIEXYZ
in class java.awt.color.ColorSpace
ColorSpace.fromCIEXYZ(float[])
public float[] toCIEXYZ(float[] colorvalue)
toCIEXYZ
in class java.awt.color.ColorSpace
ColorSpace.toCIEXYZ(float[])
public float[] fromRGB(float[] rgb)
fromRGB
in class java.awt.color.ColorSpace
ColorSpace.fromRGB(float[])
public float[] fromRGB(int rgb)
rgb
- public int toRGBUnnorm(int[] colorvalue)
colorvalue
- public float[] toRGB(float[] colorvalue)
toRGB
in class java.awt.color.ColorSpace
public void fillARGBBuffer(int[][] unnormSrc, int[] dest, int offset, int length)
unnormSrc
- source buffer containing unnormalized values ([0..255] range) for each componentdest
- ARGB components bufferpublic void fillARGBBuffer(int[][] unnormSrc, int[] dest)
unnormSrc
- source buffer containing unnormalized values ([0..255] range) for each componentdest
- ARGB components bufferpublic int getNumComponents()
getNumComponents
in class java.awt.color.ColorSpace
public IcyColorMap getColorMap(int component)
@Deprecated public IcyColorMap getColormap(int component)
getColorMap(int)
instead (different case).public void setColorMap(int component, IcyColorMap colorMap, boolean setAlpha)
component
- component we want to set the colormapcolorMap
- source colorMapsetAlpha
- also set the alpha information@Deprecated public void setColormap(int component, IcyColorMap map)
setColorMap(int, IcyColorMap, boolean)
instead.@Deprecated public void copyColormap(int component, IcyColorMap map, boolean copyName, boolean copyAlpha)
setColormap(channel, map)
instead.@Deprecated public void copyColormap(int component, IcyColorMap map, boolean copyName)
setColormap(channel, map)
instead.@Deprecated public void copyColormap(int component, IcyColorMap map)
setColormap(channel, map)
instead.public FromRGBColorMap getFromRGBMap(int component)
public void setColorMaps(java.awt.image.ColorModel cm)
@Deprecated public void setColormaps(java.awt.image.ColorModel cm)
setColorMaps(ColorModel)
instead (different case).@Deprecated public void copyColormaps(java.awt.image.ColorModel cm)
setColorMaps(ColorModel)
instead.public void setColorMaps(IcyColorSpace source, boolean setAlpha)
source
- source colorspace to copy the colormaps fromsetAlpha
- also set the alpha information@Deprecated public void setColormaps(IcyColorSpace source)
setColorMaps(IcyColorSpace, boolean)
instead.@Deprecated public void copyColormaps(IcyColorSpace source)
setColorMaps(IcyColorSpace, boolean)
instead.public int indexOfColorMap(IcyColorMap colormap)
colormap
- public java.lang.String getName(int idx)
getName
in class java.awt.color.ColorSpace
public void addListener(IcyColorSpaceListener listener)
listener
- public void removeListener(IcyColorSpaceListener listener)
listener
- public void fireEvent(IcyColorSpaceEvent e)
public void onChanged(CollapsibleEvent compare)
onChanged
in interface ChangeListener
public void colorMapChanged(IcyColorMapEvent e)
colorMapChanged
in interface IcyColorMapListener
public void beginUpdate()
UpdateEventHandler.beginUpdate()
public void endUpdate()
UpdateEventHandler.endUpdate()
public boolean isUpdating()
UpdateEventHandler.isUpdating()